nep.in
This file selects the model and controls NEP training or prediction. For the model equations, see NEP formalism.
File format
Write one keyword per line:
keyword parameter_1 parameter_2 ...
Blank lines are ignored, and # starts a comment that extends to the end of the line.
Put the required type keyword first, followed by the settings to change from their defaults.
In particular, type must precede cutoff, type_weight, and spin_cutoff.
All other keywords have defaults for ordinary NEP training.
Use model to select another model family, such as model qnep2.
The default model is ordinary nep.
Only NEP4 is supported, so version can be omitted or set to 4.
Example
The following input lists common settings for an ordinary Te-Pb NEP model explicitly. Apart from the required species list, the values shown are the defaults:
type 2 Te Pb
version 4
cutoff 8 4
n_max 6 6
basis_size 6 6
l_max 4 1
neuron 30
lambda_e 1.0
lambda_f 1.0
lambda_v 0.1
batch 1000
population 50
generation 100000
Choose the cutoffs and other model settings for the system and training data. For Spin training, see the spin_version example and Spin potential documentation.
Keywords
Keyword |
Brief description |
|---|---|
select the NEP version (currently only NEP4) |
|
number of atom types and list of chemical species |
|
force weights for different atom types |
|
select the model for training or prediction |
|
reverse charge-output weights when restarting charge-model training |
|
select between training and prediction (inference) |
|
outer cutoff for the universal ZBL potential [Ziegler1985] |
|
select the spin descriptor version for |
|
one spin cutoff or one cutoff per element, bounded by the NEP radial cutoff |
|
maximum spatial tensor rank used by the spin descriptor |
|
number of shared compressed radial channels |
|
maximum polynomial degree of primitive spin inputs |
|
enable joint spin–space rotation-invariant magnetic channels |
|
atom types with independent spin degrees of freedom |
|
enable typewise cutoff radii for the ZBL part of the model |
|
radial (\(r_\mathrm{c}^\mathrm{R}\)) and angular (\(r_\mathrm{c}^\mathrm{A}\)) cutoffs |
|
radial-function index limits for radial and angular descriptors |
|
radial (\(N_\mathrm{bas}^\mathrm{R}\)) and angular (\(N_\mathrm{bas}^\mathrm{A}\)) basis sizes |
|
expansion order for angular terms |
|
number of neurons in the hidden layer (\(N_\mathrm{neu}\)) |
|
weight of \(\mathcal{L}_1\)-norm regularization term |
|
weight of \(\mathcal{L}_2\)-norm regularization term |
|
weight of energy loss term |
|
weight of force loss term |
|
weight of virial loss term |
|
weight of Cartesian magnetic-force loss term |
|
weight of parallel magnetic-force RMSE (requires |
|
weight of perpendicular magnetic-force RMSE (requires |
|
weight of spin-torque loss term |
|
weight of grouped magnetic-response loss term |
|
weight of total-charge loss term for qNEP models |
|
weight of Born-effective-charge loss term for qNEP models |
|
weight of energy-difference loss term, with the combinations in |
|
fit atomic or global dipole/polarizability targets |
|
extra weight of shear-virial loss terms |
|
bias term that can be used to make smaller forces more accurate |
|
batch size for training |
|
population size used in the SNES algorithm [Schaul2011] |
|
number of generations used by the SNES algorithm [Schaul2011] |
|
random seed for the SNES algorithm |
|
periodically save model checkpoints and, optionally, restart checkpoints |
|
interval between regular training-status and model/test-set outputs |
|
output normalized descriptors in prediction mode |
|
fine tune a model starting from a foundation model |
|
import descriptor normalization factors from an existing |
Consistency with model files already present
A training run writes both nep.txt and nep.restart every output_interval generations.
Each mismatch is reported on its own line, naming the keyword, the value used by the current run, whether that value was given in nep.in or is a default, and the value found in the file, for example:
The model in nep.in is inconsistent with nep.txt:
basis_size_radial: nep.in gives 6 (default), nep.txt gives 8.
basis_size_angular: nep.in gives 6 (default), nep.txt gives 8.
The same comparison is applied to the nep.txt read by the import_q_scaler keyword, where a mismatch is always an error.