Merge branch 'USER-DPD_kokkos' into USER-DPD_GBhacks as of patch 10Aug17

This commit is contained in:
Tim Mattox
2017-08-11 14:53:44 -04:00
1986 changed files with 154742 additions and 53122 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");
@ -930,6 +968,7 @@ void ReadData::header(int firstpass)
// search line for header keyword and set corresponding variable
// customize for new header lines
// check for triangles before angles so "triangles" not matched as "angles"
int extra_flag_value = 0;
if (strstr(line,"atoms")) {
sscanf(line,BIGINT_FORMAT,&natoms);
@ -991,17 +1030,26 @@ void ReadData::header(int firstpass)
atom->nimpropertypes = nimpropertypes + extra_improper_types;
// these settings only used by first data file
// also, these are obsolescent. we parse them to maintain backward
// compatibility, but the recommended way is to set them via keywords
// in the LAMMPS input file. In case these flags are set in both,
// the input and the data file, we use the larger of the two.
} else if (strstr(line,"extra bond per atom")) {
if (addflag == NONE) sscanf(line,"%d",&atom->extra_bond_per_atom);
if (addflag == NONE) sscanf(line,"%d",&extra_flag_value);
atom->extra_bond_per_atom = MAX(atom->extra_bond_per_atom,extra_flag_value);
} else if (strstr(line,"extra angle per atom")) {
if (addflag == NONE) sscanf(line,"%d",&atom->extra_angle_per_atom);
if (addflag == NONE) sscanf(line,"%d",&extra_flag_value);
atom->extra_angle_per_atom = MAX(atom->extra_angle_per_atom,extra_flag_value);
} else if (strstr(line,"extra dihedral per atom")) {
if (addflag == NONE) sscanf(line,"%d",&atom->extra_dihedral_per_atom);
if (addflag == NONE) sscanf(line,"%d",&extra_flag_value);
atom->extra_dihedral_per_atom = MAX(atom->extra_dihedral_per_atom,extra_flag_value);
} else if (strstr(line,"extra improper per atom")) {
if (addflag == NONE) sscanf(line,"%d",&atom->extra_improper_per_atom);
if (addflag == NONE) sscanf(line,"%d",&extra_flag_value);
atom->extra_improper_per_atom = MAX(atom->extra_improper_per_atom,extra_flag_value);
} else if (strstr(line,"extra special per atom")) {
if (addflag == NONE) sscanf(line,"%d",&force->special_extra);
if (addflag == NONE) sscanf(line,"%d",&extra_flag_value);
force->special_extra = MAX(force->special_extra,extra_flag_value);
// local copy of box info
// so can treat differently for first vs subsequent data files