A minimal molecular dynamics driver using machine-learning interatomic potentials (MLIPs) via the ASE framework.
minimd.py runs a two-stage simulation on an input atomic structure:
- Geometry relaxation — FIRE optimizer minimizes forces until convergence (
fmax) - NVT thermalization — Langevin dynamics at a target temperature for a set number of steps
Trajectories are saved as both .traj (ASE binary) and .xyz files under a subdirectory named after the chosen model.
| Flag | Model |
|---|---|
mace |
MACE-MP — MACE reference implementation (medium, float64). Paper: NeurIPS 2022 (OpenReview) https://openreview.net/forum?id=YPpSngE-ZU. Foundation model paper (JCP 2025): https://pubs.aip.org/aip/jcp/article/163/18/184110/3372267/A-foundation-model-for-atomistic-materials. |
nequip |
NequIP — E(3)-equivariant potentials; pre-trained models at https://www.nequip.net. Paper: Nature Communications 2022, DOI: https://doi.org/10.1038/s41467-022-29939-5. |
allegro |
Allegro — scalable equivariant interatomic potentials. Paper: Nature Communications 2023, DOI: https://doi.org/10.1038/s41467-023-36329-y |
mattersim |
MatterSim — Microsoft universal MLIP. |
sevennet |
SevenNet |
upet |
UPET — universal PET model. Paper (Nature Communications 2025): https://www.nature.com/articles/s41467-025-65662-7. |
uma |
UMA via FAIRChem — Meta universal models for atoms. |
python minimd.py [-c CONFIG] [-m MODEL] [-f FMAX] [-s STEPS] [-t TEMPERATURE]
| Option | Default | Description |
|---|---|---|
-c, --config |
sio2.xyz |
Input structure file (any ASE-readable format; .lammpstrj auto-detected as LAMMPS data) |
-m, --model |
mace |
MLIP backend (see table above) |
-f, --fmax |
2.0 |
Force convergence threshold for relaxation (eV/Å) |
-s, --steps |
1000 |
Number of MD steps |
-t, --temperature |
300.0 |
Target temperature for Langevin thermostat (K) |
python minimd.py -c sio2.xyz -m mace -f 0.05 -s 5000 -t 1000All output is written to <model>/:
| File | Contents |
|---|---|
minimd.log |
General log |
md.log |
Per-step MD energies/temperatures |
relax.traj / relax.xyz |
Relaxation trajectory |
md.traj / md.xyz |
MD trajectory |
- Python >= 3.11
- ASE >= 3.28
- PyTorch >= 2.11
- MACE-torch >= 0.3.15 (required for
macemodel; others are optional)
GPU acceleration is used automatically when CUDA is available.
This project uses a uv lockfile (uv.lock) to pin Python dependencies. Recommended steps to create a reproducible environment:
-
Ensure Python 3.11+ and pip are installed.
-
Install the uv CLI if not present:
pip install uv
-
Sync the environment from the lockfile (creates and installs into a virtual environment):
uv sync
-
Activate the created venv (if uv places it at .venv):
- macOS / Linux: source .venv/bin/activate
- Windows (PowerShell): ..venv\Scripts\Activate.ps1
If uv creates the environment at another path, follow uv's output to activate it. For GPU support, install the appropriate CUDA build of PyTorch following https://pytorch.org/ after syncing.
-
MACE
- Repository: https://github.com/ACEsuit/mace
- Paper (NeurIPS 2022): https://openreview.net/forum?id=YPpSngE-ZU
- Foundation model paper (JCP 2025): https://pubs.aip.org/aip/jcp/article/163/18/184110/3372267/A-foundation-model-for-atomistic-materials
- Code / release DOI: https://doi.org/10.5281/zenodo.14103332
-
NequIP
- Repository: https://github.com/mir-group/nequip
- Paper (Nature Communications 2022): https://doi.org/10.1038/s41467-022-29939-5
- Code / release DOI: https://doi.org/10.5281/zenodo.18200066
- Docs: https://nequip.readthedocs.io/
-
Allegro
- Repository: https://github.com/mir-group/allegro
- Paper (Nature Communications 2023): https://doi.org/10.1038/s41467-023-36329-y
- Docs: https://allegro.readthedocs.io/
-
MatterSim
- Project page: https://microsoft.github.io/mattersim/
-
UPET (PET)
- Paper (Nature Communications 2025): https://www.nature.com/articles/s41467-025-65662-7
-
UMA
-
SevenNet
- Canonical project page / publication DOI: TBD