>From 337abbed970604c9cf5a662a072bf69ff23da196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20H=C3=B6fling?= Date: Mon, 23 Sep 2013 14:15:33 +0200 Subject: [PATCH 1/2] observables: move global observables to subgroup Thereby, the observables tree resembles more closely the particles tree. The subgroup referring to the whole system (i.e., all particles) is named 'global' and contains the simulation box at least. --- draft.rst | 75 +++++++++++++++++++++++++++++++----------------------------- 1 files changed, 39 insertions(+), 36 deletions(-) diff --git a/draft.rst b/draft.rst index 5f2f92c..3ae50ce 100644 --- a/draft.rst +++ b/draft.rst @@ -307,16 +307,16 @@ Simulation box -------------- The specification of the simulation box is stored in the group ``box``, which -must be contained within each of the subgroups of the ``particles`` group. -The group ``box`` must further be stored in (or hard-linked to) the -``observables`` group, if present. -Storing the box information at several places reflects the fact that all root -groups are optional (except for ``h5md``), and further that different subgroups -may be sampled at different time grids. This way, the box information remains -associated to a group of particles or the collection of observables. -A specific requirement for ``box`` groups inside ``particles`` is that the -``step`` and ``time`` datasets exactly match those of the corresponding -``position`` groups, which may be accomplished by hard-linking the datasets. +must be contained within each of the subgroups of the ``particles`` group. The +group ``box`` must further be stored in (or hard-linked to) the group +``observables/global``, if present. Storing the box information at several +places reflects the fact that all root groups are optional (except for +``h5md``), and further that different subgroups may be sampled at different +time grids. This way, the box information remains associated to a group of +particles or the collection of observables. A specific requirement for ``box`` +groups inside ``particles`` is that the ``step`` and ``time`` datasets exactly +match those of the corresponding ``position`` groups, which may be accomplished +by hard-linking the datasets. The spatial dimension and the boundary conditions of the box are stored as attributes to the ``box`` group, e.g., :: @@ -403,42 +403,45 @@ Observables group ----------------- Macroscopic observables, or more generally, averages over many particles, are -stored as time series in the root group ``observables``. Observables -representing only a subset of the particles may be stored in appropriate -subgroups similarly to the ``particles`` tree. Each observable is stored as a -group obeying the ``value``, ``step``, ``time`` organization outlined above. -As for all time-dependent data, the shape of ``value`` depends on the tensor -rank of the observable prepended by a ``[variable]`` dimension. In addition, -each group may carry an optional integer attribute ``particles`` stating the -number of particles involved in the average. If this number varies, the -attribute is replaced by a dataset ``particles`` of ``[variable]`` dimension. +stored as time series in the root group ``observables``. The group is a +container for subgroups that represent different subsets of the system in the +same way as the ``particles`` tree. Observables referring to the whole system +are collected in the subgroup ``global``, which contains a group ``box`` for +the information about the simulation box. Each observable is stored as a group +obeying the ``value``, ``step``, ``time`` organization outlined above. As for +all time-dependent data, the shape of ``value`` depends on the tensor rank of +the observable prepended by a ``[variable]`` dimension. In addition, each +group may carry an optional integer attribute ``particles`` stating the number +of particles involved in the average. If this number varies, the attribute is +replaced by a dataset ``particles`` of ``[variable]`` dimension. The contents of the observables group has the following structure:: observables - \-- box - \-- - | +-- (particles) - | \-- step [variable] - | \-- time [variable] - +-- (unit) - | \-- value [variable] - +-- (unit) - \-- - | \-- (particles) [variable] - | \-- step [variable] - | \-- time [variable] - +-- (unit) - | \-- value [variable][D] - +-- (unit) + \-- global + | \-- box + | \-- + | | +-- (particles) + | | \-- step [variable] + | | \-- time [variable] + | | | +-- (unit) + | | \-- value [variable] + | | +-- (unit) + | \-- + | \-- (particles) [variable] + | \-- step [variable] + | \-- time [variable] + | | +-- (unit) + | \-- value [variable][D] + | +-- (unit) \-- | \-- | +-- (particles) | \-- step [variable] | \-- time [variable] - +-- (unit) + | | +-- (unit) | \-- value [variable][D][D] - +-- (unit) + | +-- (unit) \-- ... The following identifiers should be obeyed for the corresponding thermodynamic -- 1.7.7