sbmlmath.species_symbol

SBML MathML related functionality

Classes

SpeciesSymbol(*args[, representation_type, ...])

Represents a <ci> element containing a species.

class sbmlmath.species_symbol.SpeciesSymbol(*args, representation_type=None, species_reference=None, **kwargs)[source]

Bases: Dummy

Represents a <ci> element containing a species.

Represents, for example, <ci multi:representationType="sum"> bla </ci> or <ci multi:speciesReference="refS"> S </ci> (see SBML multi specs 3.26).

Subclassed from sympy.Dummy to avoid caching issues, due to using the same name but with different attributes / meanings.

Parameters:
  • representation_type (Literal['sum', 'numericValue'] | None) – What the species symbol represents (see also SBML-multi spec 3.26.2).

  • species_reference (str) – ID of a species reference in the same reaction (see also SBML-multi spec 3.26.1).

>>> SpeciesSymbol("S") + SpeciesSymbol("S", representation_type="sum")
_S + _S
>>> SpeciesSymbol("S") == SpeciesSymbol("S", representation_type="sum")
False
>>> SpeciesSymbol("ref_to_S", species_reference="S")
<ref_to_S(species_reference=S)>