nskinetics.SpeciesSystem#
- class nskinetics.SpeciesSystem(ID, all_sps, concentrations=None, compartments=None, default_volume=1.0)[source]#
Bases:
objectAbstract class for a system containing defined chemical species. Note this class will, by convention, use “sp” to denote a single species and use “sps” to denote multiple species.
- Parameters:
ID (str) – ID.
all_sps (list) – List of Species objects or strings. If the latter, new Species objects will be created.
concentrations (list or np.ndarray, optional) – Concentrations of species, indexed the same way as all_sps. Defaults to zero-array of length equal to that of all_sps.
compartments (dict) – Dictionary with keys as compartment IDs and values as volumes. Volumes can be either a float or a callable that returns a float given the SpeciesSystem object as an argument.
Methods
__init__(ID, all_sps[, concentrations, ...])add_species(species[, concentration])concentration(sp_ID)contains(sp)get_compartment_volume(comp_ID)index(sp)index_from_ID(sp_ID)index_from_base_ID(base_ID)indices(some_sps)remove_species(species)set_compartment_volume(comp_ID, volume)species(ID_or_index)Attributes
Amounts = concentration * compartment_volume for each species.
volume}
- property all_sp_IDs#
- property amounts#
Amounts = concentration * compartment_volume for each species.
- property concentrations#
- property volume#