Made cutoff-scheme=Verlet the default
authorBerk Hess <hess@kth.se>
Mon, 2 Dec 2013 16:20:01 +0000 (17:20 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 2 Dec 2013 22:47:25 +0000 (23:47 +0100)
Since the most common options are now supported by the Verlet
cut-off scheme and is it more accurate by default, supports GPUs
and is faster for any non-water system, this is now the default.
Not supported yet are pbc!=xyz and generalized-Born.

Change-Id: Iba292d22c6f3a4dce18d0911b062f2beb70365cb

share/html/online/mdp_opt.html
src/gromacs/fileio/tpxio.c
src/gromacs/gmxlib/names.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/legacyheaders/types/enums.h
src/programs/mdrun/tests/moduletest.cpp

index 857af6801345dbe0f24417c0fe0b240f40d06947..97c9e67fc45630085834ee9f8a043a3cbef92ce9 100644 (file)
@@ -370,15 +370,6 @@ energy averages and fluctuations also when <b>nstenergy</b><tt>&gt;1</tt></dd>
 <dl>
 <dt><b>cutoff-scheme:</b></dt>
 <dd><dl compact>
-<dt><b>group</b></dt>
-<dd>Generate a pair list for groups of atoms. These groups correspond to the 
-charge groups in the topology. This was the only cut-off treatment scheme 
-before version 4.6. 
-There is no explicit buffering of the pair list. This enables efficient force 
-calculations, but energy is only conserved when a buffer is explicitly added. 
-For energy conservation, the <b>Verlet</b> option provides a more convenient 
-and efficient algorithm.</dd>
-
 <dt><b>Verlet</b></dt>
 <dd>Generate a pair list with buffering. The buffer size is automatically set 
 based on <b>verlet-buffer-tolerance</b>, unless this is set to -1, in which case
@@ -386,13 +377,21 @@ based on <b>verlet-buffer-tolerance</b>, unless this is set to -1, in which case
 <b>rvdw</b>=<b>rcoulomb</b>. Currently only cut-off, reaction-field, 
 PME electrostatics and plain LJ are supported. Some <tt>mdrun</tt> functionality 
 is not yet supported with the <b>Verlet</b> scheme, but <tt>grompp</tt> checks for this. 
-Native GPU acceleration is only supported with <b>Verlet</b>. With GPU-accelerated PME,
+Native GPU acceleration is only supported with <b>Verlet</b>.
+With GPU-accelerated PME or with separate PME ranks,
 <tt>mdrun</tt> will automatically tune the CPU/GPU load balance by 
 scaling <b>rcoulomb</b> and the grid spacing. This can be turned off with 
 <tt>-notunepme</tt>.
 
-<b>Verlet</b> is somewhat faster than <b>group</b> when there is no water, or if <b>group</b> would use a pair-list buffer to conserve energy.
+<b>Verlet</b> is faster than <b>group</b> when there is no water, or if <b>group</b> would use a pair-list buffer to conserve energy.
 </dd>
+<dt><b>group</b></dt>
+<dd>Generate a pair list for groups of atoms. These groups correspond to the 
+charge groups in the topology. This was the only cut-off treatment scheme 
+before version 4.6. 
+There is no explicit buffering of the pair list. This enables efficient force 
+calculations for water, but energy is only conserved when a buffer is explicitly added.</dd>
+
 </dl></dd>
 
 <dt><b>nstlist: (10) [steps]</b></dt>
@@ -479,7 +478,7 @@ cells when constructing a new neighbor list every <b>nstlist</b> steps.
 In large systems grid search is much faster than simple search.</dd>
 <dt><b>simple</b></dt>
 <dd>Check every atom in the box when constructing a new neighbor list
-every <b>nstlist</b> steps.</dd>
+every <b>nstlist</b> steps (only with <b>cutoff-scheme=group</b>).</dd>
 </dl></dd>
 
 <dt><b>pbc:</b></dt>
index 27935896c434ac1e673338b31bf5970f8fd7a53d..67d7ba117b13a621132cce6f86e6625b43f3a3f9 100644 (file)
@@ -70,7 +70,7 @@
 static const char *tpx_tag = TPX_TAG_RELEASE;
 
 /* This number should be increased whenever the file format changes! */
-static const int tpx_version = 93;
+static const int tpx_version = 94;
 
 /* This number should only be increased when you edit the TOPOLOGY section
  * or the HEADER of the tpx format.
@@ -728,6 +728,10 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir, gmx_bool bRead,
     if (file_version >= 81)
     {
         gmx_fio_do_int(fio, ir->cutoff_scheme);
+        if (file_version < 94)
+        {
+            ir->cutoff_scheme = 1 - ir->cutoff_scheme;
+        }
     }
     else
     {
index 3fda945390506606339c3f05ac322b98e7f37e16..9b7e6b6cea8876074ca3293ed1cdf4335665923b 100644 (file)
@@ -73,7 +73,7 @@ const char *ptype_str[eptNR+1] = {
 };
 
 const char *ecutscheme_names[ecutsNR+1] = {
-    "Group", "Verlet", NULL
+    "Verlet", "Group", NULL
 };
 
 const char *eel_names[eelNR+1] = {
index b62e57162555de217b5c891f16e89af601244bab..39031733082611d00a598568c87141a1e8a4d581 100644 (file)
@@ -1782,7 +1782,7 @@ void get_ir(const char *mdparin, const char *mdparout,
 
     /* Neighbor searching */
     CCTYPE ("NEIGHBORSEARCHING PARAMETERS");
-    CTYPE ("cut-off scheme (group: using charge groups, Verlet: particle based cut-offs)");
+    CTYPE ("cut-off scheme (Verlet: particle based cut-offs, group: using charge groups)");
     EETYPE("cutoff-scheme",     ir->cutoff_scheme,    ecutscheme_names);
     CTYPE ("nblist update frequency");
     ITYPE ("nstlist", ir->nstlist,    10);
index 2f95f339cc68c9344e919063bb34f70cfb24ef6f..3b3dc7e5f8adc6b03b69e272616387075ca3e6f2 100644 (file)
@@ -82,7 +82,7 @@ enum {
 };
 
 enum {
-    ecutsGROUP, ecutsVERLET, ecutsNR
+    ecutsVERLET, ecutsGROUP, ecutsNR
 };
 
 /* Coulomb / VdW interaction modifiers.
index 7acd47705b89e8da6580667ac65bc506a8b0d5a7..aae01affc6b8e6d2476c72a6b4a5b0d8aaa57847 100644 (file)
@@ -108,10 +108,14 @@ MdrunTestFixture::~MdrunTestFixture()
 {
 }
 
+// TODO The combination of defaulting to Verlet cut-off scheme, NVE,
+// and verlet-buffer-tolerance = -1 gives a grompp error. If we keep
+// things that way, this function should be renamed. For now,
+// force the use of the group scheme.
 void
 MdrunTestFixture::useEmptyMdpFile()
 {
-    useStringAsMdpFile("");
+    useStringAsMdpFile("cutoff-scheme = Group\n");
 }
 
 void