Mismatch in number of trajectory frames in SOMD DCD file
I'm not sure if this is an issue with DCDFile.py, or the dcdplugin used by MDTraj, which is what BioSImSpace uses to read trajectories. When I attempt to read a SOMD trajectory, the actual number of frames is always one less than what is claimed by the DCD header. From my config, the number of frames that the header states should be correct, so I'm not sure why one is missing. I've looked at DCDFile.py and can't see anything obvious that is wrong. I've put print statements within the writeModel or writeBufferedModel functions and they are being called the correct number of times.
traj = BSS.Trajectory.Trajectory(trajectory="tmp/traj000000001.dcd", topology="tmp/somd.prm7")
dcdplugin) Warning: DCD header claims 6 frames, file size indicates there are actually 5 frames
Just an update: This only happens if you disable buffering, i.e. by setting buffered coordinates frequency to zero, or equal to the number of moves per cycle. If it records more than one frame per cycle then the header matches the file size. However, the number of function calls is still correct.