git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8313 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -251,25 +251,13 @@ void Respa::init()
|
|||||||
if (modify->nfix == 0 && comm->me == 0)
|
if (modify->nfix == 0 && comm->me == 0)
|
||||||
error->warning(FLERR,"No fixes defined, atoms won't move");
|
error->warning(FLERR,"No fixes defined, atoms won't move");
|
||||||
|
|
||||||
// incorrect pressures when using rRESPA with fix SHAKE
|
// warn about incorrect pressures when using rRESPA with fix SHAKE
|
||||||
// error if also using fix npt or fix nph or fix press/berendsen
|
|
||||||
// otherwise just warn
|
|
||||||
|
|
||||||
int shakeflag = 0;
|
int shakeflag = 0;
|
||||||
for (int i = 0; i < modify->nfix; i++)
|
for (int i = 0; i < modify->nfix; i++)
|
||||||
if (strcmp(modify->fix[i]->style,"shake") == 0) shakeflag = 1;
|
if (strcmp(modify->fix[i]->style,"shake") == 0) shakeflag = 1;
|
||||||
if (shakeflag) {
|
if (shakeflag && comm->me == 0)
|
||||||
int errorflag = 0;
|
|
||||||
for (int i = 0; i < modify->nfix; i++)
|
|
||||||
if (strstr(modify->fix[i]->style,"npt") == modify->fix[i]->style ||
|
|
||||||
strstr(modify->fix[i]->style,"nph") == modify->fix[i]->style ||
|
|
||||||
strstr(modify->fix[i]->style,"press/berendsen") == 0)
|
|
||||||
errorflag = 1;
|
|
||||||
if (errorflag)
|
|
||||||
error->all(FLERR,"Fix shake with rRESPA computes invalid pressures");
|
|
||||||
else if (comm->me == 0)
|
|
||||||
error->warning(FLERR,"Fix shake with rRESPA computes invalid pressures");
|
error->warning(FLERR,"Fix shake with rRESPA computes invalid pressures");
|
||||||
}
|
|
||||||
|
|
||||||
// create fix needed for storing atom-based respa level forces
|
// create fix needed for storing atom-based respa level forces
|
||||||
// will delete it at end of run
|
// will delete it at end of run
|
||||||
|
|||||||
Reference in New Issue
Block a user