Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-discuss » units in sbml l2v3
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Sven Sahle


Posts: 82
Registered:
September 2003
Re: units in sbml l2v3 04 Jun '07 15:38 Go to previous messageGo to previous message

Hello Nicolas, hello all,

On Monday 04 June 2007 22:58:41 Nicolas Le Novere wrote:
> > I don´t see why the "old way" should not allow a correct calculation. I
> > understand that square inches look nicer with the "new way" but that does
> > not
> > make the "old way" incorrect.
> >
> > in = 2.54 * 10^-2 * m
> >
> > old way : sqin = 2.54^2 * 10^-4 * m^2
>
> Sven, here is the misunderstanding. In the old way, you do not have the
> first exponent. Your example is too simple.

Sorry, I was just lazy. I didn´ t want to actually calculate 2.54^2. I know
that I should have written :

old way: sqin = 6.4516 * 10^4 *m^2

And as I said I see that this one looks nicer with the "new way".


> Let's take another one, more
> explicit (I hope): a density of molecule expressed in micromole per square
> inches:
>
> <listOfUnitDefinitions>
> <unitDefinition id="umolPerSqIn">
> <listOfUnits>
> <unit kind="mole" scale="-6" />
> <unit kind="metre" multiplier="0.254" exponent="-2" />
> </listOfUnits>
> </unitDefinition>
> </listOfUnitDefinitions>
>
> old way:
>
> mole x 10E-6 x 0.254 x (metre)^(-2)
>
> new way:
>
> mole x 10E-6 x (0.254 x metre)^(-2)
>
> The first one is wrong. The second is right.

(minor correction: it should be 0.0254, not 0.254, but that is not the
problem)

It is quite obvious that if you encode a unit in sbml using the "new way" and
then interprete it the "old way", as you did, the result will be wrong. If
you encode the old way, and then interprete the old way, it will be correct:

sbml code old way:
<listOfUnitDefinitions>
<unitDefinition id="umolPerSqIn">
<listOfUnits>
<unit kind="mole" scale="-6" />
<unit kind="metre" multiplier="0.00064516" exponent="-2" />
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>

old interpretation: mole x 1e-6 x 0.00064516 m^(-2)

new interpretation: mole x 1e-6 x (0.00064516 m)^(-2)

The first is right, the second is wrong. Which is understandable, since it was
encoded the old way. And I can see that in this example the new way looks
more intuitive.

What I really do not get at all is: Why do you consider the old
interpretation "wrong"? It´s just a mathematical definition.

Old: Unit=multiplier*10^scale*baseunit^exponent
New: Unit=(multiplier*10^scale*baseunit)^exponent

Both are valid definitions. May be one is more convenient, may be one is more
fit for calculations, may be one is more adapted to what people expect.
Perhaps one is more appropriate for manual calculations, the other for
automatic handling. But certainly non of them is "wrong".

You know which definition I prefer. But I´ll try to be fair:

I think the new definition is definitely better for displaying units that
involve areas or volumes defined in imperial length units. And (after reading
the postings) it seems it matches the expectations of some sbml experts
(which is a strong argument).
I think the old way was better actually doing calculations without loosing
accuracy due to floating point operations, and for easier software
development.



--
Sven Sahle
Bioquant, Universität Heidelberg
____________________________________________________________
To manage your sbml-discuss list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss

For a web interface to the sbml-discuss mailing list, visit
http://sbml.org/forums/

For questions or feedback about the sbml-discuss list,
contact sbml-team@caltech.edu.


      

SubjectPosterDate
Read Message   units in sbml l2v3 Ralph Gauges30 May '07 06:21
Read Message   Re: units in sbml l2v3 Mike Hucka01 Jun '07 14:07
Read Message   Re: units in sbml l2v3 Sven Sahle01 Jun '07 16:36
Read Message   Re: units in sbml l2v3 Mike Hucka03 Jun '07 11:46
Read Message   Re: units in sbml l2v3 Sven Sahle04 Jun '07 08:36
Read Message   Re: units in sbml l2v3 Stefan.Hoops04 Jun '07 11:28
Read Message   Re: units in sbml l2v3 Sven Sahle04 Jun '07 13:06
Read Message   Re: units in sbml l2v3 Ralph.Gauges04 Jun '07 13:27
Read Message   Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 13:58
Read Message   Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 14:42
Read Message   Re: units in sbml l2v3  Sven Sahle04 Jun '07 15:38
Read Message   Re: units in sbml l2v3 Nicolas Le Novere05 Jun '07 00:47
Read Message   Re: units in sbml l2v3 Sven Sahle05 Jun '07 03:59
Read Message   Re: units in sbml l2v3 Mike Hucka06 Jun '07 23:19
Read Message   Re: units in sbml l2v3 Mike Hucka06 Jun '07 23:42
Previous Topic:DSMTS for SBML L2v3
Next Topic:Re: [Biomodels] Eight release of BioModels Database
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.