科研 Skill

通用机器学习势评估部署

universal-potentials

Covers selecting, evaluating, and deploying pretrained universal ML interatomic potentials. Use when applying an off-the-shelf universal MLP to a new chemical system without further training.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Universal Machine-Learned Interatomic Potentials

Description

This skill covers the selection, evaluation, and deployment of pretrained universal machine-learned interatomic potentials (universal MLPs) — models trained on large multi-element datasets that can be applied to new chemical systems without additional DFT labeling. It covers the major model families (MACE-MP, CHGNet, M3GNet, MatterSim, ORB, SevenNet), their supported chemistry and known limitations, practical use for relaxation, screening, pre-equilibration, structure ranking, and dataset triage, and the decision framework for choosing between a universal potential, fine-tuning, and training from scratch. Invoke this skill before committing to any new DFT dataset generation campaign, to establish whether a universal potential already achieves acceptable accuracy for the target application.

Domain Context

Universal MLPs are trained on databases of DFT calculations spanning a large fraction of the periodic table and a wide range of crystal structure types. The two dominant training databases are the Materials Project (MP) — approximately 150,000 relaxed inorganic crystal structures computed with PBE+U — and the Alexandria/OMAT24 databases that extend coverage to higher-energy configurations, surfaces, and molecular systems. [EXPERT REVIEW NEEDED: database coverage evolves rapidly; verify against the model release notes before deployment]

What universal training databases cover. Most universal potentials are trained on near-equilibrium inorganic crystals at 0 K (or modest finite-temperature MD snapshots) computed at the PBE or PBE+U level of DFT with PAW pseudopotentials. The training set is diverse in composition but concentrated in low-energy, periodic, charge-neutral, diamagnetic or ferromagnetic phases. Coverage of molecules, surfaces, defects, liquids, high-pressure polymorphs, mixed-valence compounds, and charged supercells is sparse or absent in the original training data of most models, though newer models (MatterSim, ORB-v2, MACE-MP-0b) have broader coverage. [EXPERT REVIEW NEEDED]

The core trade-off: breadth versus depth. A universal potential can be evaluated on any supported element combination without additional training, but its accuracy for any specific system is generally lower than a well-converged system-specific MLP trained on targeted DFT data. The practical question is whether the universal potential's accuracy is already sufficient for the intended application (screening, qualitative ranking, pre-relaxation) or whether system-specific accuracy (force MAE < 50 meV/Å, phonon frequencies within 5%, correct phase ordering) is required.

DFT level consistency. Universal potentials implicitly represent the DFT level of their training data. MACE-MP-0 and CHGNet target PBE+U energetics. Applying them to compute formation energies for systems with correlated electrons (late transition metal oxides, rare earths) will inherit PBE+U errors plus any model approximation errors. If the target application requires a different DFT functional (HSE06, meta-GGA, dispersion-corrected PBE-D3), a universal potential trained at PBE level is not a substitute for DFT at the target level — it is an approximation to the wrong reference.

Magnetic and spin degrees of freedom. Standard universal potentials do not model spin explicitly. CHGNet includes a magnetic moment prediction head and was trained on spin-polarized calculations, making it the preferred choice for magnetic materials. MACE-MP-0 was trained on non-spin-polarized PBE; its energetics for magnetic systems are unreliable unless the magnetic ground state is well-captured by a non-magnetic approximation. [EXPERT REVIEW NEEDED]

Long-range electrostatics. All current widely deployed universal MLPs use local message passing with a fixed cutoff radius (5–6 Å typically). They cannot reproduce the Madelung energy of ionic crystals, the dipole-dipole interaction in polar molecules, or the image-charge interaction at charged surfaces. This is a fundamental architectural limitation, not a training-data limitation. For systems where electrostatic energy is a significant fraction of the total (ionic oxides, polar surfaces, charged defects, zwitterions), predictions will be qualitatively wrong at separations beyond the cutoff. Long-range equivariant models (MACE-off, NequIP-LR, PaiNN-LR) address this but are not yet universally deployed. [EXPERT REVIEW NEEDED]

