cellmlunits¶
Conversion of SBML units to CellML units.
Every unit definition of an SBML model becomes CellML units of the same name.
An SBML unit stands for (multiplier * 10^scale * kind)^exponent, a CellML
unit for multiplier * (10^prefix * reference)^exponent: the scale becomes
the prefix, together with a multiplier which is a power of ten, and any other
multiplier its power multiplier^exponent. The unit kinds
of SBML are the standard units of CellML, except for item, which becomes
new base units (units without a unit), and avogadro, which becomes the
dimensionless units of that number.
CellMLUnits also finds the units of the elements which become variables. A
compartment, a parameter and a species with only substance units reference
their units (a unit definition, a unit kind or the units of the model), a
species in concentration has the units of its substance per the units of its
compartment and the rate of a reaction the units of the extent per the units
of time. For such a quotient the unit definition of the model which is
identical to it is used, else units numerator_per_denominator are added.
CellMLUnits
¶
The CellML units of an SBML model.
Convert the unit definitions of the SBML model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_sbml
|
Model
|
the SBML model. |
required |
model
|
Model
|
the CellML model, which the units are added to. |
required |
is_annotated
property
¶
Whether the SBML model says anything about units.
The units which level 1 and 2 have built in do not count: a model without any unit of its own is not an incomplete annotation.
name
¶
CellML units of an SBML unit reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference
|
str
|
the id of a unit definition, the name of a unit kind
or units which the SBML level has built in ( |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The name of the CellML units, |
number_units
¶
CellML units of the units of a number in a formula.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference
|
str
|
the |
required |
Returns:
| Type | Description |
|---|---|
str
|
The name of the CellML units, the reference itself when it is |
str
|
unknown (the validation of the CellML model reports it). |
per
¶
CellML units of the quotient of two SBML unit references.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
numerator
|
str
|
SBML unit reference, e.g. the substance units. |
required |
denominator
|
str
|
SBML unit reference, e.g. the units of a compartment. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The name of the unit definition of the model which is identical |
str | None
|
to the quotient, else of the units |
str | None
|
|
str | None
|
|
of_compartment
¶
CellML units of the size of a compartment, None when unknown.
of_species
¶
CellML units of a species, None when unknown.
The units of its substance when it has only substance units or its compartment no dimensions, else the concentration substance per size of the compartment.