A five-phase plan for bringing equivariant neural network potentials into your own MₓCᵧ research: read the right papers, run pretrained models, generate targeted DFT data, fine-tune, and validate — with installation instructions and concrete code for every major framework.
Read the foundational papers
Run pretrained models zero-shot
Generate your own DFT data
Fine-tune MACE, then validate
This closing post of Module 6 turns everything from Posts 16–20 into an actionable plan. The central decision a researcher must make is not whether to use equivariant neural network potentials, but how far along this roadmap you actually need to go before the model is accurate enough for your specific transition metal compounds — and the honest answer, for many systems, is "not very far at all."
Start at the cheapest, fastest phase (zero-shot foundation model) and only advance to the next phase if validation shows it's necessary. Fine-tuning is powerful but costs DFT calculation time, GPU time, and researcher time — never skip straight to it without first checking whether MACE-MP-0 is already good enough for your accuracy requirements.
Phase 1 — Read the Foundational Papers
Posts 16–18 already did the heavy lifting here. Read in this exact order, and don't skip Behler-Parrinello even though it's the oldest — it establishes vocabulary every later paper assumes you know.
| Order | Paper | Link | Time investment |
|---|---|---|---|
| 1 | Behler & Parrinello (2007) | PRL 98, 146401 | ~1 hour |
| 2 | Schütt et al. — SchNet (2017) | arXiv:1712.06113 | ~1.5 hours |
| 3 | Batzner et al. — NequIP (2022) | Nat. Commun. 13, 2453 | ~2 hours |
| 4 | Batatia et al. — MACE (2022) | arXiv:2206.07697 | ~2 hours |
Phase 2 — Run Pretrained Models Zero-Shot
Before generating a single new DFT calculation, run MACE-MP-0 on the transition metal chalcogenides already in your dataset (Posts 1–8 of the research series) and compare directly against your own DFT-PBE/DFT+U results.
from mace.calculators import mace_mp
from ase.io import read
calc = mace_mp(model="medium", default_dtype="float64")
# Loop over your own DFT-relaxed CIF files (from Wien2k/VASP exports)
for cif_path in my_mxcy_structures:
atoms = read(cif_path)
atoms.calc = calc
e_mace = atoms.get_potential_energy() / len(atoms) # eV/atom
print(f"{cif_path.stem:12s} MACE: {e_mace:.4f} eV/atom")
# Compare against the DFT energy you already have on file
If MACE-MP-0 reproduces your DFT relaxed structures, relative energies between polymorphs, and rough force magnitudes within an acceptable tolerance for your application (e.g. structure screening, rough phonon estimates), stop here — fine-tuning is unnecessary overhead. Move to Phase 4/5 only if zero-shot accuracy is insufficient for what you specifically need (e.g. precise magnetic energy differences between AFM/FM orderings, which foundation models are known to handle less reliably than simpler structural energetics).
Phase 3 — Generate Your Own DFT Data (If Needed)
If Phase 2 reveals systematic errors specific to your chemistry — common for strongly correlated MₓCᵧ compounds where DFT+U corrections matter — the next step is generating a small, targeted set of new DFT calculations rather than thousands of random structures.
- Identify the failure mode first. Is MACE wrong about absolute energies, relative polymorph stability, or magnetic ordering specifically? This determines what new data is actually needed.
- Use active learning, not random sampling (Post 16, Rung 6). Run MD with an ensemble of MACE models; flag configurations where ensemble disagreement is highest — those are the structures most worth computing with DFT.
- Match your existing DFT settings. Use the same exchange-correlation functional, U values, and k-point density as your existing MₓCᵧ dataset (Post 2 of the research series) for consistency.
- Aim for hundreds, not tens of thousands. NequIP's data-efficiency result (Post 18) means equivariant fine-tuning typically needs far less new data than training from scratch.
Phase 4 — Fine-Tune MACE on Your Data
# this is what makes it fast and data-efficient compared to training from scratch.
# 1. Prepare your data in extended XYZ format with energies + forces
# (ASE's write() with format='extxyz' handles this directly)
# 2. Fine-tune via the mace_run_train CLI
mace_run_train \
--name="mxcy_finetuned" \
--foundation_model="medium" \ # start from MACE-MP-0 weights
--train_file="mxcy_train.xyz" \
--valid_fraction=0.10 \
--energy_weight=1.0 --forces_weight=100.0 \ # forces weighted heavily
--lr=0.001 --max_num_epochs=200 \
--device=cuda
Notice forces are weighted 100× more heavily than energy in the loss function above. This is standard practice across SchNet, NequIP, and MACE training — because forces are local, per-atom quantities providing far more learning signal per structure than a single scalar energy value, and because accurate forces (not just energies) are what makes molecular dynamics trajectories physically trustworthy.
Installing the major frameworks
| Framework | Install command | Best for |
|---|---|---|
| MACE | pip install mace-torch | Recommended default — foundation models + fine-tuning |
| NequIP | pip install nequip | Training fully custom equivariant models from scratch |
| SchNetPack | pip install schnetpack | Invariant baseline, architecture teaching/comparison |
| n2p2 / aenet | Compile from source (C++) | Classic Behler-Parrinello-style potentials, large-scale MD |
Phase 5 — Validate Against DFT and Materials Project
Validation closes the loop back to Post 20's methodology — the same five checks (equation of state, lattice parameters, phonons, defect energies, Materials Project cross-check) apply equally to a fine-tuned model, with one addition specific to magnetic transition metal compounds.
from mace.calculators import MACECalculator
calc_ft = MACECalculator(model_paths="mxcy_finetuned.model", device="cuda")
errors_E, errors_F = [], []
for atoms_dft in held_out_test_set:
atoms_pred = atoms_dft.copy(); atoms_pred.calc = calc_ft
e_err = abs(atoms_pred.get_potential_energy()/len(atoms_dft)
- atoms_dft.get_potential_energy()/len(atoms_dft))
f_err = np.abs(atoms_pred.get_forces() - atoms_dft.get_forces()).mean()
errors_E.append(e_err); errors_F.append(f_err)
print(f"MAE energy: {np.mean(errors_E)*1000:.1f} meV/atom")
print(f"MAE forces: {np.mean(errors_F):.3f} eV/Å")
# Target: < 5-10 meV/atom energy, < 0.05 eV/Å forces — "chemical accuracy"
Beyond the standard checks, explicitly compare the energy difference between AFM and FM orderings of the same structure predicted by the fine-tuned model against your DFT+U values (Post 6 of the research series). This energy difference — not just the total energy of either state alone — is what determines whether the potential correctly predicts magnetic ground states, and is historically one of the harder quantities for any neural network potential to get right.
Summary — The Complete Roadmap
Five-phase decision path
Quick Check
1. According to this roadmap, when should a researcher move past Phase 2 (zero-shot MACE-MP-0) into fine-tuning?
2. Why does fine-tuning start from MACE-MP-0's pretrained weights rather than random initialisation?
3. Why is the AFM-vs-FM energy difference singled out as a specific validation check for transition metal compounds, beyond standard energy/force MAE?