biocrnpyler.core.WeightedSpecies
- class biocrnpyler.core.WeightedSpecies(species: Species, stoichiometry: int = 1)[source]
Bases:
objectContainer for a species with stoichiometric coefficient.
Wraps a
Speciesobject together with its stoichiometry for use in reactions. This class is primarily used internally by the Reaction class to represent reactants and products with their coefficients.- Parameters:
species (
Species) – The species object.stoichiometry (
int, default1) – The stoichiometric coefficient. Must be a positive integer.
- Attributes:
species (
Species) – The wrapped species object.stoichiometry (
int) – The stoichiometric coefficient (positive integer).
See also
Examples
Create a weighted species:
>>> S = bcp.Species('S') >>> ws = bcp.WeightedSpecies(species=S, stoichiometry=2) >>> ws.stoichiometry 2
Methods
pretty_printreplace_species