Science and engineering
Machine learning for molecular simulation
Machine learning potentials learn energies and forces from quantum-chemistry calculations, then drive molecular dynamics at a fraction of the cost. Researchers use them to simulate reactions, materials and biomolecules with near reference accuracy over long trajectories.
How machine learning is used in molecular simulation
Neural network potentials for molecules
A network learns energies, and forces as their gradients, from quantum-chemistry calculations on many small configurations. It then replaces those calculations during molecular dynamics at a small fraction of the cost.
Real exampleANI-1 (Smith, Isayev and Roitberg, 2017)A neural network potential for organic molecules trained on DFT calculations, designed to give DFT-level accuracy at force-field computational cost.
Simulating very large systems
Because learned potentials scale roughly linearly with system size, they can reach millions of atoms and long timescales that direct quantum calculations cannot.
Real exampleDeep Potential at 100 million atoms (Jia et al., 2020)Showed that Deep Potential molecular dynamics, run with the GPU DeePMD-kit code on the Summit supercomputer, could simulate more than 100 million atoms with ab initio accuracy.
Data-efficient equivariant potentials
Equivariant graph networks build rotational symmetry into the model, so they reach high accuracy with far fewer expensive reference calculations.
Real exampleNequIP (Batzner et al., Nature Communications, 2022)Introduced an E(3)-equivariant graph neural network for interatomic potentials designed for data efficiency and accuracy.
General-purpose foundation potentials
Instead of fitting a new potential for each system, a single model trained on a broad dataset can run reasonable simulations across many chemistries, then be fine-tuned where higher accuracy is needed.
Real exampleMACE-MP-0 (Batatia et al., 2023)Trained a general-purpose model on a public dataset and demonstrated stable molecular dynamics across solids, liquids, gases, chemical reactions, interfaces and a small protein.
Can you learn machine learning for molecular simulation?
Yes, especially if you already run DFT or molecular dynamics. Learn Python, the maths of gradients and symmetry, regression and validation, then graph neural networks, and finally active learning for building training sets.
- PythonSet up and analyse simulations with ASE and similar Python tools.Learn it in Python
- Linear algebra and calculusForces are gradients of energy, and rotations and symmetry are linear algebra.Learn it in Maths
- Regression and validationFitting a potential is regression on energies and forces; split data by configuration and trajectory.Learn it in Machine Learning
- Graph neural networksEquivariant message-passing networks power most modern potentials.Learn it in Deep Learning
- Active learning and testing by simulationAdd training data where the model is uncertain, and judge models by running dynamics, not only by test-set error.
Moving into machine learning for molecular simulation
If you already work in the field
Computational chemists and physicists already run DFT and molecular dynamics and know what a healthy trajectory looks like. Learn PyTorch basics, then fit a potential with an open package such as DeePMD-kit, NequIP or MACE for a system you have studied. Research groups and pharmaceutical, chemical and materials companies use these potentials.
If you come from data science or ML
Machine learning engineers need statistical mechanics basics, how molecular dynamics integrates the equations of motion and what DFT reference data represents. Errors that look small on a test set can still make simulations unstable, so learn to judge models by running dynamics.
Roles that do this workComputational chemistMolecular dynamics scientistMachine learning scientist, atomistic modellingResearch software engineer
Tools you will use
| Tool | What you use it for |
|---|---|
| MACE | Train equivariant machine learning force fields from energies and forces. |
| SchNetPack | Train neural network potentials and run learned molecular dynamics. |
| ASE | Run molecular dynamics with a learned calculator and analyse trajectories. |
| OpenMM | Run fast molecular simulations and reference classical force fields. |
Public data to practise on
- Revised MD17 (rMD17): Molecular dynamics configurations of small organic molecules with recomputed energies and forces.
- SPICE: Quantum-chemistry energies and forces for drug-like molecules and peptides for training general potentials.
Your first project
Download rMD17, fit energies and forces for one molecule with a small MACE model, and compare a model trained on a few dozen configurations with one trained on a thousand using force MAE and a short MD stability test.
Common questions
What is a machine learning interatomic potential?
It is a model that predicts the energy of a set of atoms, and the forces as gradients of that energy, after training on quantum-mechanical calculations. It replaces the expensive calculation during molecular dynamics.
Are machine learning potentials as accurate as DFT?
Within the kinds of structures they were trained on, they can come close to their DFT reference at much lower cost. Outside that range they can fail badly, so validation on new configurations is essential.
How is an ML potential different from a classical force field?
Classical force fields use fixed functional forms with few parameters and usually cannot describe bond breaking. ML potentials learn flexible functions from reference data and can describe reactions, at a cost above classical force fields but far below quantum chemistry.
Which software should I learn for ML potentials?
ASE and LAMMPS for running simulations, plus one potential package such as DeePMD-kit, NequIP or MACE. Most are trained through Python.
Courses for these skills
- Deep Learning with PyTorchStudy sequence models and neural optimisation.Syllabus available · lessons open as produced
- Maths for Machine LearningConnect state vectors, derivatives and dynamical behaviour.26 published lessons · all planned lessons open
- Practical Machine Learning in PythonLearn regression and representation comparisons.51 published lessons · more lessons in production
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.