ML for Materials Science · Week 12 · Lecture 12

Machine-Learned Interatomic Potentials

Learn the energy of every arrangement of atoms, take its slope to get the forces, and run near-DFT molecular dynamics for nanoseconds.
Undergraduate course · 16 weeks
atomic positions (one path through 3N dimensions) energy E
Recap · lecture 11

Last time: graph neural networks for crystals

1
Crystal graph: atoms are nodes; neighbours within a cutoff (with periodic images) are edges; each distance is expanded in Gaussians.
2
Message passing: every atom updates its feature vector from its neighbours' messages, a few times in a row.
3
Readout: a sum or mean over atoms gives one number per crystal, the same for any ordering of the atoms.
4
Invariant vs equivariant: energy is a scalar; forces are vectors that turn with the crystal. On about 10⁵ structures: formation energy MAE about 0.02–0.04 eV/atom.

What it left open

A graph network gave one energy for one relaxed structure. To watch atoms move we need the energy of every arrangement and the force on every atom, millions of times in a row.

\[ E(\mathbf r_1,\dots,\mathbf r_N) \quad\text{and}\quad \mathbf F_i = -\nabla_{\mathbf r_i} E \]

Today: potential-energy surface → forces → locality → symmetry functions, GAP, equivariant and universal potentials → molecular dynamics → diffusion and ionic conductivity.

Why questions · answered at the end

Four puzzles for today

WHY 1

One DFT calculation of a 64-atom cell gives one energy. Why do people say it gives 193 training labels?

WHY 2

A potential with tiny test errors at room temperature lets two atoms fuse together at 1500 K. How can that happen?

WHY 3

Why can a model trained on cells of about 100 atoms simulate a million atoms?

WHY 4

DFT molecular dynamics of a Li conductor gives an activation energy. Why can its room-temperature conductivity still be off by a factor of ten?

The object we want to learn

The potential-energy surface (PES)

position along a path of the atoms (e.g. one ion hopping) energy E
\[ E = E(\mathbf r_1, \mathbf r_2, \dots, \mathbf r_N) \quad\text{: a function of } 3N \text{ numbers} \]
methodtime per energy + forces, ~100 atomsscaling
DFTminutes to hours on many cores~N³
classical potentialwell under a millisecond~N
ML potentialmilliseconds~N

Orders of magnitude only; they depend strongly on code, hardware and element.

Supercomputer rack
A supercomputer rack: where DFT energies come from. CINECA, CC BY 2.0
Math primer · the gradient of a distance

Force = minus the gradient of the energy

