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
ChemGraph
and 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
uma
extras (requiringe3nn>=0.5
) conflict with the basemace-torch
dependency (which pinse3nn==0.4.4
). -
If you need to install UMA support in an environment where
mace-torch
might cause this conflict, you can try the following workaround:- Temporarily modify
pyproject.toml
: Open thepyproject.toml
file in the root of the ChemGraph project. - Find the line containing
"mace-torch>=0.3.13",
in thedependencies
list. - 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-torch
line if you still need it for other purposes in the same environment. Be aware thatmace-torch
might not function correctly due to thee3nn
version mismatch (e3nn>=0.5
will 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/UMA
model 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 login
or ensuringHF_TOKEN
is set and recognized.