XVG file format for mindist does not work above 10 microseconds

GROMACS version: 2020.2
GROMACS modification: Yes/No

The XVG file format output for gmx mindist cannot capture times over 10 microseconds. This is different from this post (Time step representation in xvg files) which was just about formatting. My issue is that there are not enough digits to capture a 1 ps difference in the time when the time is greater than 10,000,000 ps. An example is provided below where the distance is measured every ps, but the time in the first column does not change. Is there a way to fix this? I did not know which line controls this specific formatting in the source files.


1.075248e+07 3.110899e-01
1.075248e+07 2.903999e-01
1.075248e+07 2.666701e-01
1.075248e+07 3.394760e-01
1.075248e+07 3.097273e-01
1.075248e+07 3.217656e-01
1.075248e+07 2.626235e-01
1.075248e+07 2.486724e-01
1.075249e+07 2.884685e-01

This is the same issue, it’s just formatting. You can change %e explicitly to %f in gmxana/gmx_mindist.cpp:

491         fprintf(dist, "%12e", output_env_conv_time(oenv, t));
492         if (num)
493         {
494             fprintf(num, "%12e", output_env_conv_time(oenv, t));
495         }

%e is forcing the output to be represented in scientific notation. Floating-point (perhaps in concert with -tu to specify different units) would be more appropriate here.

Thanks so much, that did the trick! It might be useful to have a flag that allows the user to specify the output format in the future if that’s possible.