Version instability. Universal potential model weights change between releases, and each new release typically changes predicted energies, forces, and phase stability for at least a subset of materials. Always record the exact model name, version, and checkpoint SHA-256 in any result that will be compared to future calculations. Using different model versions across an active learning campaign is a common source of label inconsistency.

When to Use This Skill

  • Structure pre-relaxation before DFT. Running a universal potential relaxation before the DFT step eliminates poor starting geometries, reduces DFT ionic steps, and prevents DFT crashes from unphysical initial structures. Even a model with modest force errors substantially improves DFT convergence rates.
  • High-throughput screening of large structure sets. Screening tens of thousands of hypothetical structures for stability, formation energy ordering, or approximate lattice parameters before committing any to DFT. Universal MLPs run in seconds per structure and often correctly identify the top-N candidates.
  • MD pre-equilibration before DFT-MD or system-specific MLP-MD. Equilibrating a large supercell at the target temperature and pressure using a universal potential, then sampling starting configurations for DFT or MACE training. Reduces the number of DFT steps required to reach equilibrium.
  • Dataset triage and coverage analysis. Using universal potential force errors as a proxy for whether a new composition is inside or outside the existing DFT dataset coverage, before deciding whether to run new DFT calculations.
  • Quick sanity checks on new structures. Checking whether a proposed structure is mechanically stable (positive definite elastic tensor, positive phonon frequencies at Gamma) at near-zero DFT cost, to filter out physically unreasonable structures before DFT.
  • Baseline model for benchmarking system-specific MLPs. Establishing a reference accuracy floor: if a system-specific MLP does not outperform MACE-MP-0 on the target validation metrics, the system-specific training has likely gone wrong.
  • Systems where rough accuracy suffices. Applications where formation energy errors of 50–200 meV/atom are acceptable: coarse phase diagram sketching, composition-space exploration, initial structure generation for crystal structure prediction.

When Not to Use This Skill

  • As a substitute for system-specific DFT accuracy. Universal potentials are not certified replacements for DFT on any specific system. Force errors of 100–500 meV/Å are common outside the training distribution. Never use universal potential energies as DFT labels for MLP training without validation. See the failure mode: "using universal potential labels as if they were DFT labels."
  • For charged systems, ionically stabilized phases, or explicitly protonated/deprotonated molecules. Current universal MLPs have no mechanism for representing net charge. Proton transfer, charged defects (V_O^{2+}, h^+), and ionic dissociation are not reliably described.
  • For magnetic phase transitions, magnetically frustrated systems, or antiferromagnets. Standard universal potentials (MACE-MP-0, M3GNet, ORB) are trained without spin and will report incorrect energy ordering between ferromagnetic and antiferromagnetic configurations. Use CHGNet for systems where magnetic structure matters, and validate the magnetic ground state independently.
  • For molecular crystals, polymers, and organic molecules where dispersion is dominant. PBE-level universal MLPs without dispersion correction underestimate intermolecular binding, giving incorrect lattice constants, packing, and cohesive energies for organic solids. MACE-OFF23 is specifically trained for organic molecules and molecular crystals.
  • For properties at extreme conditions (P > 100 GPa, T > 3000 K) that are poorly represented in the training databases. High-pressure polymorphs, shock equations of state, and laser-heated DAC configurations are outside most universal potentials' training distribution.
  • For aqueous electrochemistry, liquid electrolytes, or solid-liquid interfaces. Explicit solvation, electrode-electrolyte charge transfer, and ion solvation energetics require models trained on liquid configurations at the relevant temperature — not present in the standard MP-based training sets.
  • When the result will be published as a DFT property. If a paper claims a DFT-calculated property, the result must come from actual DFT. Universal MLP predictions are MLP predictions, not DFT results. This is an integrity issue, not only an accuracy issue.

