Machine Learning Interatomic Potentials¶
exaStamp ships several machine-learning interatomic potentials (MLIPs). Each one lives in its own plugin under src/potential/mlip-<name> and is disabled by default: turn it on at configure time with the matching CMake option (see Build & Install).
| Model | Page | Force operator | Init operator | CMake option | External dependency |
|---|---|---|---|---|---|
| SNAP | SNAP | snap_force_fp32, snap_force_fp64 |
snap_init (descriptors only) |
EXASTAMP_MLIP_SNAP_BUILD |
exaNBody built with EXANB_BUILD_CONTRIB_MD=ON |
| POD | POD | pod_force |
pod_init |
EXASTAMP_MLIP_POD_BUILD |
BLAS / LAPACK |
| MTP | MTP | mtp_force |
mtp_init |
EXASTAMP_MLIP_MTP_BUILD |
none |
| NNP | NNP (n2p2) | n2p2_force |
— | EXASTAMP_MLIP_N2P2_BUILD |
n2p2 installation |
| k2b | k2b | k2b_compute_force, k2b_multi_force, ... |
k2b_init |
always built | none |
Init / force pattern¶
Most MLIPs split their setup from the force evaluation:
<model>_initgoes in theinit_parametersblock. It reads the potential files once, beforesetup_system, and raisesrcut_maxto the potential cutoff. This way the ghost layers and neighbor lists are sized correctly from the start, and you don't need to setrcut_maxby hand underglobal.<model>_forcegoes in thecompute_forceblock and evaluates energies, forces and the virial at every step.
init_parameters:
- species
- pod_init:
parameters:
pod_file: "Ta_param.pod"
coeff_file: "Ta_coefficients.pod"
compute_force:
- pod_force
Ghost contributions
MLIP force operators accumulate forces on ghost atoms. Forces and energies must be zeroed in the ghosts before the force computation and folded back into their owner atoms afterwards. Include the shipped configuration file:
or, equivalently, write the two blocks yourself:
Species mapping
How the species of the species block are matched to the elements of the potential files depends on the model. SNAP matches them by position: declare the species in the same order as the element blocks of the coefficient file. PACE matches them by name. Check the page of each model.
Descriptors and training¶
SNAP, POD, MTP and k2b can also compute their descriptors without evaluating the potential: per-atom descriptors, their derivatives, and the global design matrix (energy, forces and virial rows) used to fit linear models. This includes a loop over a database of configurations. See Descriptors.