vivarium.processes.metabolism module

Metabolism Process

This module defines a process class for modeling a cell’s metabolic processes with flux balance analysis (FBA). The cobrapy FBA library is used for solving the problems. This supports metabolic models from the BiGG model database, and other configurations that can be passed to Metabolism to create models of metabolism.

class vivarium.processes.metabolism.Metabolism(initial_parameters=None)[source]

Bases: vivarium.core.process.Process

A general class that is configured to match specific models

This metabolism process class models metabolism using flux balance analysis (FBA). The FBA problem is defined using the provided configuration parameters.

To see how to configure the process manually, look at the source code for test_toy_metabolism().

Ports:

  • external: Holds the state of molecules external to the FBA reactions. For a model of a cell’s metabolism, this will likely hold metabolite concentrations in the extracellular space.

  • internal: Holds the state of molecules internal to the FBA. For a model of a cell’s metabolism, this will probably be the cytosolic concentrations.

  • reactions: Holds the IDs of the modeled metabolic reactions. The linked store does not need to be shared with any other processes.

  • fields: The environmental fields that will be updated with cell intake and uptake.

  • dimensions: Holds the dimensions of the environment.

  • flux_bounds: The bounds on the FBA, which are imposed by the availability of metabolites. For example, for the metabolism of a cell, the bounds represent the limits of transmembrane transport.

  • global: Should be linked to the global store.

Parameters

initial_parameters (dict) –

Configures the process with the following keys/values:

  • initial_state (dict): the default state, with a dict for internal and external, like this: {'external': external_state, 'internal': internal_state}

  • stoichiometry (dict): a map from reaction ID to that reaction’s stoichiometry dictionary, e.g. {reaction_id: stoichiometry_dict}

  • objective (dict): the stoichiometry dict to be optimized

  • external_molecules (list): the external molecules

  • reversible_reactions (list)

defaults = {'constrained_reaction_ids': [], 'default_upper_bound': 0.0, 'exchange_threshold': 0.0001, 'global_deriver_key': 'global_deriver', 'initial_mass': 1339, 'initial_state': {}, 'mass_deriver_key': 'mass_deriver', 'model_path': 'models/iAF1260b.json', 'regulation': {}, 'time_step': 1}
derivers()[source]
name = 'metabolism'
next_update(timestep, states)[source]
ports_schema()[source]
vivarium.processes.metabolism.get_e_coli_core_config()[source]

Get an E. coli core metabolism model

The model is the e_coli_core model from BiGG.

Returns

A configuration for the model that can be passed to the Metabolism constructor.

vivarium.processes.metabolism.get_fg_from_counts(counts_dict, mw)[source]
vivarium.processes.metabolism.get_iAF1260b_config()[source]

Get the metabolism config for the iAF1260b BiGG model

The metabolism model is the iAF1260b model from BiGG.

Returns

A configuration for the model that can be passed to the Metabolism constructor.

vivarium.processes.metabolism.get_toy_configuration()[source]
vivarium.processes.metabolism.make_kinetic_rate(mol_id, vmax, km=0.0)[source]
vivarium.processes.metabolism.metabolism_similar_to_reference()[source]
vivarium.processes.metabolism.run_metabolism(metabolism, settings=None)[source]
vivarium.processes.metabolism.run_sim_save_network(config={'default_upper_bound': 1000.0, 'exchange_bounds': {'A': -0.02, 'D': 0.01, 'E': 0.01, 'F': -0.005, 'H': -0.005, 'O2': -0.1}, 'external_molecules': ['A', 'F', 'D', 'E', 'H', 'O2'], 'initial_state': {'external': {'A': 21.0, 'D': 12.0, 'E': 12.0, 'F': 5.0, 'H': 5.0, 'O2': 100.0}}, 'molecular_weights': {'A': 500.0, 'ATP': 507.181, 'B': 500.0, 'C': 500.0, 'D': 500.0, 'E': 500.0, 'F': 50000.0, 'H': 1.00794, 'NADH': 664.425, 'O2': 31.9988}, 'objective': {'v_biomass': 1.0}, 'reversible': ['R6', 'R7', 'Rres'], 'stoichiometry': {'R1': {'A': -1, 'ATP': -1, 'B': 1}, 'R2a': {'ATP': 2, 'B': -1, 'C': 1, 'NADH': 2}, 'R2b': {'ATP': -2, 'B': 1, 'C': -1, 'NADH': -2}, 'R3': {'B': -1, 'F': 1}, 'R4': {'C': -1, 'G': 1}, 'R5': {'C': 0.8, 'G': -1, 'NADH': 2}, 'R6': {'ATP': 2, 'C': -1, 'D': 3}, 'R7': {'C': -1, 'E': 3, 'NADH': -4}, 'R8a': {'ATP': -1, 'G': -1, 'H': 1, 'NADH': -2}, 'R8b': {'ATP': 1, 'G': 1, 'H': -1, 'NADH': 2}, 'Rres': {'ATP': 1, 'NADH': -1, 'O2': -1}, 'v_biomass': {'ATP': -10, 'C': -1, 'F': -1, 'H': -1}}}, out_dir='out/network')[source]
vivarium.processes.metabolism.test_BiGG_metabolism(config={'model_path': 'models/iAF1260b.json'}, settings={})[source]
vivarium.processes.metabolism.test_toy_metabolism()[source]
vivarium.processes.metabolism.toy_transport()[source]