Core Concepts

  • Universal MLP: A machine-learned interatomic potential trained on a large, multi-system, multi-element DFT database, intended to generalize across chemical space without system-specific retraining. Distinguished from system-specific MLPs by breadth of training, not by architecture. The same MACE architecture can be used as either a system-specific or universal potential depending on training data.
  • MACE-MP-0 (and variants): A family of universal MACE models trained by Batatia et al. on the Materials Project PBE+U dataset. Multiple model sizes (small, medium, large) with different parameter counts and accuracy/cost trade-offs. MACE-MP-0b/0b3 are improved versions with updated training protocols. [EXPERT REVIEW NEEDED: the model family is actively updated; check the mace-mp repository for the latest release]
  • CHGNet (Crystal Hamiltonian Graph Network): A universal GNN trained by Deng et al. on the Materials Project, including a magnetic moment prediction head trained on spin-polarized calculations. The only widely deployed universal MLP that explicitly models magnetic moments. Recommended for any system where magnetic ordering matters.
  • M3GNet: A universal GNN by Chen and Ong trained on the Materials Project. Less accurate than MACE-MP-0 per benchmark but lighter-weight and part of the MatGL stack that also includes the PotNet and CHGNet implementations.
  • MatterSim: A universal MLP from Microsoft Research trained on a broader dataset (MP + additional high-temperature and high-pressure configurations). Aims to improve accuracy at non-zero temperatures and extreme conditions. [EXPERT REVIEW NEEDED]
  • ORB (Open-source Research-grade B-NN): A family of models trained on MP + additional datasets, designed for fast inference. ORB-v2 includes improved elemental coverage. [EXPERT REVIEW NEEDED]
  • SevenNet: A universal GNN (NequIP-based) from KAIST trained on the OMAT24 dataset (MPtraj + Alexandria MD snapshots). High accuracy on non-equilibrium structures. [EXPERT REVIEW NEEDED]
  • MACE-OFF23: A universal MACE model for organic molecules and molecular crystals, trained on SPICE and related databases at the ωB97M-D3(BJ)/def2-TZVPPD level. The appropriate choice for organic chemistry applications instead of MACE-MP (which targets inorganic crystals at PBE level).
  • Zero-shot application: Applying a universal potential to a new system without any additional training or fine-tuning. Accuracy depends entirely on how well the new system is represented in the training distribution.
  • In-domain vs. out-of-domain (OOD): A universal potential is in-domain for a new system if that system's structural and chemical features are well-represented in the training database. OOD indicators: rare elements, unusual coordination geometries, compositions outside the training convex hull, phases absent from MP. Check with SOAP dissimilarity to the training set or use the model's own uncertainty estimate if available.
  • Fine-tuning decision boundary: Fine-tuning a universal potential on system-specific DFT data is efficient when the universal potential is close but not accurate enough — typically when force MAE is < 5× the target accuracy. If the universal potential shows no correlation with DFT forces (MAE > 1 eV/Å for metallic systems), training from scratch on system-specific data may converge faster. [EXPERT REVIEW NEEDED]
  • Training-set overlap (data leakage): When validating a universal potential on a structure that was part of the training database (e.g., a Materials Project entry), measured errors reflect interpolation, not generalization. Always test on structures not in the training database when reporting generalization accuracy.
  • Equivariant vs. invariant universal potentials: MACE-MP and SevenNet are equivariant (forces computed as equivariant tensor derivatives). M3GNet and CHGNet are invariant (use only distance and angle information). Equivariant models are generally more accurate per parameter but slower per evaluation.

Key Workflows

Full steps for each part are in references/key-workflows/; open the one you need:

Common Failure Modes

Moved to references/common-failure-modes.md to keep this file short; read it when this part is needed.

