Installation¶
ALIGNN supports Linux, macOS, and Windows with Python 3.10.
Prerequisites¶
Install Miniconda from https://conda.io/miniconda.html. Pick the installer matching your OS:
On Windows, use the 64-bit Python 3.10 Miniconda installer.
Method 1 — conda (recommended)¶
conda create --name my_alignn python=3.12 -y
conda activate my_alignn
conda install -c dglteam/label/th24_cu124 dgl
conda install alignn -y
Method 2 — from GitHub (development install)¶
conda create --name my_alignn python=3.12 -y
conda activate my_alignn
conda install -c dglteam/label/th24_cu124 dgl
git clone https://github.com/atomgptlab/alignn
cd alignn
python -m pip install -e .
Method 3 — pip¶
If you prefer pip, install DGL first from the wheel index that matches your CUDA/PyTorch version (see https://www.dgl.ai/pages/start.html).
PyTorch 2.1 + CUDA 12.1 (Windows/Linux):
CPU only:
Verifying your install¶
All three are Python executable scripts installed to your environment's bin/ directory
— you do not need to provide an absolute path.
Common issues¶
DGL + CUDA mismatches
The most common install problem is a DGL build that does not match your CUDA version.
If you see import errors about libtorch_cuda.so or similar, reinstall DGL from the
wheel index matching your CUDA driver.
- Use
batch_sizeof 32 or 64 for real trainings (the examples ship withbatch_size: 2). - Complex
.cifand.pdbfiles may requirecif2cell==2.0.0a3andpytrajrespectively. pandas >= 1.2.3is required.- From March 2024,
pytorch-igniteis no longer required (removed for conda-forge compatibility).
See the Notes & FAQ for more tips.