espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Writing and reading with H5MD


From: Pierre de Buyl
Subject: Re: [ESPResSo-users] Writing and reading with H5MD
Date: Tue, 7 Mar 2017 14:48:00 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

I think that you might find my blog post useful here:
http://pdebuyl.be/blog/2014/using-h5md-in-lammps.html

You can skip the part on lammps indeed and move to the part where I explore the
content of a H5MD file ("Extracting the coordinates").

Regards,

Pierre

On Mon, Mar 06, 2017 at 06:27:52PM +0100, Clemens Jochum wrote:
> Thanks for your answer! I will check the h5py module.
> 
> 
> On 01.03.2017 16:12, ICP wrote:
> > espresso is currently only able to write H5MD files. We currently dont
> > plan to read those files in espresso but there is a python module
> > called h5py with which you are able to read the trajectory into numpy
> > arrays. It seems your userguide is not up to date. If you are using
> > the development version of espresso please build the sphinx
> > documentation via "make sphinx".
> >
> > sphinx
> > Institute for Computational Physics
> > Universit├Ąt Stuttgart
> > Allmandring 3
> > Room 1.084
> > 70569 Stuttgart, Germany
> > Phone:      +49(0)711/685-*67707*
> >
> >
> > On 1 Mar 2017, at 14:46, Clemens Jochum <address@hidden
> > <mailto:address@hidden>> wrote:
> >
> >> Dear all,
> >>
> >> according to the userguide initializing a H5MD file works as follows:
> >>
> >>     from espressomd import h5md
> >>     system = espressomd.system()
> >>     h5 = h5md.h5md("File.h5",system)
> >>
> >> However, the module "h5md" is not found by the pypresso interpreter.
> >> It is also stated that the sample script "h5md_WriteFile.py" shows
> >> the usage of H5MD files. However, that sample file does not exist.
> >>
> >> According to a different sample script called "h5md.py", H5MD format
> >> can be used like this:
> >>
> >>     from espressomd.io.writer import h5md
> >>     h5_file = h5md.H5md(filename="sample.h5", write_pos=True,
> >> write_vel=True, ... )
> >>     h5_file.write()
> >>
> >> This works, but it is not stated anywhere how to read from the H5MD
> >> file. In particular, I want to load the particle coordinates to
> >> visualize some snapshots of my system's trajectory.
> >>
> >> Does anyone know how to do that? Or can anyone point me towards
> >> literature, how to use the H5MD format properly in espresso?
> >>
> >> Many thanks and best regards,
> >>
> >> Clemens
> >>
> 

-- 
-----------------------------------------------------------
Pierre de Buyl
KU Leuven - Institute for Theoretical Physics
T +32 16 3 27355
W http://pdebuyl.be/
-----------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]