SBML Functions

PhysicalProperty semsim::GetSpeciesPhysicalProperty(LIBSBML_CPP_NAMESPACE_QUALIFIER Species * s, LIBSBML_CPP_NAMESPACE_QUALIFIER Model * m)

Try to deduce the PhysicalProperty(amount or concentration) from an SBML species. There are two possible deductions:

The deduction is made using the following rules:

  • Is “hasOnlySubstanceUnits” set? If it is true, the physical property will be mass. If it is false, it will be concentration.

  • Is “initialAmount” or “initialConcentration” set? If so, the physical property will be mass or concentration resp. If they are both set (not valid SBML), skip to the next rule.

  • If “substanceUnits” is set to “kilgram”, “gram”, “mole”, or “item”, the physical property will be mass. If the “substanceUnits” are set to a unit defintion in terms of mass/volume, the physical property will be concentration.

If none of these rules matches, a

std::domain_error is thrown.

LIBSBML_CPP_NAMESPACE_QUALIFIER UnitDefinition* semsim::findUnitDefinition(const std::string & sid, LIBSBML_CPP_NAMESPACE_QUALIFIER Model * m)

Find a UnitDefinition from a given sid; throw if not found.