vivarium.library.rate_law_utilities module

Rate law utilities

This collection of functions can assist in constructing and analyzing kinetic rate laws that are generated in wholecell.kinetic_rate_laws.kinetic_rate_laws.

Functions include:
  • load_reactions(): returns a dict of all_reactions, with location tags added to the enzymes

  • get_reactions_from_exchange: provided a dict of reactions and exchange molecules, this returns a list of all reactions for those exchange molecules

  • get_molecules_from_stoich: given a list of desired reactions and dict of all reactions with stoichiometry, returns all the relevant molecules – substrates and enzymes

The RateLawUtilities module can be called with: > python -m vivarium.library.rate_law_utilities

class vivarium.library.rate_law_utilities.RateLawUtilities[source]

Bases: object

add_arguments(parser)[source]
get_parameter_template(reactions)[source]

Given a list of reactions, return a template for required parameters

Parameters

reactions (dict) – a reaction network, with {reaction_id: {‘catalyzed by’: (list), ‘is reversible’: (bool), ‘stoichiometry’: (dict)}}

Returns

a template for all parameters required by this rate_law_configuration,

filled with values of 0.0.

Return type

parameter_template (dict)

run_analysis()[source]
template_from_exchange(exchange_molecules)[source]

saves a rate law parameter template for the list of exchange molecules

template_from_reactions(reactions_list)[source]

saves a rate law parameter template for the list of reactions

vivarium.library.rate_law_utilities.analyze_rate_laws(kinetic_rate_laws, baseline_concentrations, output_filename)[source]
Parameters
  • kinetic_rate_laws (object) – a configured kinetic_rate_law object

  • baseline_concentrations (dict) – concentrations for all molecules required for the rate laws

Function:

Runs an analysis of all rate laws in kinetic_rate_laws and saves the output in a plot

vivarium.library.rate_law_utilities.get_molecules_from_reactions(reaction_ids, all_reactions)[source]
Inputs:

reaction_ids (list) – reaction ids of interest all_reactions (dict): all reactions with stoichiometry, reversibility, enzymes

Returns

self.molecule_ids - a list of all molecules used by these reactions

vivarium.library.rate_law_utilities.get_reactions_from_exchange(all_reactions, include_exchanges)[source]
Parameters
  • all_reactions (dict) – all reactions with stoichiometry, reversibility, enzymes

  • include_exchanges (list) – molecules whose reactions are of interest

Returns

all the reactions for molecules listed in include_exchanges

Return type

include_reactions (list)

vivarium.library.rate_law_utilities.load_reactions()[source]

Load all reactions, including the locations of enzymes into each reaction’s ‘catalyzed by’ key

Returns

all_reactions(dict)

vivarium.library.rate_law_utilities.scan_conc(rate_law, concentrations, reaction_id, molecule_id, conc_samples)[source]