nskinetics.SpeciesSystem#

class nskinetics.SpeciesSystem(ID, all_sps, concentrations=None, compartments=None, default_volume=1.0)[source]#

Bases: object

Abstract 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.

__init__(ID, all_sps, concentrations=None, compartments=None, default_volume=1.0)[source]#

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

all_sp_IDs

amounts

Amounts = concentration * compartment_volume for each species.

compartments

volume}

concentrations

volume

add_species(species, concentration=0.0)[source]#
property all_sp_IDs#
property amounts#

Amounts = concentration * compartment_volume for each species.

property compartments#

volume}

Type:

dict

Type:

{compartment_id

concentration(sp_ID)[source]#
property concentrations#
contains(sp)[source]#
get_compartment_volume(comp_ID)[source]#
index(sp)[source]#
index_from_ID(sp_ID)[source]#
Return type:

int

index_from_base_ID(base_ID)[source]#
Return type:

int

indices(some_sps)[source]#
remove_species(species)[source]#
set_compartment_volume(comp_ID, volume)[source]#
species(ID_or_index)[source]#
property volume#