h5md / VMD-h5mdplugin

This plugin enables VMD to display data stored in h5 files that are structured according to the H5MD specifications (http://nongnu.org/h5md/)
Other
10 stars 9 forks source link

sample files do not conform to H5MD #5

Closed fhoefling closed 10 years ago

fhoefling commented 10 years ago

The species data in the sample files is stored in a non-H5MD-compliant format:

$ h5ls samples/no_vmd_structure.h5/particles/atoms/species
value                    Dataset {100, 1}

But a time-independent H5MD element is stored as a dataset itself, not a group:

/particles/atoms
 +-- species                  Dataset {100}

The same applies to /parameters/vmd_structure/indexOfSpecies.

jonaslandsgesell commented 10 years ago

Now the species dataset is at the position /particles/atoms +-- species and in the right shape (in all 3 sample files).

The dataset /parameters/vmd_structure/indexOfSpecies is in the group vmd_structure because this dataset is at the moment unspecified by the H5MD format. Since it is VMD specific it is stored in the group vmd_structure.

What happens if another application should rely on the usage of a dataset named "/parameters/indexOfSpecies" but with different content (since the dataset is not officially specified this case could in principle happen)?

Would it be more in the spirit of the h5md documentation if the prefix "vmd_" would be prepended to all datasets which are currently located in the group " /parameters/vmd_structure/"?

fhoefling commented 10 years ago

/parameters is the right place to store application-specific data. You are completely free in what is stored there and how. It is a good idea to put these data in an application-specific subgroup (what you did), although this is not explicitly required by the H5MD specification. The subgroup should avoid potential conflicts with other programs.

My only concern was that the shape of "indexOfSpecies" in samples/half_complete_vmd_structure.h5 is still Dataset {3/Inf, 1}, just as for "species" before the fix. In full_vmd_structure.h5 this has been fixed.

Actually, what is still missing in the files are the metadata in /h5md and a box specification in /particles/atoms/box. These fields are apparently not evaluated by the VMD reader.

jonaslandsgesell commented 10 years ago

Ok, there is a new issue for the box data.