Double precision gromacs truncates in memory coordinates to single precision when writting XTC file.
When mdrun_d writes an xtc file, in addition to the obvious truncation of the
data stored in disk, Gromacs also truncates the coordinates stored in the
I noticed because I am modifying Gromacs implementation of Rahman Parrinello. I
noticed some unexpected changes in state->x0 and so placed a watchpoint in the
debugger, which showed that the routine xdr3drcoord in xdrd.c truncates not only
the coordinates that will be stored in disk, but also the original copy of the
I deleted the code that copies the truncated coordinates to the original copy
received by the routine. That is, I removed the lines
for(i=0; (i<isize); i++)
But I am not sure if this change is correct. Is this routine supposed to return
the modified coordinates to report the caller? In that case the caller should
have made a copy.
Note that this problem can affect the correctness of simulations in double