Header Ads Widget

AI & Machine Learning for Materials Sciences

Last Posts

10/recent/ticker-posts

Post 16: From Force Fields to Neural Network Potentials — The AI Hierarchy

Before diving into MACE and NequIP, understand the full ladder of methods that compute energies and forces — from 1980s classical force fields to today's foundation models — and the one equation that ties them all together.

⚖️
Central equation

F = −∇E (autodiff, not hand-coded)

🪜
This post

The 7-rung hierarchy of methods

⚛️
Why it matters

Picking the right rung for your system

🔬
Endpoint

Foundation models for TM compounds

Every method in this module — from a 1985 Lennard-Jones potential to a 2024 foundation model trained on a million DFT calculations — answers the same question: given a set of atomic positions, what is the total energy, and what forces act on each atom? What has changed over forty years is not the question but how flexibly and accurately each method can answer it, and how much physics it must be told explicitly versus how much it can learn from data.

🪜
The seven rungs

Classical force fields → Machine-learned potentials (GAP, SNAP) → Neural network potentials (Behler-Parrinello, SchNet) → Equivariant neural networks (NequIP, MACE) → Foundation models (MACE-MP-0, CHGNet) → Active learning → Differentiable simulation and generative design. Each rung keeps everything useful from the rung below and removes one more approximation.

1. The One Equation Underneath Everything

Whatever method computes the energy E(R) as a function of atomic positions R = {r₁, r₂, …, r_N}, the force on atom i is always the negative gradient of that energy with respect to that atom's position:

⚖️ The defining relation of atomistic simulation
Fi = −∂E/∂ri

This holds for a Lennard-Jones potential, a DFT total energy,
and a neural network — the physics does not care how E was computed.

Classical force fields write E(R) as a fixed analytic formula and differentiate it by hand. Neural network potentials write E(R) as the output of a trainable function (a neural net) and obtain forces via automatic differentiation — the same backpropagation machinery from Post 10, applied to atomic coordinates instead of model weights. This is the single biggest conceptual shift in the whole hierarchy: once a model can predict E, it gets F almost for free.

🔬
Why this matters for transition metal compounds

For MₓCᵧ systems, E(R) is shaped by mechanisms classical force fields cannot represent at all — crystal field splitting, Jahn-Teller distortion, magnetic ordering, charge transfer. A neural network potential trained on DFT data implicitly learns these effects from the energy landscape, without anyone writing down a GKA-rule term in the functional form.

2. Rung 1 — Classical Force Fields (1980s–present)

A classical force field writes total energy as a sum of physically motivated terms: bond stretching, angle bending, torsion, and non-bonded (van der Waals + electrostatic) interactions. Parameters are fitted once to a small set of reference data and then reused for any new configuration of the same atom types.

🔧 A typical classical force field (schematic)
E = Σbonds kb(r−r₀)² + Σangles kθ(θ−θ₀)²
    + Σdihedrals Vn[1+cos(nφ−γ)]
    + Σi<j [4ε((σ/r)¹² − (σ/r)⁶) + qiqj/r]
StrengthLimitation
Extremely fast — millions of atoms, nanoseconds of dynamicsFixed functional form cannot capture bond breaking/forming
Well understood, transferable within a chemical familyNo electronic structure → no magnetism, no charge transfer
Decades of validated parameter sets (AMBER, CHARMM, ReaxFF)Transition metals with variable oxidation state are poorly described

3. Rung 2 — Machine-Learned Potentials: GAP and SNAP (2010s)

The first wave of ML potentials kept a hand-built description of local atomic environments (descriptors) but replaced the fixed functional form with a flexible regressor — Gaussian Process Regression for GAP (Gaussian Approximation Potential), linear or polynomial regression on bispectrum coefficients for SNAP (Spectral Neighbor Analysis Potential).

💡
The key idea: descriptors first, regression second

Both methods convert the raw 3D positions of neighbouring atoms into a rotation-invariant numerical fingerprint (a descriptor) before any learning happens. This guarantees physical correctness (energy doesn't change if you rotate the whole crystal) but the descriptor is hand-designed — exactly the kind of feature-engineering bottleneck Module 2 covered for tabular ML.

4. Rung 3 — Neural Network Potentials: Behler-Parrinello and SchNet (2007–2017)

Behler and Parrinello's 2007 paper introduced the idea of summing per-atom neural network outputs to get a total energy that is automatically extensive (scales correctly with system size) and permutation-invariant (atom ordering doesn't matter). SchNet (2017) replaced their hand-crafted symmetry functions with continuous-filter convolutions — letting the network learn its own representation of the local environment directly from atom types and distances.

