Move check to be with other checks

This commit is contained in:
Sieds Lykles
2024-02-20 00:55:15 +01:00
parent aafe28da4d
commit c115cdb18d

View File

@ -183,8 +183,6 @@ void CreateAtoms::command(int narg, char **arg)
"Only the first set will be used.");
mode = MOLECULE;
onemol = atom->molecules[imol];
if (atom->molecular == Atom::TEMPLATE && onemol != atom->avec->onemols[0])
error->all(FLERR, "create_atoms molecule template ID must be same as atom style template ID");
molseed = utils::inumeric(FLERR, arg[iarg + 2], false, lmp);
iarg += 3;
} else if (strcmp(arg[iarg], "units") == 0) {
@ -303,6 +301,8 @@ void CreateAtoms::command(int narg, char **arg)
error->all(FLERR, "Invalid atom type in create_atoms mol command");
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])
error->all(FLERR, "Create_atoms molecule template ID must be same as atom style template ID");
onemol->check_attributes();