fix issue with pair style srp that broke regression test

This commit is contained in:
Axel Kohlmeyer
2024-08-14 05:16:45 -04:00
parent 35cf16b109
commit 7ecdea20eb

View File

@ -400,11 +400,12 @@ void PairSRP::coeff(int narg, char **arg)
if (btype_str.size() > 0) if (btype_str.size() > 0)
btype = utils::expand_type_int(FLERR, btype_str, Atom::BOND, lmp); btype = utils::expand_type_int(FLERR, btype_str, Atom::BOND, lmp);
if ((btype > atom->nbondtypes) || (btype <= 0)) if ((btype > atom->nbondtypes) || (btype <= 0))
error->all(FLERR,"Illegal pair_style command"); error->all(FLERR,"Invalid bond type {} for pair style srp", btype);
if (bptype_str.size() > 0)
bptype = utils::expand_type_int(FLERR, bptype_str, Atom::ATOM, lmp); bptype = utils::expand_type_int(FLERR, bptype_str, Atom::ATOM, lmp);
if ((bptype < 1) || (bptype > atom->ntypes)) if ((bptype < 1) || (bptype > atom->ntypes))
error->all(FLERR,"Illegal bond particle type for srp"); error->all(FLERR,"Invalid bond particle type {} for pair style srp", bptype);
// reset cutoffs if explicitly set // reset cutoffs if explicitly set
if (allocated) { if (allocated) {