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_ff needs a C++20 compiler (g++), and UMA on a GPU and --compile on a GPU also need gcc.

  • Libraries for Chrome. PNG, JPEG, SVG and PDF figures (energy-diagram, trj2fig, and the diagrams of all) are drawn by headless Chrome, which plotly_get_chrome -y downloads. 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:

  1. Load gcc and CUDA on HPC

    UMA on a GPU and hessian_ff compile code at run time and need gcc (C++20 for hessian_ff) and CUDA. On HPC, check module avail and 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-nvcc after step 2 and reactivate the environment.

  2. Create a conda environment with AmberTools and PyTorch

    On a cluster with a system AmberTools module, run module unload amber first 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>
    
  3. cyipopt and pydmf (DMF) The DMF method (--mep-mode dmf) in MEP search uses cyipopt, installed in step 2, and pydmf, which comes with mlmm-toolkit in step 5.

  4. Choose the PyTorch CUDA build

    Step 2 installs PyTorch built for CUDA 13.0 (cuda130). If the CUDA Version of nvidia-smi is below 13.0, write "pytorch=2.13.0=cuda129*" in step 2 instead. Check GPU access in step 8.

  5. Install mlmm-toolkit itself and Chrome for visualization

    pip install mlmm-toolkit
    plotly_get_chrome -y
    

    The libraries Chrome needs are system packages: see System prerequisites.

    The hessian_ff kernels are built automatically on first use. If the build fails, see hessian_ff build / import for a manual rebuild.

    On aarch64, the warp-lang 1.18.0 wheel, which UMA loads through fairchem-core, needs glibc 2.35 and stops the import with GLIBC_2.35' not found on older systems (ldd --version); on those systems, install warp-lang==1.17.0.

  6. 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:

  7. (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-models conflicts with UMA’s fairchem-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-torch pins e3nn==0.4.4, which conflicts with UMA’s fairchem-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 the cuda129 PyTorch 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).

  8. 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