The commit addresses two issues:
- printing negative simulation length with "-nsteps -1";
- eliminates rounding when converting a non-integer time-step value from
fs to ps units.
Fixes #1633
Change-Id: If1aac7e0f4e8e37f3e9777fa4eaa79744f3ccd65
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
{