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
Mike Hucka


Posts: 967
Registered:
October 2003
Re: units in sbml l2v3 01 Jun '07 14:07 Go to previous messageGo to previous message

Hi Ralph,

Thanks for delving deeply into SBML units. The editors have
been trying to get the SBML spec out today, so I hope I'm
not too brain-drained to avoid mistakes in this reply, but
here it goes:

RG> In the old spec, the fomula was given as:
RG> multiplier * 10^scale * u^exponent
RG> after the change, then formula is supposed to be:
RG> (multiplier * 10^scale * u)^exponent

Yes. Here's a simple example to illustrate: if 1 foot =
0.3048 metres, how much is 1 square foot in metres?

unitDefinition id="sq_foot"
unit kind="metre" multiplier="0.3048" exponent="2" scale="0"

This SBMLish unit expression means

(0.3048 * metre)^2 = 0.0929 metres^2

I think we will agree this is correct? Note that the
exponent has to encompass the multiplier in this case.

OK, now to the gallon-to-cubic-metres case you gave:

1 gallon = 3.785411784 litres
1 litre = 1 cubic decimetre = 0.001 metre^3

To see how to turn this into SBML's units, first let's do
the litres-to-metres one for illustration (even though litre
is predefined in SBML):

unitDefinition id="litre"
unit kind="metre" multiplier="0.1" exponent="3"

which is to say,

(0.1 * metre)^3 = 0.001 metres^3

This also checks out. Now, for the gallon case, it may seem
as though you want to define one big unit with 3.785411784
as the multiplier, but it is not so. The reason is if you
want to define a gallon directly in terms of a length
measurement, the unit definition must be in terms of the
length of a cube that holds a gallon. This is not the same
as the defining a gallon in terms of another volume
measurement (which is what using 3.785411784 as a multiplier
would be). The former would indeed require a cube root
somewhere along the way.

Thus, I would argue that this case calls for two "unit"
objects inside one unitDefinition:

unitDefinition id="gallon"
unit kind="dimensionless" multiplier="3.785411784"
unit kind="metre" multiplier="0.1" exponent="3"

This seems pretty clean and straightforward, although I have
to admit, now that I look at the spec, the spec doesn't make
this approach immediately obvious.

One of your other examples confused me, however:

RG> Lets assume you want to multiply 2.0 * 10^-3 m^2 with
RG> 3.0 * 10^-5 m^3. The result should be 6.0 * 10^-8
RG> m^5.

I don't understand which is the unit and which is the
quantity. E.g., In the case of the "2.0 * 10^-3 m^2", are
you trying trying to define a single unit equal to "two
square millimetres"? (10^-3 m^2 would be square
millimetres, I think?)

If you do indeed mean to use strange multipliers, I think
here again you would pull out the part that's the actual
unit of measurement from the part that's the fraction of the
measurement, and use the unit-composition trick to define
the fraction separately from the unit of measurement, as in
the following:

unitDefinition id="funky_new_unit"
unit kind="dimensionless" multiplier=".002"
unit kind="metre" exponent="2"

or something along those lines. But I think I'm not
understand the intended units in that example.

In any case, I hope this clarifies a little bit of the
thinking behind the unit definition scheme and provides a
method for outright avoiding some of the complicated
fractions and roots.

What do you think about this?

MH

____________________________________________________________
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.