🧠 Behler-Parrinello: sum of atomic contributions
Etotal = Σi=1N Ei(Gi)

Gi = symmetry-function fingerprint of atom i's local environment
Ei = small neural network, same weights for every atom of a given element

This single architectural choice — one shared network per element, summed over atoms — solves permutation invariance and size-extensivity in one stroke, and remains the backbone of essentially every neural network potential built since, including SchNet, NequIP, and MACE.

5. Rung 4 — Equivariant Neural Networks: NequIP and MACE (2021–2022)

SchNet only ever sees distances between atoms — it is rotation invariant by construction, which is correct for the energy but throws away directional information needed for accurate forces. Equivariant networks like NequIP and MACE instead pass vector and tensor features through the network, so that rotating the input crystal rotates the internal features in exactly the same way. Post 17 covers this distinction in full depth — it's the single biggest accuracy jump in the hierarchy and the reason MACE is recommended as a starting point in Post 21.

6. Rung 5 — Foundation Models: MACE-MP-0, CHGNet (2023–2024)

The newest rung trains one equivariant network on the entire Materials Project relaxation trajectory database — hundreds of thousands of structures spanning nearly the whole periodic table. The resulting model, MACE-MP-0, can be applied zero-shot (no fine-tuning) to a new transition metal compound and often gets within chemical accuracy of DFT immediately.

🧪
Practical recommendation for MₓCᵧ research

Start at this rung. Run MACE-MP-0 zero-shot on your transition metal chalcogenides before generating any new DFT data — Post 19 shows you the working code, and Post 21 lays out exactly when (and how) to move to fine-tuning if zero-shot accuracy isn't sufficient for your system.

7. Rungs 6–7 — Active Learning and Differentiable / Generative Design

Two further rungs extend the hierarchy beyond single-point energy prediction:

RungWhat it addsWhy it matters
Active learning The model flags configurations where its own uncertainty is high (e.g. via ensemble disagreement) and requests new DFT calculations only there Builds an accurate, minimal training set instead of randomly sampling structures — directly relevant to extending coverage to new MₓCᵧ stoichiometries
Differentiable simulation / generative AI Backpropagate through an entire MD trajectory or use diffusion models to generate candidate crystal structures directly Enables gradient-based materials design — optimise composition or structure directly against a target property instead of screening exhaustively

8. Choosing Your Rung

Which rung should I start at?

Do I need millions of atoms or nanosecond+ dynamics?
↓ YES
Classical force field (if a parameter set exists for your elements) — Rung 1
↓ NO — accuracy matters more than raw speed
Is my system a transition metal compound (magnetism, variable oxidation state)?
↓ YES
Equivariant network — start zero-shot with MACE-MP-0 — Rung 4/5
↓ NO — simple, well-studied chemistry
SchNet or a published GAP/SNAP potential may already be accurate enough — Rung 2/3
🪜
App 16 — AI Hierarchy Explorer
Climb the seven rungs interactively — see what physics each method adds, compare speed vs accuracy trade-offs, and find the right starting point for your own system.
Open App →

Quick Check

1. How does a neural network potential obtain atomic forces from a trained energy model?

  • A. A separate neural network is trained specifically to predict forces
  • B. Forces are computed as F = −∂E/∂r via automatic differentiation of the energy model with respect to atomic positions — the same backpropagation machinery used to train the network
  • C. Forces are looked up from a classical force field as a baseline
  • D. Forces cannot be computed from a neural network energy model

2. What architectural choice do Behler-Parrinello, SchNet, NequIP, and MACE all share?

  • A. They all use Gaussian Process Regression
  • B. Total energy is a sum of per-atom contributions, each computed by a shared network applied identically to every atom of a given element — this guarantees permutation invariance and size-extensivity
  • C. They all require hand-crafted symmetry functions
  • D. They are all invariant, never equivariant

3. For a new transition metal chalcogenide with no prior DFT data, what does this post recommend as the starting point?

  • A. Fit a classical force field from scratch
  • B. Run a foundation model like MACE-MP-0 zero-shot first, then decide whether fine-tuning on your own DFT data is needed based on the accuracy you observe
  • C. Always generate 10,000 new DFT calculations before doing anything else
  • D. Use SNAP, since it is the most accurate method available
Neural Network Potentials Classical Force Fields GAP SNAP Behler-Parrinello MACE-MP-0 Active Learning Automatic Differentiation