Replace all mdrun rngs with cycle based rng
[alexxy/gromacs.git] / src / gromacs / mdlib / init.c
index 99105bd6b8fe469878e04a1a4b4c33862ad4b15d..38bf4401f017c82f0002765a09596326e9609b70 100644 (file)
@@ -52,7 +52,6 @@
 #include "mdrun.h"
 #include "names.h"
 #include "calcgrid.h"
-#include "gromacs/random/random.h"
 #include "update.h"
 #include "mdebin.h"
 
@@ -61,7 +60,7 @@
 #define NOT_FINISHED(l1, l2) \
     printf("not finished yet: lines %d .. %d in %s\n", l1, l2, __FILE__)
 
-void set_state_entries(t_state *state, const t_inputrec *ir, int nnodes)
+void set_state_entries(t_state *state, const t_inputrec *ir)
 {
     int nnhpres;
 
@@ -109,31 +108,6 @@ void set_state_entries(t_state *state, const t_inputrec *ir, int nnodes)
             snew(state->cg_p, state->nalloc);
         }
     }
-    if (EI_SD(ir->eI) || ir->eI == eiBD || ir->etc == etcVRESCALE || ETC_ANDERSEN(ir->etc))
-    {
-        state->nrng  = gmx_rng_n();
-        state->nrngi = 1;
-        if (EI_SD(ir->eI) || ir->eI == eiBD || ETC_ANDERSEN(ir->etc))
-        {
-            /* This will be correct later with DD */
-            state->nrng  *= nnodes;
-            state->nrngi *= nnodes;
-        }
-        state->flags |= ((1<<estLD_RNG) | (1<<estLD_RNGI));
-        snew(state->ld_rng, state->nrng);
-        snew(state->ld_rngi, state->nrngi);
-    }
-    else
-    {
-        state->nrng = 0;
-    }
-
-    if (ir->bExpanded)
-    {
-        state->nmcrng  = gmx_rng_n();
-        snew(state->mc_rng, state->nmcrng);
-        snew(state->mc_rngi, 1);
-    }
 
     state->nnhpres = 0;
     if (ir->ePBC != epbcNONE)
@@ -190,10 +164,4 @@ void init_parallel(t_commrec *cr, t_inputrec *inputrec,
                    gmx_mtop_t *mtop)
 {
     bcast_ir_mtop(cr, inputrec, mtop);
-
-    if (inputrec->eI == eiBD || EI_SD(inputrec->eI) || ETC_ANDERSEN(inputrec->etc))
-    {
-        /* Make sure the random seeds are different on each node */
-        inputrec->ld_seed += cr->nodeid;
-    }
 }