write tng files with energies
It would be great if we could store the energies in the tng file.
This should be possible directly during mdrun but also in a utility reading and edr file and a trr/tng file producing a new tng file.
#1 Updated by Magnus Lundborg about 4 years ago
I agree that we need to fix this. I have been planning to look into it for a long time, but other things have always come in between. One small problem is that we need to have some way to either ignore the mdrun command line -e option or allow the same file to be specified multiple times without backing it up and still writing to two different files. I'm not sure how we do that most elegantly.
#2 Updated by Mark Abraham about 4 years ago
I think the
-x flags (and later, various FE and pull outputs) to mdrun are things that we should kill, writing all kinds of TNG-able data (ie everything) to TNG. So, initially we'd need some tests that mdrun writes energies now that we can read, and then update those tests to show what it can still do later. I have some machinery for energy comparisons that I'll resurrect for that.
#4 Updated by Magnus Lundborg about 4 years ago
Indeed, energies and forces are only compressed losslessly (currently gzip is the only compressor available for lossless formats). I'm a bit hesitant about removing -e and -x for a while, though, and also even making TNG default, since there are not many programs that can open it. There is a plugin for VMD, but it's still not enabled by default. So, I think we need a temporary solution with all the current options remaining. Perhaps we could ignore the -e option if it's not explicitly set. Currently we would also require a bit of a hack to store both lossy compressed as well as losslessly compressed/uncompressed positions and velocities in the same TNG file. I guess there could be situations where that could be wanted, but I think that will have to wait.