Use random seeds by default
authorRoland Schulz <roland@utk.edu>
Tue, 4 Feb 2014 02:26:22 +0000 (21:26 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 6 Feb 2014 06:10:46 +0000 (07:10 +0100)
A stocastic simulation not being reproducible by default is less
surprising. It wasn't true that lmc-seed was intialized using
ld-seed.

Change-Id: I5c95f1957b926287c8436d081661cb9d7504ee76

share/html/online/mdp_opt.html
src/gromacs/gmxpreprocess/readir.c

index 69f4d4a2f9255a40226539c47e0e12e987fcb54c..874da1d556c76c8ce9b070a9a68e6303b6f77040 100644 (file)
@@ -260,10 +260,10 @@ set <tt>init-step</tt> to the step number of the restart frame.
 <dd>Brownian dynamics friction coefficient.
 When <b>bd-fric</b><tt>=0</tt>, the friction coefficient for each
 particle is calculated as mass/<b><A HREF="#tc">tau-t</A></b>.</dd>
-<dt><b>ld-seed: (1993) [integer]</b></dt>
+<dt><b>ld-seed: (-1) [integer]</b></dt>
 <dd>used to initialize random generator for thermal noise
 for stochastic and Brownian dynamics.
-When <b>ld-seed</b> is set to -1, the seed is calculated from the process ID.
+When <b>ld-seed</b> is set to -1, a pseudo random seed is used.
 When running BD or SD on multiple processors, each processor uses a seed equal
 to <b>ld-seed</b> plus the processor number.</dd>
 </dl>
@@ -1120,10 +1120,9 @@ This is only meaningful with integrator <b><A HREF="#run">md</A></b>.</dd>
 </dl></dd>
 <dt><b>gen-temp: (300) [K]</b></dt>
 <dd>temperature for Maxwell distribution</dd>
-<dt><b>gen-seed: (173529) [integer]</b></dt>
+<dt><b>gen-seed: (-1) [integer]</b></dt>
 <dd>used to initialize random generator for random velocities,
-when <b>gen-seed</b> is set to -1, the seed is calculated from
-the process ID number.
+when <b>gen-seed</b> is set to -1, a pseudo random seed is used.
 </dl>
 
 <A NAME="bond"><br>
@@ -1673,8 +1672,8 @@ decide which state to move to.</dd>
 decide which state to move to, EXCLUDING the current state, then uses a rejection step to ensure detailed
 balance. Always more efficient that Gibbs, though only marginally so in many situations, such as when only the nearest neighbors have decent phase space overlap.</dd>
 </dl>
-<dt><b>lmc-seed:</b></dt>
-<dd> random seed to use for Monte Carlo moves in state space.  If not specified, <b>ld-seed</b> is used instead.</dd>
+<dt><b>lmc-seed: (-1)</b></dt>
+<dd> random seed to use for Monte Carlo moves in state space. When <b>lmc-seed</b> is set to -1, a pseudo random seed is us</dd>
 <dt><b>mc-temperature:</b></dt>
 <dd> Temperature used for acceptance/rejection for Monte Carlo moves. If not specified, the temperature of the
 simulation specified in the first group of <b>ref_t</b> is used.</dd>
index a0c9f806ec3744bff888a371b40f05deff25f56e..bc5b57e7f4864d5189b2a7d6d5990dee5bbd8d19 100644 (file)
@@ -1776,7 +1776,7 @@ void get_ir(const char *mdparin, const char *mdparout,
     CCTYPE ("LANGEVIN DYNAMICS OPTIONS");
     CTYPE ("Friction coefficient (amu/ps) and random seed");
     RTYPE ("bd-fric",     ir->bd_fric,    0.0);
-    ITYPE ("ld-seed",     ir->ld_seed,    1993);
+    ITYPE ("ld-seed",     ir->ld_seed,    -1);
 
     /* Em stuff */
     CCTYPE ("ENERGY MINIMIZATION OPTIONS");
@@ -1967,7 +1967,7 @@ void get_ir(const char *mdparin, const char *mdparout,
     CCTYPE ("GENERATE VELOCITIES FOR STARTUP RUN");
     EETYPE("gen-vel",     opts->bGenVel,  yesno_names);
     RTYPE ("gen-temp",    opts->tempi,    300.0);
-    ITYPE ("gen-seed",    opts->seed,     173529);
+    ITYPE ("gen-seed",    opts->seed,     -1);
 
     /* Shake stuff */
     CCTYPE ("OPTIONS FOR BONDS");