Summary
The host deepmd pair style rejects spin atoms and tells the user to select a spin-aware pair style. The deepmd/kk compute override omits that guard, so an ordinary model can run with atom_style spin/kk while silently ignoring every atom's spin state.
This is present on origin/master at 8cfd46e37448.
Evidence
PairDeepMD::compute() contains:
if (atom->sp_flag) {
error->all(FLERR,
"Pair style 'deepmd' does not support spin atoms, please use "
"pair style 'deepspin' instead.");
}
PairDeepMDKokkos::compute() overrides the entire host compute path and never performs this check. Its device graph is built only from coordinates and atom types; it neither consumes atom->sp nor produces atom->fm.
Trigger and impact
Run an ordinary edge-, graph-, or canonical-input .pt2 model with:
atom_style spin/kk
pair_style deepmd/kk <ordinary-model.pt2>
Unlike pair_style deepmd, initialization and compute proceed. Changing magnetic moments has no effect, and no magnetic force is produced, which can silently yield invalid spin dynamics.
Expected behavior
PairDeepMDKokkos::init_style() or compute() should apply the same atom->sp_flag rejection as the host path. A regression should compare deepmd and deepmd/kk behavior for a spin atom style.
Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh
Summary
The host
deepmdpair style rejects spin atoms and tells the user to select a spin-aware pair style. Thedeepmd/kkcompute override omits that guard, so an ordinary model can run withatom_style spin/kkwhile silently ignoring every atom's spin state.This is present on
origin/masterat8cfd46e37448.Evidence
PairDeepMD::compute()contains:PairDeepMDKokkos::compute()overrides the entire host compute path and never performs this check. Its device graph is built only from coordinates and atom types; it neither consumesatom->spnor producesatom->fm.Trigger and impact
Run an ordinary edge-, graph-, or canonical-input
.pt2model with:Unlike
pair_style deepmd, initialization and compute proceed. Changing magnetic moments has no effect, and no magnetic force is produced, which can silently yield invalid spin dynamics.Expected behavior
PairDeepMDKokkos::init_style()orcompute()should apply the sameatom->sp_flagrejection as the host path. A regression should comparedeepmdanddeepmd/kkbehavior for a spin atom style.Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh