-
Notifications
You must be signed in to change notification settings - Fork 647
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 support for HALMD files (H5MD) #762
Comments
Can we use the wrapper directly (code-wise and license-wise)? |
I would write our own wrapper the C++ code relies a lot on templates. I should be able to organize a short trajectory. |
We just need someone to do it ;-) |
In that context I would prefer to implement a H5MD reader (and writer). It's a format convention that uses hdf5 (used by LAMMPS and ESPResSo ). Therefore the h5py module could be used to implement such a reader. Is anybody working on such a reader or could anybody give me some hints how to best start to implement such a reader? |
Any new format is always a good addition, nobody is looking at h5md yet. I should really write a wiki page on writing a Reader, but here goes... All trajectory information is stored inside a Timestep ( The Reader is responsible for filling the contents of
Most other stuff (iteration etc) is defined in the base class, so you just need to define those hooks. I think PDB is a fairly clear implementation of this: Readers are added automatically into the list of known readers once you define the import MDAnalysis as mda
u = mda.Universe('myfile.pdb','myfile.h5md') So the signature is (topology, trajectory), you can use xyz/gro/pdb/etc as a topology, not sure what you've got. There is already a python interface to h5md, maybe this would be useful as a start: Let me know if you need any more info! |
Thanks a lot for your comments, that is a good starting point. The h5md python package is actually not necessary in my opinion since it only ensures the format convention for the trajectories. I think we should stick to the more generic h5py package since development is more active on that package and we will have the respective dependency on one of those packages (in fact one more if we use pyh5md, since it depends on h5py itself). Whats your opinion on that? |
Yep, if you don't need it don't use it. On Thu, 19 May 2016 09:27 Kai Szuttor, notifications@github.com wrote:
|
Nice intro, @richardjgowers! Why don't you just copy it to the wiki? ;-) Am May 19, 2016 um 1:00 schrieb Richard Gowers notifications@github.com:
|
Can somebody quickly give me a hint on where i have to add new files to the build system in order its recognized as a package? |
A python file? You can place it in 'MDAnalysis/coordinates |
Hi, in addition to what @kain88-de said, when you ran setup.py did you do a On Tue, May 24, 2016 at 8:46 AM kain88-de notifications@github.com wrote:
|
Thanks @jdetle and @kain88-de . I have not build an developer installation. What's the difference? |
Hi Kai, I asked about this not too long ago and received some helpful advice on developer installation and virtual environments: Also, setup tools explanation
I am also a newbie but my understanding is that |
Ah thanks, that helps a lot. What i have always done with my own python modules was using the pip tool.
|
Hi Kai, |
Thanks @jdetle . |
pip is using setuptools. So |
I just opened #861 to address this issue. It's kind of hard to find the guide for developers as a new user. |
I really like the active discussions of this project, thats how it should be! |
@KaiSzutter please another issue for that and/or write on the mailing list. Our current GSoC student @fiona-naughton is working on supporting REMC simulations which might overlap with your suggestion. |
@KaiSzuttor definitely open an issue for this so discussion can begin. I think we could make this work under the new topology system, probably by having the Reader make changes the the Universe's Topology as the frame changes. There are probably many little issues with that idea, but we can start discussing it at the issue. |
There is also a Python package pdebuyl/pyh5md) by @pdebuyl that implements h5md. This looks like a good format if we are looking for anything based on HDF5. |
Hi, I was automatically subscribed via the tagging mechanism. I am happy to provide info on H5MD if necessary. In the current version of pyh5md, I have tried to do a lightweight wrapping of h5py via subclassing so that the interface is very close to h5py. |
@pdebuyl many thanks, great to hear that we can ping you if questions arise. I have one immediate question: Can pyh5md make use of parallel I/O (using PHDF5 or probably just h5py parallel pympi-based)? EDIT: link to parallel hdf5 in h5py |
Yes, there is support for parallel I/O. The example https://github.com/pdebuyl/pyh5md/blob/master/examples/run_parallel.py illustrates parallel writing (region in the dataset are selected by the |
* Fixes #762 * add H5MD coordinate reader (supports parallel MPI in principle but is not well tested at the moment, see #2865) * added test h5md datafiles: real example (derived from cobrotoxin.trr) and synthetic example for MultiframeReaderTest reader tests * add tests (MultiframeReaderTest and custom) * add documentation (example and parallel MPI) * added h5py into conda dependencies and pyh5md into pip dependencies * update CHANGELOG * update AUTHORS
The H5MD Writer is issue #2866 |
* Fixes MDAnalysis#762 * add H5MD coordinate reader (supports parallel MPI in principle but is not well tested at the moment, see MDAnalysis#2865) * added test h5md datafiles: real example (derived from cobrotoxin.trr) and synthetic example for MultiframeReaderTest reader tests * add tests (MultiframeReaderTest and custom) * add documentation (example and parallel MPI) * added h5py into conda dependencies and pyh5md into pip dependencies * update CHANGELOG * update AUTHORS
HALMD is an MD code that uses HDF5 for it's file format. The C++ wrapper they have written for it is modeled on h5py. So a reader using H5py should be relatively easy to write.
The text was updated successfully, but these errors were encountered: