gmx eneconv -offset 1.998 -dt 2 is broken for large times
For a long trajectory,
gmx eneconv -offset 1.998 -dt 2 writes frames with time stamps at
... 16771.998000 16773.998000 16775.998000 16777.996000 16777.998000 16778.000000 16779.996000 16779.998000 16780.000000 ...
This is easily fixed by not doing the floating-point modulo arithmetic in single precision. Perhaps some other tools are also affected.
#2 Updated by Erik Lindahl over 5 years ago
- Tracker changed from Bug to Feature
- Target version changed from 5.0 to future
Looking more into this I would argue it is not easily fixed. If we simply switch the modulo arithmetic to double we will be requiring a match to 1e-15, which in most cases will never be true when the input numbers have been provided in single-precision accuracy.
Basically, this comes down to asking for more-than-single-precision accuracy in a single precision version of Gromacs. Not a bad idea, but it's not a bug => changing to future feature.