Installation
Note
Ensure you have Python 3.10 or higher installed on your system.
Note on Compatibility with conda
- ChemGraph supports both MACE and UMA (Meta's machine learning potential). However, due to the current dependency conflicts, particularly with
e3nn—you cannot install both in the same environment. - To use both libraries, create separate Conda environments, one for each.
- Clone the repository:
-
Create and activate a virtual environment:
-
Install ChemGraph:
- Clone the repository:
- Create and activate a new Conda environment:
- Install required Conda dependencies:
- Install
ChemGraphand its dependencies:
-
Clone the repository:
-
Create and activate a virtual environment using uv:
-
Install ChemGraph using uv:
Optional: Install with UMA support
- Note on e3nn Conflict for UMA Installation: The
umaextras (requiringe3nn>=0.5) conflict with the basemace-torchdependency (which pinse3nn==0.4.4). -
If you need to install UMA support in an environment where
mace-torchmight cause this conflict, you can try the following workaround:- Temporarily modify
pyproject.toml: Open thepyproject.tomlfile in the root of the ChemGraph project. - Find the line containing
"mace-torch>=0.3.13",in thedependencieslist. - Comment out this line by adding a
#at the beginning (e.g.,# "mace-torch>=0.3.13",). - Install UMA extras: Run
pip install -e ".[uma]". - (Optional) Restore
pyproject.toml: After installation, you can uncomment themace-torchline if you still need it for other purposes in the same environment. Be aware thatmace-torchmight not function correctly due to thee3nnversion mismatch (e3nn>=0.5will be present for UMA).
- Temporarily modify
-
The most robust solution for using both MACE and UMA with their correct dependencies is to create separate Conda environments, as highlighted in the "Note on Compatibility" above.
-
Important for UMA Model Access: The
facebook/UMAmodel is a gated model on Hugging Face. To use it, you must:- Visit the facebook/UMA model page on Hugging Face.
- Log in with your Hugging Face account.
- Accept the model's terms and conditions if prompted.
- Your environment (local or CI) must also be authenticated with Hugging Face, typically by logging in via
huggingface-cli loginor ensuringHF_TOKENis set and recognized.