rename dlm option to dipole/dlm and turn on dipole flag with it as well

This commit is contained in:
Axel Kohlmeyer
2016-07-27 07:56:53 -04:00
parent 01e12e23c2
commit 671ca115f9
4 changed files with 30 additions and 27 deletions

View File

@ -331,11 +331,11 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
} else if (strcmp(arg[iarg],"update") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command");
if (strcmp(arg[iarg+1],"dipole") == 0) dipole_flag = 1;
else error->all(FLERR,"Illegal fix nvt/npt/nph command");
else if (strcmp(arg[iarg],"dipole/dlm") == 0) {
dipole_flag = 1;
dlm_flag = 1;
} else error->all(FLERR,"Illegal fix nvt/npt/nph command");
iarg += 2;
} else if (strcmp(arg[iarg],"dlm") == 0) {
dlm_flag = 1;
iarg += 1;
} else if (strcmp(arg[iarg],"fixedpoint") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command");
fixedpoint[0] = force->numeric(FLERR,arg[iarg+1]);
@ -439,9 +439,6 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
error->all(FLERR,"Using update dipole flag requires atom attribute mu");
}
if (dlm_flag && !dipole_flag)
error->all(FLERR,"The dlm flag must be used with update dipole");
if ((tstat_flag && t_period <= 0.0) ||
(p_flag[0] && p_period[0] <= 0.0) ||
(p_flag[1] && p_period[1] <= 0.0) ||