h5md-user
[Top][All Lists]
Advanced

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

Re: [h5md-user] Unit attribute versus non-dimensionless quantities


From: Peter Colberg
Subject: Re: [h5md-user] Unit attribute versus non-dimensionless quantities
Date: Thu, 1 Aug 2013 12:28:05 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 01, 2013 at 06:13:55PM +0200, Felix Höfling wrote:
> I think we would miss an important feature of HDF5 if we do not
> mention (and support) the possibility of annotating data in general,
> the physical unit is just one important example.
> 
> Many people in MD, in particular in the context of force fields and
> protein simulations, use absolute physical quantities and need
> units. I have seen many situations where even LJ units were
> translated to nm and fs. Just guessing or assuming physical units is
> not in the spirit of a self-describing file format.
> 
> The current specification is not as worse as it seems. The
> specification of units is possible for all proper datasets, only
> data stored as attributes can not carry a unit. We could just leave
> it as it is.

The specification as is cannot be implemented, since an attribute
cannot have an attribute. Since we seem to disagree on how to
implement units, this should be postponed.

Note that I would not consider a unit as an annotation. A
non-dimensionless quantity consists of a number and a unit.

For an example of how units could be implemented on a computer,
have a look at Boost.Units [1]. The idea is the same: the data
type is the type of the quantity, not the number.

[1] www.boost.org/libs/units

> I have also asked myself the question whether insisting on storing
> dimensionful data as HDF5 attributes might be a design flaw of H5MD,
> but I don't want to re-open this discussion.

That would be the natural consequence of using a "unit" attribute
attached to the data: the use of attributes would be forbidden for
most data. I doubt whether that is a good solution. I certainly
wish to annotate my datasets with non-dimensionless attributes.

Peter



reply via email to

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