Installation¶
mlmm-toolkit is intended for Linux environments (local workstations or HPC clusters), and production runs normally use a CUDA-capable GPU. The MM part needs AmberTools (tleap) to build the topology and a C++20 compiler for the hessian_ff kernels. The conda command below installs AmberTools.
Quick install¶
nvidia-smi shows CUDA Version at the top right of its output: the newest CUDA the driver supports. The commands below install the conda-forge PyTorch for CUDA 13.0 (cuda130); if the CUDA Version is below 13.0, replace cuda130 with cuda129.
Required¶
# 1) Create a conda environment with AmberTools, PDBFixer, cyipopt, xTB, and CUDA-enabled PyTorch
# 2) Install mlmm-toolkit
# 3) Install headless Chrome for Plotly static image export (PNG, JPEG, SVG, PDF)
# Downloads a Chromium binary; requires internet access.
conda create -n mlmm -c conda-forge python=3.12 \
ambertools=24.8 "numpy>=2,<2.5" pdbfixer \
cyipopt xtb "pytorch=2.13.0=cuda130*"
conda activate mlmm
pip install mlmm-toolkit
plotly_get_chrome -y
Image export (PNG, JPEG, SVG, PDF) needs operating-system libraries that pip and conda do not install; install them first if they are missing: System prerequisites.
Finally, log in to Hugging Face Hub so that UMA models can be downloaded. Logging in needs a free HF account with a read-only token. Accept the FAIR Chemistry License v1 at https://huggingface.co/facebook/UMA first:
hf auth login
# or, with an access token in scripts:
hf auth login --token '<YOUR_ACCESS_TOKEN>' --add-to-git-credential
You only need to do this once per machine.
Check the installation with mlmm --version, which prints the installed version.
Optional¶
ORB, AIMNet2, MACE, and DFT are installed in step 7 of Step-by-step installation.
System prerequisites¶
pip install mlmm-toolkit does not install a compiler or the libraries Chrome needs. A workstation usually has them; a minimal container or a bare cluster node often does not.
A compiler.
hessian_ffneeds a C++20 compiler (g++), and UMA on a GPU and--compileon a GPU also needgcc.Libraries for Chrome. PNG, JPEG, SVG and PDF figures (
energy-diagram,trj2fig, and the diagrams ofall) are drawn by headless Chrome, whichplotly_get_chrome -ydownloads. Chrome loads the operating-system libraries below.
Ubuntu/Debian (on Ubuntu 22.04 and Debian 12, write libasound2 instead of libasound2t64; drop sudo if you are root):
sudo apt-get update
sudo apt-get install -y ca-certificates fonts-liberation libasound2t64 libatk-bridge2.0-0 \
libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libcurl4 libdbus-1-3 libexpat1 libgbm1 \
libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libudev1 libvulkan1 libx11-6 libxcb1 \
libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils
Rocky/RHEL:
sudo dnf install -y alsa-lib at-spi2-atk at-spi2-core atk ca-certificates cairo cups-libs \
dbus-libs expat glib2 gtk3 libX11 libXcomposite libXdamage libXext libXfixes libXrandr \
libgcc liberation-fonts libxcb libxkbcommon mesa-libgbm nspr nss nss-util pango systemd-libs \
vulkan-loader wget xdg-utils
Use the existing compiler. If gcc or CUDA is missing, load them from the system (on HPC, for example with module load). If the system has no C compiler or CUDA, or you do not want to use them, conda install -c conda-forge cuda-nvcc installs both into the environment; reactivate the environment afterwards. On HPC, ask the administrator for any missing Chrome libraries.
If a compiler or CUDA is missing, mlmm stops and prints these two options.
Step-by-step installation¶
If you prefer to build the environment piece by piece:
Load gcc and CUDA on HPC
UMA on a GPU and
hessian_ffcompile code at run time and need gcc (C++20 forhessian_ff) and CUDA. On HPC, checkmodule availand load the compiler and CUDA modules of the cluster:module load gcc cuda/<your-version> # e.g. cuda/12.6 or cuda/12.9
If the system has no C compiler or CUDA, or you do not want to use them, run
conda install -c conda-forge cuda-nvccafter step 2 and reactivate the environment.Create a conda environment with AmberTools and PyTorch
On a cluster with a system AmberTools module, run
module unload amberfirst so that it does not conflict with the conda AmberTools. PyTorch comes from conda-forge in the same command (choose its CUDA build as in step 4); do not install a pip PyTorch into this environment.conda create -n <your-env> -c conda-forge python=3.12 ambertools=24.8 "numpy>=2,<2.5" pdbfixer cyipopt xtb "pytorch=2.13.0=cuda130*" conda activate <your-env>
cyipopt and pydmf (DMF) The DMF method (
--mep-mode dmf) in MEP search uses cyipopt, installed in step 2, and pydmf, which comes withmlmm-toolkitin step 5.Choose the PyTorch CUDA build
Step 2 installs PyTorch built for CUDA 13.0 (
cuda130). If theCUDA Versionofnvidia-smiis below 13.0, write"pytorch=2.13.0=cuda129*"in step 2 instead. Check GPU access in step 8.Install
mlmm-toolkititself and Chrome for visualizationpip install mlmm-toolkit plotly_get_chrome -y
The libraries Chrome needs are system packages: see System prerequisites.
The
hessian_ffkernels are built automatically on first use. If the build fails, see hessian_ff build / import for a manual rebuild.On aarch64, the
warp-lang1.18.0 wheel, which UMA loads throughfairchem-core, needs glibc 2.35 and stops the import withGLIBC_2.35' not foundon older systems (ldd --version); on those systems, installwarp-lang==1.17.0.Log in to Hugging Face Hub (UMA model)
hf auth login
For license requirements and non-interactive login, see the Required section above.
Refer to the upstream projects for additional details:
fairchem / UMA: https://github.com/facebookresearch/fairchem, https://huggingface.co/facebook/UMA
Hugging Face token & security: https://huggingface.co/docs/hub/security-tokens
(Optional) Install additional MLIP backends and extras
mlmm-toolkit uses UMA by default. For another backend, install its package and select it with
-b/--backend(for example,-b orb):ORB:
orb-modelsconflicts with UMA’sfairchem-core; install it in a separate Python 3.12 environment built with steps 2-6.pip uninstall fairchem-core && pip install orb-models
AIMNet2:
pip install "mlmm-toolkit[aimnet]"
MACE:
mace-torchpinse3nn==0.4.4, which conflicts with UMA’sfairchem-core, so install it in a separate environment built with steps 2-6.pip uninstall fairchem-core && pip install mace-torch
DFT (
-b dft,--dft,mlmm dft):[dft]installs the CUDA 13 GPU4PySCF build on Linux x86_64; with thecuda129PyTorch build (step 4), install[dft-cuda12]instead. On aarch64, build GPU4PySCF from source. Without a GPU,[dft]still installs PySCF; run DFT with--dft-engine cpu.pip install "mlmm-toolkit[dft]"
For when to use DFT/MM and how to check an MLIP/MM TS with it, see Validate the MLIP TS structure with DFT. Two more extras are available:
[openmm](OpenMM as the MM backend) and[pdbfixer](PDBFixer through pip instead of conda).Verify installation
mlmm --version mlmm -h hf auth whoami
The first line should display the installed version, the second the list of subcommands, and the third your Hugging Face user name. To verify GPU access:
python -c "import torch; print('CUDA:', torch.cuda.is_available(), torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'N/A')"
If
CUDA: False, inspect the installed PyTorch build, scheduler GPU visibility, driver, and environment libraries before changing versions:python -m torch.utils.collect_env python -m pip check
Native MACE-POLAR embedding (optional)¶
To use --embedcharge with MACE-POLAR, install the following additional dependencies in the MACE environment from step 7. xTB is not required.
pip install 'mace-torch[polar]>=0.3.17' 'graph-longrange>=0.4.4'
System requirements¶
OS. Linux is recommended. Native Windows is not supported because AmberTools (tleap) is not available there.
Python. 3.12 (recommended) or 3.13 is required.
GPU / CUDA. An NVIDIA GPU whose driver supports the chosen PyTorch build (see Quick install); newer GPU architectures may need a newer build. CPU-only execution works but is usually much slower.
AmberTools and compiler. AmberTools (tleap) builds the topology in mm-parm and all; a matching --parm7 from an earlier run skips that step. The default hessian_ff MM backend needs a C++20 compiler (validated with GCC 13.3). PDBFixer is needed only for mm-parm --add-h.
VRAM, RAM, and disk. Memory depends on the backend, the atom count, and the Hessian mode, and the disk holds the environment, the model weights, the topology, and the trajectories and Hessians; for a very large system, run one representative calculation on the target node and watch the peak use.
Next steps¶
Getting Started — the shortest run, and which page to read next
Quickstart:
mlmm all— build an MEP from R and PQuickstart:
mlmm all --scan-lists— build a path from one structureQuickstart: TS-only mode — optimize and check a TS candidate
Validate the MLIP TS structure with DFT — refine and check the TS with DFT/MM
Common options and selectors — shared options, and how to specify residues and atoms
Device Configuration & HPC Setup — GPU settings and job scripts for clusters
Troubleshooting — common errors and what to try