some trjconv -b and -t0 combinations lead to a never-ending stream of output to the new xtc
I have provided a test system with a .xtc for a box of water that goes from 0 to 10 ps with a save frequency of 0.2 ps.
- These go on forever, constantly writing frames
trjconv -f MD.xtc -o out.xtc -b 6 -t0 2
trjconv -f MD.xtc -o out.xtc -b 6 -t0 0
- But these work fine:
trjconv -f MD.xtc -o out.xtc -b 6
trjconv -f MD.xtc -o out.xtc -t0 0
- These also work fine (smaller number for -b, in this case <3)
trjconv -f MD.xtc -o out.xtc -b 1 -t0 0
trjconv -f MD.xtc -o out.xtc -b 2 -t0 0
Fix that seeking was wrong if frame time was modified
The trjconv -t0 option causes fr->time to be modified and
this then causes the skipping to be incorrect. Alternative
we could document that fr->time shouldn't be modified
and change that trjconv makes a copy of fr before changing
time. This change has the advantage it is less likely
to reintroduce the problem.
Fix trjconv modifying fr.time unnecessarily
The was a bug where trjconv modified the input frame time, which
caused issues with xtc seeking. This has recently been fixed
by commit 81d10b25, but it's better not to mess with the input
frame and only modify the output frame.