Merge branch 'release-5-0' into release-5-1
[alexxy/gromacs.git] / src / gromacs / mdlib / coupling.cpp
index d0169dcdc28d4af97d65db9e4a2e5d454520ac33..d5244e7134e431ec07ff984a7664fd6abc6eb087 100644 (file)
@@ -836,7 +836,7 @@ void trotter_update(t_inputrec *ir, gmx_int64_t step, gmx_ekindata_t *ekind,
                     t_extmass *MassQ, int **trotter_seqlist, int trotter_seqno)
 {
 
-    int             n, i, d, ngtc, gc = 0;
+    int             n, i, d, ngtc, gc = 0, t;
     t_grp_tcstat   *tcstat;
     t_grpopts      *opts;
     gmx_int64_t     step_eff;
@@ -910,12 +910,12 @@ void trotter_update(t_inputrec *ir, gmx_int64_t step, gmx_ekindata_t *ekind,
                    scale the velocities later, but we need them scaled in order to
                    produce the correct outputs, so we'll scale them here. */
 
-                for (i = 0; i < ngtc; i++)
+                for (t = 0; t < ngtc; t++)
                 {
-                    tcstat                  = &ekind->tcstat[i];
-                    tcstat->vscale_nhc      = scalefac[i];
-                    tcstat->ekinscaleh_nhc *= (scalefac[i]*scalefac[i]);
-                    tcstat->ekinscalef_nhc *= (scalefac[i]*scalefac[i]);
+                    tcstat                  = &ekind->tcstat[t];
+                    tcstat->vscale_nhc      = scalefac[t];
+                    tcstat->ekinscaleh_nhc *= (scalefac[t]*scalefac[t]);
+                    tcstat->ekinscalef_nhc *= (scalefac[t]*scalefac[t]);
                 }
                 /* now that we've scaled the groupwise velocities, we can add them up to get the total */
                 /* but do we actually need the total? */