Move computeSlowForces into stepWork
[alexxy/gromacs.git] / src / gromacs / mdlib / force.cpp
index f7c5a486cfd895cd493005d3ec0a5908717d83b6..2bd8088a6a95ad3ace559280359d8f861e7381e7 100644 (file)
@@ -122,7 +122,8 @@ void calculateLongRangeNonbondeds(t_forcerec*                   fr,
     /* Do long-range electrostatics and/or LJ-PME
      * and compute PME surface terms when necessary.
      */
-    if (computePmeOnCpu || fr->ic->eeltype == eelEWALD || haveEwaldSurfaceTerm)
+    if ((computePmeOnCpu || fr->ic->eeltype == eelEWALD || haveEwaldSurfaceTerm)
+        && stepWork.computeNonbondedForces)
     {
         int  status = 0;
         real Vlr_q = 0, Vlr_lj = 0;