10.1.2.1.5. freeflux.core.reaction¶
Define the Reaction class.
10.1.2.1.5.1. Attributes¶
10.1.2.1.5.2. Classes¶
Define Reaction object which constitute a Model. |
10.1.2.1.5.3. Module Contents¶
- class freeflux.core.reaction.Reaction(id, reversible=True)[source]¶
Define Reaction object which constitute a Model.
Duplicate substrates or products could appear in one reaction, but with different atoms.
- substrates_info[source]¶
Index are substrate IDs (there could be duplicate substrates), columns are Metabolite object and its stoichiometric number.
- Type:
df
- products_info[source]¶
Index are product IDs (there could be duplicate products), columns are Metabolite object and stoichiometrc number.
- Type:
df
- _substrates_atom_mapping[source]¶
For example, reactants like: A({‘ab’: 0.5, ‘ba’: 0.5}) + B({‘c’: 1}) will be transformed to [{‘a’: [A, 1, 0.5], ‘b’: [A, 2, 0.5], ‘c’: [C, 1, 1]},
{‘a’: [A, 2, 0.5], ‘b’: [A, 1, 0.5], ‘a’: [C, 1, 1]}]
- _products_atom_mapping[source]¶
For example, reactants like: A({‘ab’: 0.5, ‘ba’: 0.5}) + B({‘c’: 1}) will be transformed to [{‘a’: [A, 1, 0.5], ‘b’: [A, 2, 0.5], ‘c’: [C, 1, 1]},
{‘a’: [A, 2, 0.5], ‘b’: [A, 1, 0.5], ‘a’: [C, 1, 1]}]
- flux(fflux and bflux for reversible reaction)¶
Reaction flux (forward flux and backward flux for reversible reaction).
- Type:
Symbol
- add_substrates(substrates, stoichiometry)[source]¶
- Parameters:
substrates (Metabolite or list of Metabolite)
stoichiometry (float or list of float) – Stoichiometric number(s) of corresponding substrate(s).
- add_products(products, stoichiometry)[source]¶
- Parameters:
products (Metabolite or list of Metabolite.)
stoichiometry (float or list of float) – stoichiometric number(s) of corresponding product(s).
- remove_substrates(substrates)[source]¶
- Parameters:
substrates (Metabolite or list of Metabolite)
- remove_products(products)[source]¶
- Parameters:
products (Metabolite or list of Metabolite)
- _atom_mapping(reactant)[source]¶
- Parameters:
reactant (str,) – ‘substrate’ or ‘product’
Notes
Reactants like: A({‘ab’: 0.5, ‘ba’: 0.5}) + B({‘c’: 1}) will be transformed to [{‘a’: [A, 1, 0.5], ‘b’: [A, 2, 0.5], ‘c’: [C, 1, 1]},
{‘a’: [A, 2, 0.5], ‘b’: [A, 1, 0.5], ‘a’: [C, 1, 1]}].