1
Distance between atoms i and j:\[ r_{ij} = |\mathbf r_i - \mathbf r_j| = \sqrt{(x_i-x_j)^2 + (y_i-y_j)^2 + (z_i-z_j)^2} \]
2
Differentiate with respect to xi (chain rule on the square root):\[ \frac{\partial r_{ij}}{\partial x_i} = \frac{2(x_i-x_j)}{2\,r_{ij}} \;\Rightarrow\; \nabla_{\mathbf r_i} r_{ij} = \frac{\mathbf r_i - \mathbf r_j}{r_{ij}} = \hat{\mathbf r}_{ij} \]
The gradient of a distance is a unit vector pointing from j to i.
3
Any function of the distance: \(\nabla_{\mathbf r_i} V(r_{ij}) = V'(r_{ij})\,\hat{\mathbf r}_{ij}\).
Chain rule again: outer derivative times inner gradient.
4
Force on atom i:\[ \mathbf F_i = -\nabla_{\mathbf r_i} E \qquad [\text{eV/Å}],\quad 1\ \text{eV/Å} = 1.602\ \text{nN} \]
Minus sign: the force points downhill in energy.

Check: Newton's third law

\(\nabla_{\mathbf r_j} r_{ij} = -\hat{\mathbf r}_{ij}\), so a pair pushes its two atoms with equal and opposite forces. The forces of any energy that depends only on distances sum to zero.

Derivation · forces from a pair potential

Lennard-Jones: from energy to force in four steps

1
Pair model: \(E = \sum_{i<j} V(r_{ij})\), each pair counted once.
Simplest possible potential: energy depends only on pair distances.
2
Lennard-Jones form (well depth ε, minimum at rm):\[ V(r) = \varepsilon\left[\Big(\frac{r_m}{r}\Big)^{12} - 2\Big(\frac{r_m}{r}\Big)^{6}\right] \]
r⁻¹² repulsion (overlapping electron clouds), r⁻⁶ van der Waals attraction.
3
Differentiate (power rule):\[ V'(r) = -\frac{12\,\varepsilon}{r}\left[\Big(\frac{r_m}{r}\Big)^{12} - \Big(\frac{r_m}{r}\Big)^{6}\right] \]
4
Force on atom i (primer, step 3):\[ \mathbf F_i = \sum_{j\ne i} \frac{12\,\varepsilon}{r_{ij}}\left[\Big(\frac{r_m}{r_{ij}}\Big)^{12} - \Big(\frac{r_m}{r_{ij}}\Big)^{6}\right]\hat{\mathbf r}_{ij} \]
Positive bracket: pushed away from j. Negative: pulled towards j.
distance r (Å)

Sanity checks

At r = rm the force is zero (the bottom of the well) and V = −ε. Closer than rm: repulsion. Far away: attraction that fades as r⁻⁷. Units: ε/r gives eV/Å.

Worked problem 1 · by hand

Forces in a chain of three argon-like atoms

Given: ε = 10.4 meV, rm = 3.82 Å (argon-like). Atoms on a line: A at 0, B at 3.6 Å, C at 8.1 Å. Find the force on each atom.

pair, r (Å)(rm/r)⁶(rm/r)¹²V (meV)12ε/r·[…] (meV/Å)
A–B, 3.61.42752.0377−8.50+21.15 push
B–C, 4.50.37420.1400−6.33−6.49 pull
A–C, 8.10.01100.0001−0.23−0.17 pull
1
A–B at 3.6 Å: 3.82/3.6 = 1.0611; to the 6th power 1.4275, squared 2.0377.\[ V = 10.4\,(2.0377 - 2\times1.4275) = -8.50\ \text{meV} \]
2
Force factor:\[ \frac{12\times10.4}{3.6}\,(2.0377 - 1.4275) = 34.67\times0.6102 = +21.15\ \text{meV/Å} \]
Positive: closer than rm, so A and B push each other apart.
3
Force on B (+ = to the right): A pushes it right, C pulls it right:\[ F_B = +21.15 + 6.49 = +27.6\ \text{meV/Å} \]
4
Check: forces on A and C, then the sum:\[ F_A = -21.15 + 0.17 = -20.98, \quad F_C = -6.49 - 0.17 = -6.66 \]\[ F_A + F_B + F_C = -20.98 + 27.64 - 6.66 = 0.00 \]
Newton's third law holds. The A–C pair at 8.1 Å matters little: beyond a cutoff we could drop it.
The key assumption of every ML potential

Locality: the energy is a sum of atomic energies

Schematic. Teal: neighbours inside the cutoff sphere of the red atom.

1
Assume locality: atom i's energy depends only on neighbours within a cutoff rc ≈ 5–6 Å.\[ E = \sum_{i=1}^{N} E_i\big(\{\mathbf r_j - \mathbf r_i : r_{ij} < r_c\}\big) \]
Electrons screen distant atoms ("nearsightedness").
2
Extensive by construction: twice the crystal, twice the energy.
So a model trained on 100-atom cells applies to a million atoms (lecture 11's sum readout).
3
Forces stay local: \(\mathbf F_k = -\sum_i \nabla_{\mathbf r_k} E_i\), and only atoms within rc of k contribute.
Cost grows like N, not N³.
4
How many neighbours? Cu: n = 4/(3.615 Å)³ = 0.0847 Å⁻³;\[ \tfrac43\pi r_c^3\, n = \tfrac43\pi\,(5\ \text{Å})^3\times0.0847 \approx 44 \quad(\text{shells: } 12 + 6 + 24 = 42) \]

What the model can and cannot capture

Anything decided within rc. Not long-range electrostatics or charge transfer across a cell: add an explicit Coulomb term, or let message passing extend the range (each layer reaches one more rc).

Method 1 · Behler–Parrinello neural network potentials (2007)

Symmetry functions: a fingerprint of each neighbourhood

1
Smooth cutoff (goes to zero with zero slope at rc):\[ f_c(r) = \tfrac12\left[\cos\!\Big(\frac{\pi r}{r_c}\Big) + 1\right] \text{ for } r < r_c,\ \text{else } 0 \]
No jump in energy or force when a neighbour crosses rc.
2
Radial symmetry function (γ is a width; Behler writes η):\[ G_i = \sum_{j} e^{-\gamma\,(r_{ij} - r_s)^2}\, f_c(r_{ij}) \]
A smoothed count of neighbours near distance rs. Distances only, summed over j: invariant to shifts, rotations and relabelling.
3
Angular functions add bond angles θijk (three-body information).
4
Fingerprint → network: ~50 values of G per atom → one small neural network per element → Ei; then E = Σ Ei.
neighbour distance r (Å)
neighbour r (Å)2.02.63.44.8
fc(r)0.6550.4690.2320.004
e−(r−2.5)²0.7790.9900.4450.005
term0.5100.4640.1030.000
\[ G = 0.510 + 0.464 + 0.103 + 0.000 = 1.08 \quad (r_c = 5\ \text{Å},\ \gamma = 1\ \text{Å}^{-2},\ r_s = 2.5\ \text{Å}) \]
Method 2 · Gaussian approximation potentials (link: lecture 4)

GAP: a Gaussian process on atomic environments

1
Descriptor qi of atom i's environment (e.g. SOAP, lecture 3), and a kernel k(qi, qm) between environments.
2
GP prediction of the atomic energy, as in lecture 4:\[ E_i = \sum_{m=1}^{M} \alpha_m\, k(\mathbf q_i, \mathbf q_m) \]
A weighted sum of bumps on M representative environments.
3
We only see totals E = Σi Ei: a sum of Gaussians is Gaussian, so the kernel between two structures A and B is \(\sum_{i\in A}\sum_{j\in B} k(\mathbf q_i,\mathbf q_j)\).
4
Forces = −∂/∂r of the kernel sums: still linear in α, so they enter the same fit. The GP variance flags new environments.
dimer distance r (Å)

What the model learned

A smooth fit of 7 DFT-like dimer energies (simulated from the argon-like LJ curve). Between the data: error under 0.5 meV. At r = 3.0 Å (no data): GP −1 ± 10 meV (95 % band), truth +100 meV. No repulsion was learned; the error bar widens but cannot rescue it.

Method 3 · equivariant message-passing potentials

NequIP and MACE: features that turn with the structure

Schematic: rotate the atoms by 60°. The energy stays the same; every force vector rotates by 60°.

1
Invariant models (Behler–Parrinello, GAP, SchNet-type graph networks): features use only distances and angles.
Safe, but directional information is squeezed into scalars.
2
Equivariant features: each atom also carries vectors and higher tensors, built from bond directions \(\hat{\mathbf r}_{ij}\); for a rotation R:\[ E(R\mathbf r) = E(\mathbf r), \qquad \mathbf F(R\mathbf r) = R\,\mathbf F(\mathbf r) \]
Forces are still \(-\nabla E\); the vector features describe directions better.
3
NequIP (Batzner et al., 2022): equivariant message passing (lecture 11). MACE (Batatia et al., 2022): many-body messages, only two layers, fast.
4
Why it pays: reported to reach a given accuracy with far fewer training structures than invariant models: steeper learning curves.

What the model learned

The same thing as before, a local energy, but the symmetry of physics is built in, so no data are wasted on learning that a rotated crystal is the same crystal.

Method 4 · universal (foundation) potentials

One potential for (almost) the whole periodic table

modelarchitecturetrained onnote
M3GNet (Chen & Ong, 2022)graph network with three-body termsMaterials Project relaxation trajectories, order 10⁵ structuresone of the first broad universal potentials
CHGNet (Deng et al., 2023)graph network + magnetic momentsMPtrj: about 1.5 × 10⁶ structures, about 1.5 × 10⁵ materialsmoments as a proxy for charge state
MACE-MP-0 (Batatia et al., 2023)MACE (equivariant)MPtrjstable MD for many chemistries

Good for

Any element combination out of the box: quick relaxations, screening thousands of candidates, first MD runs, starting point for your own model.

Watch out

Labels are PBE-DFT, so DFT errors are inherited (lecture 1). Training data are mostly near equilibrium, so far from it these models have been reported to be too soft: forces and barriers too small. Fine-tune on tens to hundreds of DFT structures of your system.

Training · loss on energies and forces

Why forces are the most valuable labels

1
Loss over M training structures (structure s has Ns atoms):\[ L = \frac1M\sum_{s}\Big[ w_E \Big(\frac{\hat E_s - E_s}{N_s}\Big)^2 + \frac{w_F}{3N_s}\sum_{i}\big|\hat{\mathbf F}_{i,s} - \mathbf F_{i,s}\big|^2 \Big] \]
Energy per atom, so big cells do not dominate; wE, wF tuned by validation.
2
Predicted forces by automatic differentiation (PyTorch autograd, lecture 9): \(\hat{\mathbf F}_i = -\nabla_{\mathbf r_i}\hat E\).
Forces are then exact slopes of one energy: energy is conserved in MD.
3
Count the labels: one structure gives 1 energy and 3N force components. 100 cells × 64 atoms → 100 energies but 19 200 force components.

What the forces teach

Each force is the local slope of the surface: how the energy changes if one atom moves. That is information about every neighbour, for free in a DFT run.

dimer distance r (Å)

Toy: model \(E(r) = A/r^{12} - B/r^{6}\), one DFT-like calculation at r = 4.0 Å. Its energy, −9.79 meV, is matched by every curve shown (B from 0.7 to 1.3 × true); their forces at 4.0 Å range from −12.8 to +1.4 meV/Å. Adding the force (−5.71 meV/Å) fixes B: the thick curve.

Molecular dynamics in one slide

Molecular dynamics: Newton's law, step by step

1
Newton: \(m_i\,\mathbf a_i = \mathbf F_i = -\nabla_{\mathbf r_i} E\).
The potential supplies F at every step.
2
Velocity Verlet (Verlet 1967; velocity form Swope et al. 1982):\[ \mathbf r(t+\Delta t) = \mathbf r + \mathbf v\,\Delta t + \frac{\mathbf F(t)}{2m}\Delta t^2 \]\[ \mathbf v(t+\Delta t) = \mathbf v + \frac{\mathbf F(t) + \mathbf F(t+\Delta t)}{2m}\,\Delta t \]
One force call per step; time-reversible and symplectic: the energy fluctuates slightly but does not drift.
3
Time step: a small fraction of the fastest vibration period, typically Δt ≈ 1–2 fs. A thermostat (e.g. Langevin) holds the temperature.
4
Cost: 1 ns = 10⁶ steps. At ~1 min per DFT step: about 1.9 years. At ~10 ms per ML step: about 2.8 hours.
time (fs)
Snapshot of a molecular dynamics simulation of solid argon
MD of solid argon at 50 K (Lennard-Jones). C. Rowley, CC BY-SA 4.0

Energy check

Argon-like dimer, period ≈ 1.6 ps: Δt = 10 fs keeps the energy constant; Δt = 250 fs creates energy and the dimer flies apart.

Derivation · diffusion from the mean-square displacement

Random hops give ⟨r²⟩ = 6Dt

Schematic random walk of one ion (n = 60 hops, drawn in 2-D).

1
Displacement after n hops of length a in random directions: \(\mathbf R = \sum_{k=1}^{n} \mathbf a_k\).
2
Square and average:\[ \langle R^2\rangle = \sum_k \langle \mathbf a_k\cdot\mathbf a_k\rangle + \sum_{k\ne l}\langle \mathbf a_k\cdot\mathbf a_l\rangle = n\,a^2 + 0 \]
Independent hops: cross terms average to zero.
3
Hops happen at rate Γ: n = Γt, so \(\langle R^2\rangle = \Gamma a^2\, t\): linear in time.
4
Link to D: in 1-D, ⟨x²⟩ = 2Dt (the rms length √(2Dt) of Electrochemistry lecture 4); three independent axes add:\[ \langle r^2\rangle = 6Dt \quad\Rightarrow\quad D = \frac{\Gamma a^2}{6} \]
5
In MD: MSD(t) = average over ions and time origins of \(|\mathbf r_i(t_0+t) - \mathbf r_i(t_0)|^2\); D = slope / 6 of the straight part.
From D to an activation energy and a conductivity

Arrhenius and Nernst–Einstein

1
Hops are thermally activated (Boltzmann tail): Γ = ν e−Ea/kBT, so\[ D = D_0\, e^{-E_a/k_BT}, \qquad D_0 = \nu a^2/6 \]
2
Take the logarithm: \(\ln D = \ln D_0 - \dfrac{E_a}{k_B}\cdot\dfrac1T\), a straight line in 1/T.
3
Two temperatures: divide D₂ by D₁; D₀ cancels:\[ E_a = \frac{k_B\,\ln(D_2/D_1)}{1/T_1 - 1/T_2} \]
4
Nernst–Einstein (n ions per volume, charge ze; here n is an ion density and σ the conductivity, not the noise σ):\[ \sigma = \frac{n\,z^2e^2\,D}{k_BT} \]
Assumes ions hop independently (correlations add a "Haven ratio").

Physical meaning: the exponent amplifies errors

An error δEa multiplies D(300 K) by exp(δEa/kBT): 0.05 eV → a factor of 6.9. Barriers must be right to a few hundredths of an eV.

Materials example · Li-ion diffusion in a solid electrolyte (simulated data)

MSD curves at four temperatures

time lag t (ps) Li mean-square displacement (Ų)

Simulated, clearly labelled

56 Li ions (one garnet-like cell) hopping 2.0 Å at random, with Ea = 0.35 eV built in, plus thermal rattling. Stands in for 1 ns of ML-potential MD at each temperature. Same Ea and σ range as the LLZO row of Electrochemistry lecture 4.

T (K)D from slope (Ų/ps)built-in D
6000.00600.0054
8000.02870.0293
10000.08590.0809
12000.1580.159
Schematic of an all-solid-state battery with a solid electrolyte
All-solid-state battery: Li⁺ must cross the solid electrolyte. Luca Bertoli, CC BY-SA 4.0
Materials example · Arrhenius plot and a baseline

Long ML-potential runs versus a short DFT-MD budget

1000 / T (K⁻¹) D (Ų/ps, log scale)
run per TEa (eV)spread, 20 repeatsσ(300 K) (S/cm)
1 ns (ML potential)0.34± 0.0151.3 × 10⁻⁴
20 ps (DFT budget)0.36± 0.050.6 × 10⁻⁴
built in0.35—1.0 × 10⁻⁴

Over 20 repeated studies, the extrapolated D(300 K) lands between 0.4 and 2.4 × the built-in value with 1 ns runs, but between 0.06 and 8 × with 20 ps runs: few hops, noisy slopes, and the long extrapolation amplifies the noise.

What the ML potential bought

Statistics. Long runs mean many hops and a precise Ea. It does not remove the potential's own error: that must be checked against DFT (next slide).

Worked problem 2 · by hand

From MSD slopes to a room-temperature conductivity

1
D from the slope (800 K fit line): MSD = 19.1 Ų at 100 ps and 44.9 Ų at 250 ps.\[ \text{slope} = \frac{44.9 - 19.1}{150\ \text{ps}} = 0.172\ \tfrac{\text{Å}^2}{\text{ps}}, \qquad D = \frac{0.172}{6} = 0.0287\ \tfrac{\text{Å}^2}{\text{ps}} \]
Two points on the line, not MSD/t: rattling adds an offset. 1 Ų/ps = 10⁻⁴ cm²/s, so D = 2.9 × 10⁻⁶ cm²/s.
2
Ea from two temperatures: D = 0.0060 Ų/ps at 600 K and 0.16 Ų/ps at 1200 K. Ratio 26.7, ln 26.7 = 3.28, and 1/600 − 1/1200 = 1/1200 K⁻¹:\[ E_a = 8.617\times10^{-5}\times3.28\times1200 = 0.34\ \text{eV} \]
3
Extrapolate from 600 K to 300 K (D₀ cancels): Ea/kB = 3946 K, and 3946 × (1/300 − 1/600) = 6.58:\[ D_{300} = 0.0060\times e^{-6.58} = 0.0060\times1.39\times10^{-3} \]\[ = 8.3\times10^{-6}\ \text{Å}^2/\text{ps} \]
= 8.3 × 10⁻¹⁰ cm²/s: about 3500 times slower than at 800 K.
4
Nernst–Einstein: n = 2.57 × 10²² cm⁻³ (56 Li in a 12.97 Å cell); e²/(kB · 300 K) = 6.2 × 10⁻¹⁸ C²/J:\[ \sigma = 2.57\times10^{22}\times6.2\times10^{-18}\times8.3\times10^{-10} \]\[ = 1.3\times10^{-4}\ \text{S/cm} \]

Sanity check

Units: cm⁻³ · C²/J · cm²/s = S/cm. The size matches garnet electrolytes (about 10⁻⁴ to 10⁻³ S/cm). But ± 0.05 eV in Ea would change it by a factor of 7.

Validation · checking a potential against DFT

Trust a potential only where it has been tested

DFT force component (eV/Å) ML force component (eV/Å)
1
Held-out parity of energies (meV/atom) and forces (eV/Å). Compare with the zero-force baseline: MAE 0.59 → 0.049 eV/Å on configurations like the training set (simulated).
2
Physical properties vs DFT: lattice parameter, elastic constants, phonon frequencies (the curvature of the surface), barriers.
3
MD sanity: energy conserved without a thermostat; no atoms closer than physically possible; stable for the whole run.
4
Extrapolation warning: new temperature, surface or composition? Watch the GP variance or the disagreement of a committee of models, and add DFT data there.

What the model learned

The surface only where the data were. In an unseen hotter regime the same model gives MAE 0.42 eV/Å and forces about 20 % too soft.

Lab 12 · this week in Colab (CPU is enough)

Run ML-potential MD and measure a diffusion coefficient

import numpy as np
from ase import units, io
from ase.md.langevin import Langevin
from ase.md import velocitydistribution as vd
from mace.calculators import mace_mp
atoms = io.read("llzo_cell.cif")    # 192 atoms, given
atoms.calc = mace_mp(model="small", device="cpu")
vd.MaxwellBoltzmannDistribution(atoms, temperature_K=1000)
dyn = Langevin(atoms, 2 * units.fs, temperature_K=1000,
               friction=0.01 / units.fs)
dyn.run(2500)                           # 5 ps equilibration
li = [a.index for a in atoms if a.symbol == "Li"]; traj = []
dyn.attach(lambda: traj.append(atoms.positions[li].copy()),
           interval=50)
dyn.run(5000)                           # 10 ps production
P = np.array(traj)
msd = ((P - P[0]) ** 2).sum(-1).mean(-1)
t = np.arange(len(msd)) * 50 * 2e-3     # ps
D = np.polyfit(t[20:], msd[20:], 1)[0] / 6
print("D =", D, "A^2/ps")

Exercises

  • Lennard-Jones forces vs finite differences [E(x+h) − E(x−h)]/2h.
  • Energy conservation: velocity Verlet (NVE), Δt = 0.5, 2 and 8 fs.
  • MSD averaged over many time origins at 800, 1000, 1200 K → D → Arrhenius Ea → σ(300 K) by Nernst–Einstein, with an error estimate.
  • Parity: MACE-MP vs DFT forces on 20 snapshots, against the zero-force baseline. Which fail?

Colab CPU: tens of minutes per temperature. The supplied cell is ordered (tetragonal-like; Li disorders above about 900 K): compare your Ea with the cubic-garnet value (about 0.35 eV, Electrochemistry lecture 4) with care.

Answers to the why questions

The four puzzles, solved

1 · 193 labels from one calculation

One energy plus 3 × 64 = 192 force components. Each force is the local slope of the surface; in the toy, one force fixed a parameter that the energy could not.

2 · Atoms fuse at 1500 K

At high temperature atoms come closer than in any training structure. With no data there, the model (like the GP dimer) learned no repulsion. Test errors only cover the tested region.

3 · 100 atoms → a million

Locality: E = Σ Ei, each from neighbours within rc ≈ 5 Å (about 40 in Cu). Any large cell is made of the same local environments, and the cost grows like N.

4 · A factor of ten at room temperature

20 ps gives few hops: Ea ± 0.05 eV (simulated, 20 repeats), and the long extrapolation turns that into D(300 K) between 16 × too small and 8 × too large. Long ML runs fix the statistics.

Check your understanding · click a card to reveal

Concept check

Q1. A potential has a force MAE of 0.05 eV/Å. The mean |F| in the test set is 0.06 eV/Å. Is it good?
No: predicting zero force would score 0.06. Compare with the baseline, and test on configurations with larger forces.
Q2. Why must the cutoff function reach zero smoothly, with zero slope?
Otherwise the energy jumps when a neighbour crosses rc: a force spike, and energy is not conserved in MD.
Q3. At 1000 K the MSD is 4 Ų at 10 ps and 16 Ų at 40 ps. What is D?
Slope = 12/30 = 0.4 Ų/ps, so D = 0.4/6 = 0.067 Ų/ps = 6.7 × 10⁻⁶ cm²/s.
Q4. A universal potential gives Ea = 0.25 eV; DFT gives 0.31 eV. Effect on D at 300 K?
Too fast by exp(0.06/0.02585) = exp(2.32) ≈ 10. Fine-tune before trusting it.
Wrap-up

Summary and next lecture

1
An interatomic potential learns the potential-energy surface E(r₁, …, rN); forces are Fi = −∇iE (Lennard-Jones derived by hand).
2
Locality, E = Σ Ei within rc, makes models extensive and linear in cost.
3
Families: symmetry functions + networks, GAP (a GP), equivariant (NequIP, MACE), universal (M3GNet, CHGNet, MACE-MP).
4
Train on energies and forces (3N labels per structure); validate with parity, phonons, MD sanity, and an eye on extrapolation.
5
MD → MSD = 6Dt → Arrhenius Ea → Nernst–Einstein σ. The exponent amplifies every error.

This week

Lab 12: MACE-MP molecular dynamics and an Arrhenius plot. Project progress check this week. PS4 (weeks 11–12) is due in week 13.

Next lecture · Active learning and Bayesian optimization

Today's warning sign, a large GP variance, becomes a tool: let the model choose the next DFT calculation or experiment. Closed loops, expected improvement derived, exploration vs exploitation, and self-driving labs.

References and image credits

Further reading

Reading for this week

  • J. Behler, M. Parrinello, "Generalized neural-network representation of high-dimensional potential-energy surfaces," Phys. Rev. Lett. 98, 146401 (2007).
  • A. P. Bartók, M. C. Payne, R. Kondor, G. Csányi, "Gaussian approximation potentials," Phys. Rev. Lett. 104, 136403 (2010).
  • S. Batzner et al., "E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials" (NequIP), Nat. Commun. 13, 2453 (2022).
  • I. Batatia, D. P. Kovács, G. N. C. Simm, C. Ortner, G. Csányi, "MACE," NeurIPS (2022); I. Batatia et al., "A foundation model for atomistic materials chemistry" (MACE-MP-0), arXiv:2401.00096 (2023).
  • C. Chen, S. P. Ong, M3GNet, Nat. Comput. Sci. 2, 718 (2022); B. Deng et al., CHGNet, Nat. Mach. Intell. 5, 1031 (2023).
  • L. Verlet, Phys. Rev. 159, 98 (1967); W. C. Swope, H. C. Andersen, P. H. Berens, K. R. Wilson, J. Chem. Phys. 76, 637 (1982); J. E. Lennard-Jones, Proc. R. Soc. A 106, 463 (1924).
  • C. E. Rasmussen, C. K. I. Williams, Gaussian Processes for Machine Learning, MIT Press (2006); K. P. Murphy, Probabilistic Machine Learning: An Introduction, MIT Press (2022); C. M. Bishop, H. Bishop, Deep Learning: Foundations and Concepts, Springer (2024), ch. on graph networks and symmetry.

Image credits (Wikimedia Commons)

  • Galileo supercomputer rack: CINECA, CC BY 2.0 — File page
  • Molecular dynamics simulation of solid argon at 50 K (video frame): Christopher Rowley, CC BY-SA 4.0 — File page
  • All-solid-state battery: Luca Bertoli, CC BY-SA 4.0 — File page

All plots and schematics were drawn for this course from numbers computed in Python (work/lecture12/compute.py). The Lennard-Jones parameters are argon-like (ε = 10.4 meV, rm = 3.82 Å). The Li diffusion data, the GP dimer fit and the force parity data are simulated. Model sizes and dataset sizes are orders of magnitude.