h5md-user
[Top][All Lists]
Advanced

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

Re: [h5md-user] box data as part of trajectory/position


From: Felix Höfling
Subject: Re: [h5md-user] box data as part of trajectory/position
Date: Tue, 20 Nov 2012 15:41:03 +0100
User-agent: Opera Mail/12.02 (Linux)

Am 20.11.2012, 09:49 Uhr, schrieb Pierre de Buyl
<address@hidden>:

Hello,

So, we're back where we were a few weeks ago. My suggestion was to go for
/trajectory/group1/box
instead of
/trajectory/group1/position/box
but with the requirement that position/step and box/step be equal (time also,
indeed).

I am not very enthusiastic about having position and box not respecting
"value,step,time" by the letter...

P


Hi Pierre,

I agree that all data groups should obey the same value/step/time pattern.
Having the box data on the same level as position would fine for me as
well.

Apart from having the same structure, is there another benefit of explicit
time and step fields in box?

My motivation was that H5MD allows additional fields in a group in
addition to value/step/time, and the group is still a valid data group.
(Is this right?) Box would then be such an additional field, it would be
merely a (mandatory) attachment to position than a data group in the
strict sense. The actual box data group (with value/step/time) shall be
found in observables.

I'm still a bit in favour of not doubling datasets that are enforced to be
equal, but I would also accept the requirement of position/step and
box/step being tied together (by copy or link). The question is mainly
whether box/step and box/time shall be mandatory or optional fields if in
conjunction with position.

An advantage of having box inside position is when copying trajectory data
between files: it would simply happen by copying the respective position
group (since HDF5 1.8). If the box data are found within the position
group, they are copied recursively, otherwise they need to be handled
explicitly. But this point may be not too important. Example:

      import h5py
      fin = h5py.File("input.h5")
      fout = h5py.File("output.h5")
      # copy position data of particle group A including the box data
      fin.copy("trajectory/A/position", fout.require_group("trajectory/A"))

Felix



reply via email to

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