new keywords for read_data: extra/X/per/atoms + changes to docs

This commit is contained in:
Andrew Jewett
2017-06-28 17:55:30 -07:00
parent fa30635465
commit 38075455b6
3 changed files with 70 additions and 22 deletions

View File

@ -211,13 +211,51 @@ void ReadData::command(int narg, char **arg)
if (extra_improper_types < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"extra/bond/per/atom") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
if (! atom->molecular)
error->all(FLERR,"No bonds allowed with this atom style");
atom->extra_bond_per_atom = force->inumeric(FLERR,arg[iarg+1]);
if (atom->extra_bond_per_atom < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"extra/angle/per/atom") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
if (! atom->molecular)
error->all(FLERR,"No angles allowed with this atom style");
atom->extra_angle_per_atom = force->inumeric(FLERR,arg[iarg+1]);
if (atom->extra_angle_per_atom < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"extra/dihedral/per/atom") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
if (! atom->molecular)
error->all(FLERR,"No dihedrals allowed with this atom style");
atom->extra_dihedral_per_atom = force->inumeric(FLERR,arg[iarg+1]);
if (atom->extra_dihedral_per_atom < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"extra/improper/per/atom") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
if (! atom->molecular)
error->all(FLERR,"No impropers allowed with this atom style");
atom->extra_improper_per_atom = force->inumeric(FLERR,arg[iarg+1]);
if (atom->extra_improper_per_atom < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"extra/special/per/atom") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
if (! atom->molecular)
error->all(FLERR,"No bonded interactions allowed with this atom style");
force->special_extra = force->inumeric(FLERR,arg[iarg+1]);
if (force->special_extra < 0)
error->all(FLERR,"Illegal read_data command");
iarg += 2;
} else if (strcmp(arg[iarg],"group") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
int igroup = group->find_or_create(arg[iarg+1]);
groupbit = group->bitmask[igroup];
iarg += 2;
} else if (strcmp(arg[iarg],"fix") == 0) {
if (iarg+4 > narg)
error->all(FLERR,"Illegal read_data command");