61 lines
1.7 KiB
Python
Executable File
61 lines
1.7 KiB
Python
Executable File
"""
|
|
Configuration Module
|
|
|
|
This module provides configuration settings for the Mars Toolkit.
|
|
It includes API keys, endpoints, paths, and other configuration parameters.
|
|
"""
|
|
|
|
from typing import Dict, Any
|
|
|
|
class Config:
|
|
"""Configuration class for Mars Toolkit"""
|
|
|
|
# Materials Project
|
|
MP_API_KEY = 'PMASAg256b814q3OaSRWeVc7MKx4mlKI'
|
|
MP_ENDPOINT = 'https://api.materialsproject.org/'
|
|
MP_TOPK = 3
|
|
|
|
LOCAL_MP_ROOT = '/home/ubuntu/sas0/LYT/paper_dataset/mp_cif/'
|
|
|
|
# Proxy
|
|
HTTP_PROXY = 'http://192.168.168.1:20171'
|
|
HTTPS_PROXY = 'http://192.168.168.1:20171'
|
|
|
|
# FairChem
|
|
FAIRCHEM_MODEL_PATH = '/home/ubuntu/sas0/lzy/mars-mcp/pretrained_models/fairchem_ckpt/eqV2_86M_omat_mp_salex.pt'
|
|
FMAX = 0.05
|
|
|
|
# MatterGen
|
|
MATTERGENMODEL_ROOT = '/home/ubuntu/sas0/lzy/mars-mcp/pretrained_models/mattergen_ckpt'
|
|
MATTERGEN_ROOT='/home/ubuntu/50T/nfs/lzy/mars-mcp/mattergen'
|
|
MATTERGENMODEL_RESULT_PATH = 'results/'
|
|
|
|
# Dify
|
|
DIFY_ROOT_URL = 'http://192.168.191.101:6080'
|
|
DIFY_API_KEY = 'app-IKZrS1RqIyurPSzR73mz6XSA'
|
|
|
|
# Searxng
|
|
SEARXNG_HOST="http://192.168.168.1:40032/"
|
|
|
|
# Visualization
|
|
VIZ_CIF_OUTPUT_ROOT = '/home/ubuntu/50T/nfs/lzy/mars-mcp/outputs/cif_visualization'
|
|
|
|
@classmethod
|
|
def as_dict(cls) -> Dict[str, Any]:
|
|
"""Return all configuration settings as a dictionary"""
|
|
return {
|
|
key: value for key, value in cls.__dict__.items()
|
|
if not key.startswith('__') and not callable(value)
|
|
}
|
|
|
|
@classmethod
|
|
def update(cls, **kwargs):
|
|
"""Update configuration settings"""
|
|
for key, value in kwargs.items():
|
|
if hasattr(cls, key):
|
|
setattr(cls, key, value)
|
|
|
|
|
|
# Create a global instance for easy access
|
|
config = Config()
|