Best Practices

  • Always run a DFT validation set before trusting a universal potential for any new system. There is no substitute for comparing predictions to the ground truth for the specific chemistry and structural regime of interest. A 20-structure DFT validation set takes hours and prevents days of wasted downstream work.
  • Record the exact model name, version, release date, and SHA-256 of the model weights in every result. Universal potential weights change between versions, and models with the same name (e.g., "MACE-MP-0 medium") can produce different results after a minor release. This is essential for reproducibility. Use the pattern from reproducibility-workflow to register the model checkpoint.
  • Use MACE-MP-0 for inorganic crystals, MACE-OFF23 for organic molecules, and CHGNet for magnetic systems as starting defaults. These assignments reflect the training data coverage of each model. Cross-validate any such assignment by checking the force MAE on a representative test set.
  • Do not use a universal potential's internal energies as absolute formation energies without checking the reference state convention. MACE-MP-0 energies reference PBE+U isolated atoms; computing formation energies against experimental or different-functional references requires careful reference energy handling.
  • Run the OOD detector (Workflow 3) for any system containing elements or structural types that appear rarely in the Materials Project. OOD detection via SOAP dissimilarity is inexpensive and catches the cases most likely to produce catastrophically wrong predictions.
  • For MD, always run a short NVE stability test before production runs. A universal potential that passes static force validation can still produce unstable MD for thermally accessible configurations outside the training distribution. A 5 ps NVE test at the target temperature costs minutes and can prevent a diverged trajectory.
  • Use fmax=0.10 eV/Å for pre-relaxation, not 0.01 eV/Å. Over-converging the MLP pre-relaxation wastes compute. The DFT step will complete the geometry optimization; the MLP only needs to remove the worst geometrical problems.
  • Do not skip the validate_prerelaxed_vs_dft check (Workflow 4) for a new composition. A universal potential can relax into a metastable basin that is adjacent to the correct DFT minimum but different enough that DFT ionic relaxation is slow or converges to the wrong structure. For new compositions, verify that MLP and DFT relaxed geometries agree within 0.2–0.3 Å/atom.
  • For high-throughput screening, report results as "MACE-MP predictions" not "DFT predictions" or "calculated energies". The distinction matters for reproducibility and scientific integrity. Universal potential predictions should always be labeled with their source model in any figure, table, or publication.
  • Prefer the largest available model size for accuracy-critical applications; use small models for exploratory screening. MACE-MP-0 medium/large are typically 2–5× more accurate than small but 5–10× slower. The choice depends on the number of structures and the tolerable error.

