Merge "Merge branch 'release-5-0'"
[alexxy/gromacs.git] / src / programs / mdrun / runner.cpp
index 148e05d819eb85ee6755a541aa0cc7f30127f053..3e2d005fed07037b757fe43ab394b35833542c2a 100644 (file)
@@ -1018,11 +1018,11 @@ static void override_nsteps_cmdline(FILE            *fplog,
         char stmp[STRLEN];
 
         ir->nsteps = nsteps_cmdline;
-        if (EI_DYNAMICS(ir->eI))
+        if (EI_DYNAMICS(ir->eI) && nsteps_cmdline != -1)
         {
-            sprintf(stmp, "Overriding nsteps with value passed on the command line: %s steps, %.3f ps",
+            sprintf(stmp, "Overriding nsteps with value passed on the command line: %s steps, %.3g ps",
                     gmx_step_str(nsteps_cmdline, sbuf),
-                    nsteps_cmdline*ir->delta_t);
+                    fabs(nsteps_cmdline*ir->delta_t));
         }
         else
         {