1.1.1.2.1.2. equilibrator_api.model.model

a basic stoichiometric model with thermodynamics.

1.1.1.2.1.2.1. Module Contents

class equilibrator_api.model.model.StoichiometricModel(reactions: List[Reaction], comp_contrib: Optional[ComponentContribution] = None, standard_dg_primes: Optional[Q_] = None, dg_sigma: Optional[Q_] = None, bounds: Optional[Bounds] = None, config_dict: Optional[Dict[str, str]] = None, compound_id_mapping: Callable[[Compound], str] = None)[source]

Bases: object

A basic stoichiometric model with thermodynamics.

Designed as a base model for ‘Pathway’ which also includes flux directions and magnitudes.

CONFIDENCE_INTERVAL = 1.96[source]
MINIMAL_STDEV = 0.001[source]
configure(self)None[source]

Configure the Component Contribution aqueous conditions.

update_standard_dgs(self)None[source]

Calculate the standard ΔG’ values and uncertainties.

Use the Component Contribution method.

set_compound_ids(self, mapping: Callable[[Compound], str] = None)None[source]

Use alternative compound names for outputs such as plots.

Parameters

mapping (callable, optional) – a function mapping compounds to their names in the model

property bounds(self)Tuple[Iterable[float], Iterable[float]][source]

Get the concentration bounds.

The order of compounds is according to the stoichiometric matrix index.

Returns

Return type

tuple of (lower bounds, upper bounds)

property ln_conc_lb(self)numpy.array[source]

Get the log lower bounds on the concentrations.

The order of compounds is according to the stoichiometric matrix index.

Returns

Return type

a NumPy array of the log lower bounds

property ln_conc_ub(self)numpy.ndarray[source]

Get the log upper bounds on the concentrations.

The order of compounds is according to the stoichiometric matrix index.

Returns

Return type

a NumPy array of the log upper bounds

static get_compounds(reactions: Iterable[Reaction])List[Compound][source]

Get a unique list of all compounds in all reactions.

Parameters

reactions – an iterator of reactions

Returns

a list of unique compounds

property reaction_ids(self)Iterable[str][source]

Iterate through all the reaction IDs.

Returns

the reaction IDs

property reaction_formulas(self)Iterable[str][source]

Iterate through all the reaction formulas.

Returns

the reaction formulas

static read_thermodynamics(thermo_sbtab: equilibrator_api.model.SBtabTable, config_dict: Dict[str, str])Dict[str, Q_][source]

Read the ‘thermodynamics’ table from an SBtab.

Parameters
  • thermo_sbtab (SBtabTable) – A SBtabTable containing the thermodynamic data

  • config_dict (dict) – A dictionary containing the configuration arguments

Returns

Return type

A dictionary mapping reaction IDs to standard ΔG’ values.

classmethod from_network_sbtab(cls, filename: Union[str, SBtabDocument], comp_contrib: Optional[ComponentContribution] = None, freetext: bool = True, bounds: Optional[Bounds] = None)object[source]

Initialize a Pathway object using a ‘network’-only SBtab.

Parameters
  • filename (str, SBtabDocument) – a filename containing an SBtabDocument (or the SBtabDocument object itself) defining the network (topology) only

  • comp_contrib (ComponentContribution, optional) – a ComponentContribution object needed for parsing and searching the reactions. also used to set the aqueous parameters (pH, I, etc.)

  • freetext (bool, optional) – a flag indicating whether the reactions are given as free-text (i.e. common names for compounds) or by standard database accessions (Default value: True)

  • bounds (Bounds, optional) – bounds on metabolite concentrations (by default uses the “data/cofactors.csv” file in equilibrator-api)

Returns

Return type

a Pathway object

classmethod from_sbtab(cls, filename: Union[str, SBtabDocument], comp_contrib: Optional[ComponentContribution] = None)equilibrator_api.model.model.StoichiometricModel[source]

Parse and SBtabDocument and return a StoichiometricModel.

Parameters
  • filename (str or SBtabDocument) – a filename containing an SBtabDocument (or the SBtabDocument object itself) defining the pathway

  • comp_contrib (ComponentContribution, optional) – a ComponentContribution object needed for parsing and searching the reactions. also used to set the aqueous parameters (pH, I, etc.)

Returns

stoich_model – A StoichiometricModel object based on the configuration SBtab

Return type

StoichiometricModel

to_sbtab(self)equilibrator_api.model.SBtabDocument[source]

Export the model to an SBtabDocument.

write_sbtab(self, filename: str)None[source]

Write the pathway to an SBtab file.