-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add restart files #29
Comments
One solution would be to use HDF5 to store it. |
Yeah, HDF5 could be nice too here! There is a standard format for using HDF5 storage for MD data called h5md, we could implement that too.
I was referring to the Amber NetCDF convention (http://ambermd.org/netcdf/nctraj.xhtml), which specifically uses the NetCDF 3 encoding, and not HDF5. |
Thank you! I didn't know about the H5MD, I will take a look at the specifications. 😄 |
I like how H5MD specification handle the datas.
What do you think is the best approach to do that? [1] HDF5 for Rust [2] feature/types |
For NetCDF, chemfiles already supports the trajectory convention. Adding support for the Restart convention should not be too hard. There are rust bindings to the library, which are already used in lumol for input and trajectory output. I think it would make sense to implement the Restart convention in chemfiles and then use that. The main issue with this approach is that we don't have any simple way to save the interactions parameter in the restart file. We could dump the whole Another way of doing this would be to use Serde to serialize and save the whole system state. I don't know how well it could work, especially with respect to changes in the structs: what happens if a new field is added to a struct? How do we manage to still load the information in memory? This would be more flexible, but also way harder to design properly. |
If the simulation crashes, or to restart a simulation for more steps, a restart file is needed. It should be some private binary format, but with compatibility between multiple versions of the code. So a binary dump of the memory is not an option.
Using Chemfiles with a file format containing all the data (NetCDF ? TNG ? Another one ?) could be nice, but chemfiles only provides floats values for now (see chemfiles/chemfiles#34), and double would be better here.
The text was updated successfully, but these errors were encountered: