Merge branch release-4-6
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_tune_pme.c
index 25f4c30065c6f3fa6b06874edbbbeb86ea53fd8c..eeed72959175821a327af34cd2d7a41528194d9c 100644 (file)
@@ -994,7 +994,7 @@ static void make_benchmark_tprs(
             ir->nkx = ir->nky = ir->nkz = 0;
             calc_grid(NULL, state.box, fourierspacing*fac, &ir->nkx, &ir->nky, &ir->nkz);
 
-            /* Adjust other radii since various conditions neet to be fulfilled */
+            /* Adjust other radii since various conditions need to be fulfilled */
             if (eelPME == ir->coulombtype)
             {
                 /* plain PME, rcoulomb must be equal to rlist */
@@ -1008,8 +1008,16 @@ static void make_benchmark_tprs(
 
             if (bScaleRvdw && evdwCUT == ir->vdwtype)
             {
-                /* For vdw cutoff, rvdw >= rlist */
-                ir->rvdw = max(info->rvdw[0], ir->rlist);
+                if (ecutsVERLET == ir->cutoff_scheme)
+                {
+                    /* With Verlet, the van der Waals radius must always equal the Coulomb radius */
+                    ir->rvdw = ir->rcoulomb;
+                }
+                else
+                {
+                    /* For vdw cutoff, rvdw >= rlist */
+                    ir->rvdw = max(info->rvdw[0], ir->rlist);
+                }
             }
 
             ir->rlistlong = max_cutoff(ir->rlist, max_cutoff(ir->rvdw, ir->rcoulomb));