|
Boost Users : |
Subject: Re: [Boost-users] [Units] Molecular units base_units trouble: please help
From: Christopher Bruns (cmbruns_at_[hidden])
Date: 2009-01-05 16:29:27
Matthias Schabel wrote:
> In general, it's easiest to avoid explicitly creating unit systems by
> using the ::unit_type approach. For most cases, the unit system ought
> to be considered an implementation detail since the library supports
> heterogeneous units transparently. That is, for any given unit, the
> appropriate system is just the set of units needed to fully describe
> the unit itself...
Thank you Matthias for the code example. It was exactly what I needed
to get back into implementation flow.
Yet I still feel the urge to create an md_units_system. For instance,
once I create a system including base_units picoseconds, daltons, and
nanometers, I can automatically create an energy unit in that system
which magically has units of kilojoules per mole, without having to
remember how mass, time, length, and energy are related.
I am now pondering the creation of a clever set of base units such
that Avogadro's constant appears in only one conversion factor to SI
units. Either mass or amount would need to be a derived unit. But
perhaps this topic is drifting outside the scope of the boost users
list...
Steven Watanabe wrote:
> This was definitely a bug in the library. Fixed in the trunk.
Thank you Steven Watanabe so much for your rapid analysis and fix of
this bug. I have updated to the latest trunk and can verify that the
compile errors no longer occur.
I now have all I need to proceed to more sophisticated use of
boost.units in molecular computation. Thanks again for the thoughtful
and diligent help Matthias and Steven.
--Chris Bruns
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net