From a23d2c3f98a32056868d74dc9cce5cfdc5f317c5 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Fri, 18 Sep 2020 09:01:21 +0000 Subject: [PATCH] Remove cutoff_scheme from t_forcerec and interaction_const_t --- src/gromacs/domdec/partition.cpp | 7 ++-- src/gromacs/mdlib/forcerec.cpp | 44 +++++++++---------------- src/gromacs/mdlib/sim_util.cpp | 5 --- src/gromacs/mdtypes/forcerec.h | 2 -- src/gromacs/mdtypes/interaction_const.h | 4 --- 5 files changed, 17 insertions(+), 45 deletions(-) diff --git a/src/gromacs/domdec/partition.cpp b/src/gromacs/domdec/partition.cpp index 4d3f88340b..d1488c855d 100644 --- a/src/gromacs/domdec/partition.cpp +++ b/src/gromacs/domdec/partition.cpp @@ -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); diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index 8dc12a3be3..34c10d3001 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -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(); ic->vdwEwaldTables = std::make_unique(); @@ -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) diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 7d1109889b..11da2a775d 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -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 diff --git a/src/gromacs/mdtypes/forcerec.h b/src/gromacs/mdtypes/forcerec.h index 9077b4b35d..d5f084faed 100644 --- a/src/gromacs/mdtypes/forcerec.h +++ b/src/gromacs/mdtypes/forcerec.h @@ -242,8 +242,6 @@ struct t_forcerec std::unique_ptr wholeMoleculeTransform; - int cutoff_scheme = 0; /* group- or Verlet-style cutoff */ - /* The Nbnxm Verlet non-bonded machinery */ std::unique_ptr nbv; diff --git a/src/gromacs/mdtypes/interaction_const.h b/src/gromacs/mdtypes/interaction_const.h index 8c4d3f373a..9114297bab 100644 --- a/src/gromacs/mdtypes/interaction_const.h +++ b/src/gromacs/mdtypes/interaction_const.h @@ -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; -- 2.22.0