Remove obsolete mdp option ns-type
authorBerk Hess <hess@kth.se>
Thu, 12 Sep 2019 07:56:27 +0000 (09:56 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 16 Sep 2019 20:26:37 +0000 (22:26 +0200)
Also removed unused member ndelta from t_inputrec.

Change-Id: Idde132176582001bdffafa6fa64af2eed9d0c242

21 files changed:
docs/user-guide/mdp-options.rst
src/gromacs/domdec/domdec.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsDefineParametersWithValuesIncludingAssignment.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsElectricField.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsElectricFieldOscillating.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsElectricFieldPulsed.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsEmptyLines.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsImplicitSolventNo.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsKeyWithoutValue.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_AcceptsMimic.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_HandlesDifferentKindsOfMdpLines.xml
src/gromacs/gmxpreprocess/tests/refdata/GetIrTest_HandlesOnlyCutoffScheme.xml
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdtypes/forcerec.h
src/gromacs/mdtypes/inputrec.cpp
src/gromacs/mdtypes/inputrec.h
src/gromacs/mdtypes/md_enums.cpp
src/gromacs/mdtypes/md_enums.h

index a5af05ee0c73e0fa514dc3aa2091181069b0d077..cf5530e518a6722890e75991cefbe8c251801107 100644 (file)
@@ -460,21 +460,6 @@ Neighbor searching
 
       Unused.
 
-.. mdp:: ns-type
-
-   .. mdp-value:: grid
-
-      Make a grid in the box and only check atoms in neighboring grid
-      cells when constructing a new neighbor list every
-      :mdp:`nstlist` steps. In large systems grid search is much
-      faster than simple search.
-
-   .. mdp-value:: simple
-
-      Check every atom in the box when constructing a new neighbor
-      list every :mdp:`nstlist` steps (only with :mdp-value:`cutoff-scheme=group`
-      cut-off scheme).
-
 .. mdp:: pbc
 
    .. mdp-value:: xyz
index f02b37a39c652fcfee12a09df8d8493f3105bf9b..bffa2ffb4433e7e0a938216d8d2cc152e6773e2c 100644 (file)
@@ -1867,11 +1867,6 @@ static void check_dd_restrictions(const gmx_domdec_t  *dd,
         gmx_fatal(FARGS, "With pbc=%s can only do domain decomposition in the x-direction", epbc_names[ir->ePBC]);
     }
 
-    if (ir->ns_type == ensSIMPLE)
-    {
-        gmx_fatal(FARGS, "Domain decomposition does not support simple neighbor searching, use grid searching or run with one MPI rank");
-    }
-
     if (ir->nstlist == 0)
     {
         gmx_fatal(FARGS, "Domain decomposition does not work with nstlist=0");
index 300f56ba67d9f855e0cddc8274ba181dcd0b95c5..67a1284714232eb82e9fb71b12b55a0d1e40ea09 100644 (file)
@@ -1104,7 +1104,7 @@ static void do_inputrec(gmx::ISerializer         *serializer,
     {
         ir->cutoff_scheme = ecutsGROUP;
     }
-    serializer->doInt(&ir->ns_type);
+    serializer->doInt(&idum); /* used to be ns_type; not used anymore */
     serializer->doInt(&ir->nstlist);
     serializer->doInt(&idum); /* used to be ndelta; not used anymore */
 
index bd32aca846b26246bf76f45ad1074cb109443843..ffdc4da528b5e8bb86fcc35a4cf64fab24e3147d 100644 (file)
@@ -2248,14 +2248,7 @@ int gmx_grompp(int argc, char *argv[])
     /* make exclusions between QM atoms and remove charges if needed */
     if (ir->bQMMM)
     {
-        if (ir->QMMMscheme == eQMMMschemenormal && ir->ns_type == ensSIMPLE)
-        {
-            gmx_fatal(FARGS, "electrostatic embedding only works with grid neighboursearching, use ns-type=grid instead\n");
-        }
-        else
-        {
-            generate_qmexcl(&sys, ir, wi, GmxQmmmMode::GMX_QMMM_ORIGINAL);
-        }
+        generate_qmexcl(&sys, ir, wi, GmxQmmmMode::GMX_QMMM_ORIGINAL);
         if (ir->QMMMscheme != eQMMMschemeoniom)
         {
             std::vector<int> qmmmAtoms = qmmmAtomIndices(*ir, sys);
index c0623751e85bfc4d3ebe0cd3e5134ce04eaaa329..f64b4cec519d8c25efec375462687cabbe954788 100644 (file)
@@ -546,8 +546,6 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
     {
         sprintf(err_buf, "TPI only works with pbc = %s", epbc_names[epbcXYZ]);
         CHECK(ir->ePBC != epbcXYZ);
-        sprintf(err_buf, "TPI only works with ns = %s", ens_names[ensGRID]);
-        CHECK(ir->ns_type != ensGRID);
         sprintf(err_buf, "with TPI nstlist should be larger than zero");
         CHECK(ir->nstlist <= 0);
         sprintf(err_buf, "TPI does not work with full electrostatics other than PME");
@@ -1757,6 +1755,7 @@ void get_ir(const char *mdparin, const char *mdparout,
     replace_inp_entry(inp, "gb-dielectric-offset", nullptr);
     replace_inp_entry(inp, "sa-algorithm", nullptr);
     replace_inp_entry(inp, "sa-surface-tension", nullptr);
+    replace_inp_entry(inp, "ns-type", nullptr);
 
     /* replace the following commands with the clearer new versions*/
     replace_inp_entry(inp, "unconstrained-start", "continuation");
@@ -1838,8 +1837,6 @@ void get_ir(const char *mdparin, const char *mdparout,
     ir->cutoff_scheme = get_eeenum(&inp, "cutoff-scheme",    ecutscheme_names, wi);
     printStringNoNewline(&inp, "nblist update frequency");
     ir->nstlist = get_eint(&inp, "nstlist",    10, wi);
-    printStringNoNewline(&inp, "ns algorithm (simple or grid)");
-    ir->ns_type = get_eeenum(&inp, "ns-type",    ens_names, wi);
     printStringNoNewline(&inp, "Periodic boundary conditions: xyz, no, xy");
     ir->ePBC          = get_eeenum(&inp, "pbc",       epbc_names, wi);
     ir->bPeriodicMols = get_eeenum(&inp, "periodic-molecules", yesno_names, wi) != 0;
@@ -4163,7 +4160,6 @@ void double_check(t_inputrec *ir, matrix box,
                   bool bHasAnyConstraints,
                   warninp_t wi)
 {
-    real        min_size;
     char        warn_buf[STRLEN];
     const char *ptr;
 
@@ -4222,26 +4218,10 @@ void double_check(t_inputrec *ir, matrix box,
         {
             warning(wi, "With nstlist=0 atoms are only put into the box at step 0, therefore drifting atoms might cause the simulation to crash.");
         }
-        if (ir->ns_type == ensGRID)
+        if (gmx::square(ir->rlist) >= max_cutoff2(ir->ePBC, box))
         {
-            if (gmx::square(ir->rlist) >= max_cutoff2(ir->ePBC, box))
-            {
-                sprintf(warn_buf, "ERROR: The cut-off length is longer than half the shortest box vector or longer than the smallest box diagonal element. Increase the box size or decrease rlist.\n");
-                warning_error(wi, warn_buf);
-            }
-        }
-        else
-        {
-            min_size = std::min(box[XX][XX], std::min(box[YY][YY], box[ZZ][ZZ]));
-            if (2*ir->rlist >= min_size)
-            {
-                sprintf(warn_buf, "ERROR: One of the box lengths is smaller than twice the cut-off length. Increase the box size or decrease rlist.");
-                warning_error(wi, warn_buf);
-                if (TRICLINIC(box))
-                {
-                    fprintf(stderr, "Grid search might allow larger cut-off's than simple search with triclinic boxes.");
-                }
-            }
+            sprintf(warn_buf, "ERROR: The cut-off length is longer than half the shortest box vector or longer than the smallest box diagonal element. Increase the box size or decrease rlist.\n");
+            warning_error(wi, warn_buf);
         }
     }
 }
index 2f245eeb275d662c2aa7561b71a3180b5a5f7dea..e608872e36082949291069dda3ed118cec1a7889 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index 5ed81b24e68b6becee330a12779a68c4b8c5dc6b..37314f84e03fb737497b818e0c2a51b893e901b8 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index 44c58b763ce382301c013393edf7794e8bb4b3c3..b5ccd4acb91d7981321d2b1100e5320c1b33dab8 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index 87feffeb09c02c30071a80ec89cf9cc765db3658..888e418e9577602e2d1872be42daf506dbf248a2 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index d1f17e207707f83e842841efda77ba4fb3e28715..df57eff5970796b8fb4d0b4a2847d922b634c9fa 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index d1f17e207707f83e842841efda77ba4fb3e28715..df57eff5970796b8fb4d0b4a2847d922b634c9fa 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index d1f17e207707f83e842841efda77ba4fb3e28715..df57eff5970796b8fb4d0b4a2847d922b634c9fa 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index b4534cb0c6aacee20a8b79e7b8675ba840862233..8049ef3a2e29f1de14e8fda93278aaa40c7a099d 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index ad013492cb3967a48f07482328cebafb9db3e830..bb7919de70dadb87084d1ddbd50dbd9daf2804ec 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Verlet
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index f232463605f134db5899fb269c300e47ace5a615..676e87abc765a874f69e9eeed34b6c0a841510d2 100644 (file)
@@ -71,8 +71,6 @@ energygrps               =
 cutoff-scheme            = Group
 ; nblist update frequency
 nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
 ; Periodic boundary conditions: xyz, no, xy
 pbc                      = xyz
 periodic-molecules       = no
index 0b478cf1106799866f2359268347a074fee7c634..070cfad1044963d8c1c335c328efeeb14a061b14 100644 (file)
@@ -1604,7 +1604,6 @@ void init_forcerec(FILE                             *fp,
 
     /* Neighbour searching stuff */
     fr->cutoff_scheme = ir->cutoff_scheme;
-    fr->bGrid         = (ir->ns_type == ensGRID);
     fr->ePBC          = ir->ePBC;
 
     /* Determine if we will do PBC for distances in bonded interactions */
index 98498895715580d9641f8f6059d372cf8f823322..78e826a4901dc47e393ccdd5f3fb890c8ee59b50 100644 (file)
@@ -191,7 +191,6 @@ struct t_forcerec { // NOLINT (clang-analyzer-optin.performance.Padding)
      * It can be set to esolNO to disable all water optimization */
     int                 solvent_opt                  = 0;
     int                 nWatMol                      = 0;
-    gmx_bool            bGrid                        = FALSE;
     gmx_bool            bExcl_IntraCGAll_InterCGNone = FALSE;
     struct cginfo_mb_t *cginfo_mb                    = nullptr;
     std::vector<int>    cginfo;
index 6ac3b630703c688f79d3dfef77f9544923a4f239..7445dfc4cc7f0b9074924d2e33e86362b0cdf32f 100644 (file)
@@ -879,7 +879,6 @@ void pr_inputrec(FILE *fp, int indent, const char *title, const t_inputrec *ir,
         /* Neighborsearching parameters */
         PS("cutoff-scheme", ECUTSCHEME(ir->cutoff_scheme));
         PI("nstlist", ir->nstlist);
-        PS("ns-type", ENS(ir->ns_type));
         PS("pbc", epbc_names[ir->ePBC]);
         PS("periodic-molecules", EBOOL(ir->bPeriodicMols));
         PR("verlet-buffer-tolerance", ir->verletbuf_tol);
@@ -1273,7 +1272,6 @@ void cmp_inputrec(FILE *fp, const t_inputrec *ir1, const t_inputrec *ir2, real f
     cmp_int(fp, "inputrec->ePBC", -1, ir1->ePBC, ir2->ePBC);
     cmp_bool(fp, "inputrec->bPeriodicMols", -1, ir1->bPeriodicMols, ir2->bPeriodicMols);
     cmp_int(fp, "inputrec->cutoff_scheme", -1, ir1->cutoff_scheme, ir2->cutoff_scheme);
-    cmp_int(fp, "inputrec->ns_type", -1, ir1->ns_type, ir2->ns_type);
     cmp_int(fp, "inputrec->nstlist", -1, ir1->nstlist, ir2->nstlist);
     cmp_int(fp, "inputrec->nstcomm", -1, ir1->nstcomm, ir2->nstcomm);
     cmp_int(fp, "inputrec->comm_mode", -1, ir1->comm_mode, ir2->comm_mode);
index dc24fc035b194f3894dc1eaacdf52a8498d669b6..6cff9d6df6458df0b88706a8f322f497cc41c549 100644 (file)
@@ -342,12 +342,8 @@ struct t_inputrec // NOLINT (clang-analyzer-optin.performance.Padding)
     int                         nstcalcenergy;
     //! Group or verlet cutoffs
     int                         cutoff_scheme;
-    //! Which neighbor search method should we use?
-    int                         ns_type;
     //! Number of steps before pairlist is generated
     int                         nstlist;
-    //! Number of cells per rlong
-    int                         ndelta;
     //! Number of steps after which center of mass motion is removed
     int                         nstcomm;
     //! Center of mass motion removal algorithm
index 71e4b5636ac683cd0ab9f6bb0f212525e7c66a19..b3f231d4d04fc8dc59513d87b3ba7792ca520b7b 100644 (file)
@@ -56,11 +56,6 @@ const char *yesno_names[BOOL_NR+1] =
     "no", "yes", nullptr
 };
 
-const char *ens_names[ensNR+1] =
-{
-    "Grid", "Simple", nullptr
-};
-
 const char *ei_names[eiNR+1] =
 {
     "md", "steep", "cg", "bd", "sd2 - removed", "nm", "l-bfgs", "tpi", "tpic", "sd", "md-vv", "md-vv-avek", "mimic", nullptr
index ed005b3219c5b6f8ee5fc12f9db23fb160bdaf88..d731900352164df58fad28c84fe398b1d9fe96ae 100644 (file)
@@ -211,15 +211,6 @@ extern const char *eljpme_names[eljpmeNR+1];
 //! Macro to tell us whether we use LJPME
 #define EVDW_PME(e) ((e) == evdwPME)
 
-//! Neighborsearching algorithm
-enum {
-    ensGRID, ensSIMPLE, ensNR
-};
-//! String corresponding to neighborsearching
-extern const char *ens_names[ensNR+1];
-//! Macro for correct NS algorithm
-#define ENS(e)         enum_name(e, ensNR, ens_names)
-
 /*! \brief Integrator algorithm
  *
  * eiSD2 has been removed, but we keep a renamed enum entry,