set default for rcoulomb, rvdw and rlist to -1
authorBerk Hess <hess@kth.se>
Mon, 2 Jul 2012 17:08:41 +0000 (19:08 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 4 Jul 2012 01:24:15 +0000 (03:24 +0200)
To avoid users using the default values and to force them to think
about the cut-offs, all default values are now -1.
This also avoids grompp notes with the new Verlet scheme,
where the rlist value can be generated automatically.

Change-Id: I99bc7eee76953d06767f9c9916d1c9289badf74f

share/html/online/mdp_opt.html
src/kernel/readir.c

index 3afd833e45cfb0ee3e14267e54a40881e9072cdb..1772413dfc706dd1f7071c00c8291b84bdcd8f4a 100644 (file)
@@ -458,8 +458,8 @@ the periodic boundary conditions, this requires a slower PBC algorithm
 and molecules are not made whole in the output</dd>
 </dl></dd>
 
-<dt><b>rlist: (1) [nm]</b></dt>
-<dd>cut-off distance for the short-range neighbor list</dd>
+<dt><b>rlist: (-1) [nm]</b></dt>
+<dd>cut-off distance for the short-range neighbor list, should be &ge; 0</dd>
 
 <dt><b>rlistlong: (-1) [nm]</b></dt>
 <dd>Cut-off distance for the long-range neighbor list.
@@ -617,8 +617,8 @@ i.e. both to the user supplied function and the PME Mesh correction part.</dd>
 <dt><b>rcoulomb-switch: (0) [nm]</b></dt>
 <dd>where to start switching the Coulomb potential</dd>
 
-<dt><b>rcoulomb: (1) [nm]</b></dt>
-<dd>distance for the Coulomb <!--Idx-->cut-off<!--EIdx--></dd>
+<dt><b>rcoulomb: (-1) [nm]</b></dt>
+<dd>distance for the Coulomb <!--Idx-->cut-off<!--EIdx-->, should be &ge; 0</dd>
 
 <dt><b>epsilon-r: (1)</b></dt>
 <dd>The relative <!--Idx-->dielectric constant<!--EIdx-->.
@@ -675,8 +675,8 @@ for <tt>f</tt> and <tt>-f'</tt> are ignored.</dd>
 <dt><b>rvdw-switch: (0) [nm]</b></dt>
 <dd>where to start switching the LJ potential</dd>
 
-<dt><b>rvdw: (1) [nm]</b></dt>
-<dd>distance for the LJ or Buckingham <!--Idx-->cut-off<!--EIdx--></dd>
+<dt><b>rvdw: (-1) [nm]</b></dt>
+<dd>distance for the LJ or Buckingham <!--Idx-->cut-off<!--EIdx-->, should be &ge; 0</dd>
 
 <dt><b>DispCorr:</b></dt>
 <dd><dl compact></dd>
index 5ec50e6620ab7e00dbf7698cf5e70a14baa18738..37471b6f41ad2ab8e75c6295bf4db8f22598dfa9 100644 (file)
@@ -207,6 +207,18 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
   set_warning_line(wi,mdparin,-1);
 
   /* BASIC CUT-OFF STUFF */
+  if (ir->rcoulomb < 0)
+  {
+      warning_error(wi,"rcoulomb should be >= 0");
+  }
+  if (ir->rvdw < 0)
+  {
+      warning_error(wi,"rvdw should be >= 0");
+  }
+  if (ir->rlist < 0)
+  {
+      warning_error(wi,"rlist should be >= 0");
+  }
   if (ir->rlist == 0 ||
       !((EEL_MIGHT_BE_ZERO_AT_CUTOFF(ir->coulombtype) && ir->rcoulomb > ir->rlist) ||
         (EVDW_MIGHT_BE_ZERO_AT_CUTOFF(ir->vdwtype)    && ir->rvdw     > ir->rlist))) {
@@ -1407,7 +1419,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   EETYPE("pbc",         ir->ePBC,       epbc_names);
   EETYPE("periodic-molecules", ir->bPeriodicMols, yesno_names);
   CTYPE ("nblist cut-off");
-  RTYPE ("rlist",      ir->rlist,      1.0);
+  RTYPE ("rlist",      ir->rlist,      -1);
   CTYPE ("long-range cut-off for switched potentials");
   RTYPE ("rlistlong",  ir->rlistlong,  -1);
 
@@ -1417,7 +1429,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   EETYPE("coulombtype",        ir->coulombtype,    eel_names);
   CTYPE ("cut-off lengths");
   RTYPE ("rcoulomb-switch",    ir->rcoulomb_switch,    0.0);
-  RTYPE ("rcoulomb",   ir->rcoulomb,   1.0);
+  RTYPE ("rcoulomb",   ir->rcoulomb,   -1);
   CTYPE ("Relative dielectric constant for the medium and the reaction field");
   RTYPE ("epsilon-r",   ir->epsilon_r,  1.0);
   RTYPE ("epsilon-rf",  ir->epsilon_rf, 0.0);
@@ -1425,7 +1437,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   EETYPE("vdw-type",   ir->vdwtype,    evdw_names);
   CTYPE ("cut-off lengths");
   RTYPE ("rvdw-switch",        ir->rvdw_switch,        0.0);
-  RTYPE ("rvdw",       ir->rvdw,       1.0);
+  RTYPE ("rvdw",       ir->rvdw,       -1);
   CTYPE ("Apply long range dispersion corrections for Energy and Pressure");
   EETYPE("DispCorr",    ir->eDispCorr,  edispc_names);
   CTYPE ("Extension of the potential lookup tables beyond the cut-off");