From 44a8e24e2a878103b19f481e4a18c15a1f30b24c Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 19 Jun 2012 00:00:13 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8313 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/respa.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/respa.cpp b/src/respa.cpp index a91037b8d1..96cd4a959b 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -251,25 +251,13 @@ void Respa::init() if (modify->nfix == 0 && comm->me == 0) error->warning(FLERR,"No fixes defined, atoms won't move"); - // incorrect pressures when using rRESPA with fix SHAKE - // error if also using fix npt or fix nph or fix press/berendsen - // otherwise just warn + // warn about incorrect pressures when using rRESPA with fix SHAKE int shakeflag = 0; for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"shake") == 0) shakeflag = 1; - if (shakeflag) { - 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"); - } + if (shakeflag && comm->me == 0) + error->warning(FLERR,"Fix shake with rRESPA computes invalid pressures"); // create fix needed for storing atom-based respa level forces // will delete it at end of run