Move check to be with other checks
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user