Use RNG correctly for v-rescale thermostat
authorMark Abraham <mark.j.abraham@gmail.com>
Sun, 25 May 2014 19:38:41 +0000 (21:38 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 3 Jun 2014 12:21:55 +0000 (14:21 +0200)
Two integers were passed in the wrong order. I suspect from the
construction of the RNG that the only effect of this is to permit a
rare re-use of a random number in a different RNG stream (i.e. no
effect in practice).

Change-Id: I1fb8eddbe7c8b029dc3686be80f3f083108fc28c

src/gromacs/mdlib/coupling.c

index a08e2dcfad986ed70ca3e3c125f3c0526c744ef1..0898371728aca74a1a835ed6d9f471378154813f 100644 (file)
@@ -1520,7 +1520,7 @@ void vrescale_tcoupl(t_inputrec *ir, gmx_int64_t step,
 
             Ek_new  = vrescale_resamplekin(Ek, Ek_ref, opts->nrdf[i],
                                            opts->tau_t[i]/dt,
-                                           ir->ld_seed, step);
+                                           step, ir->ld_seed);
 
             /* Analytically Ek_new>=0, but we check for rounding errors */
             if (Ek_new <= 0)