Integration with Other Skills

  • mace-training: If the universal potential benchmark (Workflow 1 here) shows force MAE > 5× the target accuracy and force correlation with DFT is poor, system-specific MACE training is indicated. That skill covers the full training pipeline from DFT dataset preparation to validated deployment.
  • fine-tuning-mlp: When force MAE is 2–5× above target (fine-tuning regime, Workflow 6 here), fine-tuning the universal potential on system-specific DFT data is more efficient than training from scratch. That skill covers the --foundation_model flag, learning rate schedules for fine-tuning, and when to unfreeze different layers.
  • uncertainty-mlp: Committee UQ applied to fine-tuned universal potentials requires special care: shared base representations across committee members reduce committee diversity. The SOAP dissimilarity OOD detector from that skill is the recommended complement to committee σ_F for universal-potential deployment. That skill also warns against conflating fine-tuned-model committee variance with true epistemic uncertainty.
  • mlp-validation: The full validation trinity (static test-set errors, physical property reproduction, MD stability) from that skill must be run before deploying any universal potential — or fine-tuned model — in production. The static force/energy validation in Workflow 1 here is a prerequisite screening step, not a substitute for full validation.
  • mlp-to-lammps: MACE-MP-0 and SevenNet have documented LAMMPS interfaces (pair_style mace and pair_style sevennet). That skill covers the LAMMPS deployment of MLP models, including unit verification and force validation. Universal potentials deployed in LAMMPS require the same species-mapping and unit-verification checks as system-specific models.
  • active-learning-mlp: Universal potentials are the natural starting point for the first AL iteration: pre-equilibrate with a universal potential to generate structurally diverse candidate frames, run DFT on the most uncertain ones, and train a system-specific model. The committee σ_F computed in that skill uses the system-specific model; the universal potential serves only for initial exploration.
  • dft-dataset-generation: Pre-relaxed structures from Workflow 4 here feed directly into the DFT labeling pipeline in that skill. The provenance metadata written by prerelax_for_dft (model name, version, convergence status) should be preserved in the extxyz dataset for reproducibility.
  • dft-convergence: Universal potential pre-relaxation reduces DFT ionic steps but does not change the DFT convergence settings required. The ENCUT, EDIFF, k-mesh, and smearing settings from that skill must still be applied to all DFT calculations on pre-relaxed structures.
  • vasp-workflow: VASP relaxations of structures pre-relaxed with universal potentials typically converge in fewer ionic steps (NSW=20–50 instead of 100+). The INCAR settings for spin initialization (ISPIN, MAGMOM) must still be set manually — the universal potential does not provide initial magnetic moments (except CHGNet).
  • quantum-espresso: QE relaxations of pre-relaxed structures follow the same logic as VASP. The system block parameters (ecutwfc, ecutrho, occupations, smearing) are unchanged by the pre-relaxation step.
  • lammps-workflow: Pre-equilibrated structures from Workflow 5 here can be used as starting configurations for LAMMPS production runs with system-specific MLPs. The extxyz trajectory from MACE-MP pre-equilibration can be converted to LAMMPS dump format for restart.
  • md-equilibration: Universal potential pre-equilibration (Workflow 5) is a cheap substitute for the full equilibration protocol in that skill only for generating starting configurations. For production MD accuracy validation, the NVE conservation test and ensemble analysis in that skill must be run on the final system-specific model.
  • materials-featurization: SOAP descriptors used for OOD detection in Workflow 3 here use the same parameters as the featurization pipeline in that skill. Keeping the SOAP parameters consistent (same r_cut, n_max, l_max, sigma, species list) ensures that distances computed here are comparable to those used in downstream ML models.
  • reproducibility-workflow: Model version, checkpoint SHA-256, and benchmark results from Workflow 1 here are provenance records that belong in the campaign settings JSON described in that skill. Any result that uses a universal potential prediction should log the model identifier and the benchmark outcome alongside the result.

Key References

  1. Batatia, I., et al. (2023). A foundation model for atomistic materials chemistry. arXiv:2401.00096. https://arxiv.org/abs/2401.00096
  2. Deng, B., et al. (2023). CHGNet as a pretrained universal neural network potential for charge-informed atomistic modelling. Nature Machine Intelligence, 5, 1031–1041. https://doi.org/10.1038/s42256-023-00716-3
  3. Chen, C., & Ong, S. P. (2022). A universal graph deep learning interatomic potential for the periodic table. Nature Computational Science, 2, 718–728. https://doi.org/10.1038/s43588-022-00349-3
  4. Kovács, D. P., et al. (2023). MACE-OFF23: Transferable machine learning force fields for organic molecules. arXiv:2312.15211. https://arxiv.org/abs/2312.15211
  5. Merchant, A., et al. (2023). Scaling deep learning for materials discovery. Nature, 624, 80–85. https://doi.org/10.1038/s41586-023-06735-9

示例提示词

我想评估MACE-MP这类通用机器学习势能否直接用于我的新体系。

所属插件

计算材料学:第一性原理与原子模拟面向计算材料研究:DFT 与第一性原理(VASP、Quantum ESPRESSO、CP2K、AiiDA)、缺陷/表面/声子/弹性常数、机器学习势函数训练与验证、分子动力学与增强采样、晶体性质图神经网络与生成模型。

安装该插件会一并获得同领域的 35 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

通用机器学习势评估部署能做什么?

Covers selecting, evaluating, and deploying pretrained universal ML interatomic potentials. Use when applying an off-the-shelf universal MLP to a new chemical system without further training。

如何安装通用机器学习势评估部署?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「通用机器学习势评估部署」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

通用机器学习势评估部署需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

通用机器学习势评估部署经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。