LoupMD¶
LoupMD runs molecular dynamics with pretrained MACE potentials on NVIDIA GPUs. The model, the neighbour list and the integrator run in one C++/CUDA engine, and a whole MD step is replayed as a CUDA graph. The Python package is the front end: it loads a model by label, exports it to the engine's format, checks it against PyTorch MACE, and writes the trajectory and a report.
import loupmd as lm
result = lm.md("structure.cif", model="omat0-medium", temperature_K=300, steps=10_000, output="run")
print(result.summary)
The same run from the command line is loupmd md structure.cif --model omat0-medium --temperature 300 --steps 10000;
the quickstart shows it with the CLI, Python and ASE side by side.
Install¶
pip install "loupmd[export]"
loupmd doctor
LoupMD is on PyPI. It needs Linux x86_64 or WSL2, an NVIDIA GPU of compute capability 8.0 or newer and Python 3.10 or newer; install has the details. The releases on GitHub hold each version's files with their checksums, and the changelog lists what each version brought.
What it does¶
- NVT, NVE and NPT molecular dynamics with the thermostats and barostats of ASE, on the GPU (integrators).
- Relaxation of positions and of the cell (relaxation).
- Monte Carlo swaps, transmutations and displacements between MD steps (Monte Carlo).
- Cells too large for the GPU, split into tiles (large cells).
- The D3 dispersion correction (dispersion).
- An ASE calculator and drop-in ASE MD classes (ASE).
- LAMMPS:
pair_style loupmd,pair_style loupmd/kkandrun_style loupmd, in the package ML-LOUPMD of the repository'slammps/folder (GPL-2.0, built into LAMMPS, not in the wheel; its guide). - Direct loading of pre-built
.loupbundles (lm.load("finetuned.loup"), zero PyTorch needed; models). - LoupGYM (
loupgym): companion training package for pure-CUDA foundation MACE fine-tuning (loupgym finetune, ~20× faster than PyTorch+CuEq) and automatic student distillation (loupgym distill,< 0.05 µs/atomMD students); see LoupGYM.
Accuracy¶
Every model runs in float32 on the engine. Before a run, LoupMD can compare energies, forces and stress with PyTorch MACE in float64 on rattled copies of your structure: the accuracy gate allows three times the error of float32 MACE. See models for the supported families and the gate.
Coming from FastMACE¶
LoupMD keeps FastMACE's names and arguments wherever a feature exists in both. Coming from FastMACE lists the few changes a FastMACE script needs, and what LoupMD leaves out the FastMACE features that LoupMD refuses.