Remove cutoff_scheme from t_forcerec and interaction_const_t
authorBerk Hess <hess@kth.se>
Fri, 18 Sep 2020 09:01:21 +0000 (09:01 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Fri, 18 Sep 2020 09:01:21 +0000 (09:01 +0000)
src/gromacs/domdec/partition.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdtypes/forcerec.h
src/gromacs/mdtypes/interaction_const.h

index 4d3f88340bf7d4c5357fb8e7003feab7c29b7433..d1488c855dec91163532b7ddfe33e0a8130c05bb 100644 (file)
@@ -3052,11 +3052,8 @@ void dd_partition_system(FILE*                     fplog,
     /* Set the charge group boundaries for neighbor searching */
     set_cg_boundaries(&comm->zones);
 
-    if (fr->cutoff_scheme == ecutsVERLET)
-    {
-        /* When bSortCG=true, we have already set the size for zone 0 */
-        set_zones_size(dd, state_local->box, &ddbox, bSortCG ? 1 : 0, comm->zones.n, 0);
-    }
+    /* When bSortCG=true, we have already set the size for zone 0 */
+    set_zones_size(dd, state_local->box, &ddbox, bSortCG ? 1 : 0, comm->zones.n, 0);
 
     wallcycle_sub_stop(wcycle, ewcsDD_SETUPCOMM);
 
index 8dc12a3be3638a6265adbee7e55d5768924f2b92..34c10d30019712bf1a9b3867239c6d20b5b03964 100644 (file)
@@ -825,8 +825,6 @@ static void init_interaction_const(FILE*                 fp,
 {
     interaction_const_t* ic = new interaction_const_t;
 
-    ic->cutoff_scheme = ir->cutoff_scheme;
-
     ic->coulombEwaldTables = std::make_unique<EwaldCorrectionTables>();
     ic->vdwEwaldTables     = std::make_unique<EwaldCorrectionTables>();
 
@@ -1021,8 +1019,7 @@ void init_forcerec(FILE*                            fp,
     fr->bBHAM = (mtop->ffparams.functype[0] == F_BHAM);
 
     /* Neighbour searching stuff */
-    fr->cutoff_scheme = ir->cutoff_scheme;
-    fr->pbcType       = ir->pbcType;
+    fr->pbcType = ir->pbcType;
 
     /* Determine if we will do PBC for distances in bonded interactions */
     if (fr->pbcType == PbcType::No)
@@ -1139,25 +1136,20 @@ void init_forcerec(FILE*                            fp,
     }
     fr->nbkernel_vdw_modifier = ic->vdw_modifier;
 
-    if (ir->cutoff_scheme == ecutsVERLET)
+    if (!gmx_within_tol(ic->reppow, 12.0, 10 * GMX_DOUBLE_EPS))
     {
-        if (!gmx_within_tol(ic->reppow, 12.0, 10 * GMX_DOUBLE_EPS))
-        {
-            gmx_fatal(FARGS, "Cut-off scheme %s only supports LJ repulsion power 12",
-                      ecutscheme_names[ir->cutoff_scheme]);
-        }
-        /* Older tpr files can contain Coulomb user tables with the Verlet cutoff-scheme,
-         * while mdrun does not (and never did) support this.
-         */
-        if (EEL_USER(fr->ic->eeltype))
-        {
-            gmx_fatal(FARGS, "Combination of %s and cutoff scheme %s is not supported",
-                      eel_names[ir->coulombtype], ecutscheme_names[ir->cutoff_scheme]);
-        }
-
-        fr->bvdwtab  = FALSE;
-        fr->bcoultab = FALSE;
+        gmx_fatal(FARGS, "Only LJ repulsion power 12 is supported");
     }
+    /* Older tpr files can contain Coulomb user tables with the Verlet cutoff-scheme,
+     * while mdrun does not (and never did) support this.
+     */
+    if (EEL_USER(fr->ic->eeltype))
+    {
+        gmx_fatal(FARGS, "Electrostatics type %s is currently not supported", eel_names[ir->coulombtype]);
+    }
+
+    fr->bvdwtab  = FALSE;
+    fr->bcoultab = FALSE;
 
     /* 1-4 interaction electrostatics */
     fr->fudgeQQ = mtop->ffparams.fudgeQQ;
@@ -1210,15 +1202,9 @@ void init_forcerec(FILE*                            fp,
         gmx_fatal(FARGS, "Switch/shift interaction not supported with Buckingham");
     }
 
-    if (fr->bBHAM && fr->cutoff_scheme == ecutsVERLET)
-    {
-        gmx_fatal(FARGS, "Verlet cutoff-scheme is not supported with Buckingham");
-    }
-
-    if (fp && fr->cutoff_scheme == ecutsGROUP)
+    if (fr->bBHAM)
     {
-        fprintf(fp, "Cut-off's:   NS: %g   Coulomb: %g   %s: %g\n", fr->rlist, ic->rcoulomb,
-                fr->bBHAM ? "BHAM" : "LJ", ic->rvdw);
+        gmx_fatal(FARGS, "The Verlet cutoff-scheme does not (yet) support Buckingham");
     }
 
     if (ir->implicit_solvent)
index 7d1109889be7d6dbeb9449d517b686dedfb44313..11da2a775dead945da991e0b0010687d05b816cb 100644 (file)
@@ -402,11 +402,6 @@ static void do_nb_verlet(t_forcerec*                fr,
     nonbonded_verlet_t* nbv = fr->nbv.get();
 
     /* GPU kernel launch overhead is already timed separately */
-    if (fr->cutoff_scheme != ecutsVERLET)
-    {
-        gmx_incons("Invalid cut-off scheme passed!");
-    }
-
     if (!nbv->useGpu())
     {
         /* When dynamic pair-list  pruning is requested, we need to prune
index 9077b4b35deb4f0671a474081c14b79f5418dc9f..d5f084faed5c1c3785161b32c79263221fef81b0 100644 (file)
@@ -242,8 +242,6 @@ struct t_forcerec
 
     std::unique_ptr<gmx::WholeMoleculeTransform> wholeMoleculeTransform;
 
-    int cutoff_scheme = 0; /* group- or Verlet-style cutoff */
-
     /* The Nbnxm Verlet non-bonded machinery */
     std::unique_ptr<nonbonded_verlet_t> nbv;
 
index 8c4d3f373aaf85369f479a3227aadc579ebc3134..9114297bab5e789f37299e823228083122b0e931 100644 (file)
@@ -126,10 +126,6 @@ struct interaction_const_t
         real sigma6Minimum;
     };
 
-    // Cut-off scheme, only present for reading and (not) running old tpr files
-    // which still supported the group cutoff-scheme
-    int cutoff_scheme = ecutsVERLET;
-
     /* VdW */
     int                    vdwtype          = evdwCUT;
     int                    vdw_modifier     = eintmodNONE;