must not set tip4p atom and bond types when restarting from a restart file
This commit is contained in:
@ -437,12 +437,15 @@ void PairLJCutTIP4PLongSoft::settings(int narg, char **arg)
|
||||
|
||||
void PairLJCutTIP4PLongSoft::coeff(int narg, char **arg)
|
||||
{
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
PairLJCutCoulLongSoft::coeff(narg, arg);
|
||||
}
|
||||
|
||||
@ -394,12 +394,15 @@ void PairTIP4PLongSoft::settings(int narg, char **arg)
|
||||
|
||||
void PairTIP4PLongSoft::coeff(int narg, char **arg)
|
||||
{
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
PairCoulLongSoft::coeff(narg, arg);
|
||||
}
|
||||
|
||||
@ -451,12 +451,15 @@ void PairLJCutTIP4PLong::settings(int narg, char **arg)
|
||||
|
||||
void PairLJCutTIP4PLong::coeff(int narg, char **arg)
|
||||
{
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
PairLJCutCoulLong::coeff(narg, arg);
|
||||
}
|
||||
|
||||
@ -1468,12 +1468,15 @@ void PairLJLongTIP4PLong::settings(int narg, char **arg)
|
||||
|
||||
void PairLJLongTIP4PLong::coeff(int narg, char **arg)
|
||||
{
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
PairLJLongCoulLong::coeff(narg, arg);
|
||||
}
|
||||
|
||||
@ -407,12 +407,15 @@ void PairTIP4PLong::settings(int narg, char **arg)
|
||||
|
||||
void PairTIP4PLong::coeff(int narg, char **arg)
|
||||
{
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
PairCoulLong::coeff(narg, arg);
|
||||
}
|
||||
|
||||
@ -457,12 +457,15 @@ void PairLJCutTIP4PCut::coeff(int narg, char **arg)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error);
|
||||
|
||||
@ -396,12 +396,15 @@ void PairTIP4PCut::coeff(int narg, char **arg)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
// set atom types from pair_style command
|
||||
// set atom types from pair_style command unless we were restarted
|
||||
// and the types are already set and the strings are empty.
|
||||
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
if (typeO_str.size() > 0) {
|
||||
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp);
|
||||
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp);
|
||||
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp);
|
||||
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp);
|
||||
}
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error);
|
||||
|
||||
Reference in New Issue
Block a user