h5md-user
[Top][All Lists]
Advanced

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

Re: [h5md-user] Writing vs reading


From: Olaf Lenz
Subject: Re: [h5md-user] Writing vs reading
Date: Thu, 23 Jan 2014 19:29:53 +0100

Hi!

2014/1/14 Pierre de Buyl <address@hidden>
> The most important feature for me is that any given combination of
> data arrays has a clear and unambiguous meaning. That criterion still
> leaves a lot of freedom, where as you say the question is whose life
> we want to simplify most.

I'd like to add some thoughts. It is most easy to discuss this on an actual example, therefore I'd like to review the discussion on how to store positions.

First of all, as Felix remarked, the most important criterion for h5md seems to be **flexibility**: h5md should allow to express everything that people could possibly want. We do not want to sacrifice any flexibility in exchange for reader-friendliness. For example, in the case of the particle positions we deemed it to be important that the number of particles can change, even though this makes writing and reading them more complex.

What remains open is the question what happens in those cases where there are more than one possibilities to express the same thing? When there are several alternative representations of the same thing? As an example, think of writing the positions in periodic boundary conditions. Currently, we allow for three methods to store the position: using the "image", not using the image, forcing the positions to be within the central image, or not. All of these variants are equivalent: one can always transform between the different variants. This is the "writer-friendly" approach. 

For a reader, this makes it more complex to read the file. In a "reader-friendly" approach, we would allow only one variant of these, e.g. not using the "image" at all, and always storing the absolute position, even if it is outside the central image. For a reader, that would be definitely the simplest variant, as he can always transform into his own model. Insofar I wonder whether it wouldn't be the best to simply throw out the "image" from the specs.

> My personal preference would be for the simplest rules for data
> interpretation.
In a way, this is "reader-program friendly" in the sense that the job of the
reading program should be the clearest that is possible.

Can you elaborate what that would mean in the case of the positions?

Invalid files should break a reader loudly. Else, it'll be too easy to work with
invalid files.

Agreed!

Olaf


--
Dr. rer. nat. Olaf Lenz
Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart
Phone: +49-711-685-63607

reply via email to

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