Update src/create_atoms.cpp

Co-authored-by: Axel Kohlmeyer <akohlmey@gmail.com>
This commit is contained in:
alphataubio
2024-10-03 09:48:12 -04:00
committed by GitHub
parent cac22c216a
commit 9c06e8265f

View File

@ -303,7 +303,7 @@ void CreateAtoms::command(int narg, char **arg)
if (onemol->xflag == 0) error->all(FLERR, "Create_atoms molecule must have coordinates");
if (onemol->typeflag == 0) error->all(FLERR, "Create_atoms molecule must have atom types");
if (ntype + onemol->ntypes <= 0 || ntype + onemol->ntypes > atom->ntypes)
error->all(FLERR, "Invalid atom type {} in create_atoms mol command (onemol->ntypes {} atom->ntypes {})", ntype, onemol->ntypes, atom->ntypes);
error->all(FLERR, "Invalid atom type {} in create_atoms mol command", ntype + onemol->ntypes);
if (onemol->tag_require && !atom->tag_enable)
error->all(FLERR, "Create_atoms molecule has atom IDs, but system does not");
if (atom->molecular == Atom::TEMPLATE && onemol != atom->avec->onemols[0])