Repository navigation
Replies: 7 comments 5 replies
|
We mentioned pickling in the meeting where we discussed this - ASE seems to have moved away from it for security reasons, so it may be wise to rule that out as an option. |
|
There is a nice page which contains all trajectory file formats. Here is the link to it: https://docs.mdanalysis.org/2.0.0-dev0/documentation_pages/coordinates/init.html |
|
Another relevant page is the one about the xdr-file. https://docs.rs/crate/xdrfile/0.2.0 |
|
the mdanalysis modules look very promising for reading and writing a number of trajectory file formats. while ASE also seems to support the reading of a fair few popular MD code's trajectory formats it is less explicit about the exact supported formats: https://wiki.fysik.dtu.dk/ase/ase/io/io.html |
|
check this out: https://mdtraj.org/1.9.4/index.html - can also read hdf5! |
|
our DL_POLY colleagues also suggested to have a look at H5MD |
|
Some thoughts on this: Trajectories are created by the MD engine (currently LAMMPS and DL_Poly). These can be interrogated by MDMC. The MD simulations can take an extremely long time so need to have some intermediate savepoints which can be resumed from. There is a choice of “who” makes these save points (i.e. MDMC or the MD engine), with pros and cons to each choice. After discussion the current thought is that it is best to make the engines do their own saveing/resuming, since this is already built in. The drawback is of course that the engines do not all output to the same file format, and while it is not expected to switch engine mid-way through a run, it would have made some things easier. Letting the engines do the saving also bypasses potential memory leaks which could occur doing it ourselves. DL_Poly writes to a HISTORY file and can again restart, with a little change to the CONTROL file https://www.ccp5.ac.uk/sites/www.ccp5.ac.uk/files/DL_POLY/data/training/MANUAL_USR.pdf section 8.2.4 (p137). This HISTORY file should probably be written in netCDF rather than ascii, but this also needs setting up in the CONTROL file. |
Uh oh!
There was an error while loading. Please reload this page.
Currently, MDMC has its own
Trajectoryobject that gets created from the MD simulation. While there are some sparsely documented functions to pickle such an object (see https://github.com/MDMCproject/MDMCv0.2_pilot/blob/master/tests/test_data/MDMC_objects/README.md) and one example trajectory saved for testing (https://github.com/MDMCproject/MDMCv0.2_pilot/blob/master/tests/test_data/MDMC_objects/trajectory.zip), this is not in any common format and neither is it obvious how to re-import/load the pickled trajectory.In the long run, we need to offer the possibility of saving and loading trajectories within MDMC. For this we need to decide on what formats we need to be able to read from and write to. The reasons why we would want to be able to read/write trajectories comprise:
We have been told that most MD engines have their own, unique formats that they use (some binary, some ASCII). In addition, the ASE Python module (already in use for reading from cif files and visualisation) can apparently read trajectories from a fair number of the popular MD engines and has its own format that it can save to.
Separately, it has also been suggested that MDAnalysis might be suitable for the task (#264 (comment)).
All reactions