Fix dump of checkpoint files
authorPascal Merz <pascal.merz@me.com>
Wed, 9 Dec 2020 09:23:13 +0000 (09:23 +0000)
committerChristian Blau <cblau.mail@gmail.com>
Wed, 9 Dec 2020 09:23:13 +0000 (09:23 +0000)
commit51d26af357f1eb7ed27092bfbab7cf6a9c3e6947
tree0ae028ac2187a683ec6a6451943064f257688d8f
parent7a8d20412f352d81d0ecb148495503a6d690d3a6
Fix dump of checkpoint files

With the addition of the MdModules and the modular checkpointing,
`gmx dump -cp` would end with an error when either of the two was
written to checkpoint. Reason was that the function dumping
checkpoint files was not aware of the additional blocks present.
As the new functionality checkpoints at the end of the files, the
remainder of the information was printed anyway, but the call ended
with an error.

This adds the two new checkpointing blocks to the function used
by gmx dump, and prints the kv-tree they are based on. To achieve
this, the kv-tree printing functionality had to be expanded to
allow for arrays of objects.

Finally, this change also fixes a wrong comment in the modular
simulator checkpoint helper - checkpointing happens on top of the
integration step, so _before_ the last step.
src/gromacs/fileio/checkpoint.cpp
src/gromacs/mdtypes/checkpointdata.cpp
src/gromacs/mdtypes/checkpointdata.h
src/gromacs/modularsimulator/checkpointhelper.h
src/gromacs/utility/keyvaluetree.cpp