Make MLIP dependencies optional for HPC compatibility
Problem
ChemGraph currently includes MLIP packages (MACE) in pyproject.toml. This works for local installations, where pip can manage the PyTorch version and related dependencies.
However, this causes problems on HPC systems, particularly Aurora. On Aurora, users must load the system-provided PyTorch environment through:
This PyTorch build is configured for Intel GPU/XPU support. Installing MACE, FairChem, or ChemGraph through pip may replace or conflict with the system-provided PyTorch version. As a result, the MLIP packages may only work on CPUs or may fail due to incompatible dependencies.
This is likely a broader issue across HPC systems, where PyTorch builds are selected and optimized for specific hardware and software environments.
Proposed direction
Keep the core ChemGraph installation lightweight:
- Remove MACE, FairChem, and other MLIP packages from the required dependencies.
- Retain TBLite/xTB as the default lightweight computational backend for demonstrations and basic testing.
- Provide MLIP integrations as optional dependencies. Local deployment can still install these dependencies.
- Recommend that HPC users configure the appropriate PyTorch environment and install the desired MLIP packages separately before installing ChemGraph.
For example, the recommended installation order on an HPC system could be:
- Load the system-provided PyTorch environment.
- Install MACE, FairChem, or other required MLIP packages in a compatible environment.
- Install ChemGraph without modifying the existing PyTorch installation.
Possible dependency structure
[project.optional-dependencies]
mace = [
"mace-torch",
]
fairchem = [
"fairchem-core",
]
mlips = [
"mace-torch",
"fairchem-core",
]
We should also ensure that ChemGraph imports these packages only when the corresponding tools are used and provides a clear error message when an optional dependency is unavailable.
Make MLIP dependencies optional for HPC compatibility
Problem
ChemGraph currently includes MLIP packages (MACE) in
pyproject.toml. This works for local installations, wherepipcan manage the PyTorch version and related dependencies.However, this causes problems on HPC systems, particularly Aurora. On Aurora, users must load the system-provided PyTorch environment through:
This PyTorch build is configured for Intel GPU/XPU support. Installing MACE, FairChem, or ChemGraph through
pipmay replace or conflict with the system-provided PyTorch version. As a result, the MLIP packages may only work on CPUs or may fail due to incompatible dependencies.This is likely a broader issue across HPC systems, where PyTorch builds are selected and optimized for specific hardware and software environments.
Proposed direction
Keep the core ChemGraph installation lightweight:
For example, the recommended installation order on an HPC system could be:
Possible dependency structure
We should also ensure that ChemGraph imports these packages only when the corresponding tools are used and provides a clear error message when an optional dependency is unavailable.