spin_version

This keyword specifies the magnetic descriptor and parameter-layout contract of the spin-dependent energy model:

model nep_spin
spin_version 1

The only supported value is 1, which is also the default for model nep_spin. Omit this keyword for other models. Using spin_version 1 without model still selects the spin model, but prints a deprecation warning asking for an explicit model nep_spin. A missing value, an unsupported version, or a repeated model selector is an input error. Version 1 uses the order/compression descriptor described in Spin potential; spin_order independently selects its contraction order.

Spin training requires version 4 and one hidden layer. Legacy inputs may use model_type 0, but must not combine it with the model keyword. version identifies the NEP architecture; spin_version identifies the magnetic descriptor and parameter-layout contract. The resulting nep.txt contains model nep_spin and spin_version 1. Prediction, scaler import, and restart require a compatible model. The shared model-file keyword format_version does not belong in nep.in.

Every training frame must contain a Cartesian spin:R:3 property. Add mforce:R:3 to train magnetic forces; see train.xyz and test.xyz for aliases and units. Charge models and type-dependent structural cutoffs are unsupported. Type-dependent spin_cutoff and universal zbl are supported; flexible ZBL and fine_tune are unsupported. See import_q_scaler for scaler import and restart behavior.

Training example

The following Spin setup uses the default descriptor shape. spin_compress defaults to 2 and may be omitted. Together with the structural defaults, this gives 55 magnetic and 97 total coordinates, within Model dimensions:

version          4
type             2 Fe Ge
model            nep_spin
spin_version     1
spin_basis_size  8 0
spin_l_max       2 0 0
spin_compress    2
spin_order       3
spin_soc         1
neuron           30
lambda_m         1.0
batch            1000
generation       100000

Each frame in train.xyz and test.xyz must then contain a Cartesian spin:R:3 property. Add mforce:R:3 when training magnetic forces. See train.xyz and test.xyz for the complete data contract and Spin potential for the Spin3 formalism.

See Model dimensions before changing the descriptor shape.