This guide is for versions 1.0.0rc.6+ (Release Candidate)
7 classes: ReactionCommon, ReactionOneStep, ReactionUnimolecular,
ReactionSynthesis, ReactionDecomposition, ReactionEnzyme, ReactionGeneric
The objects from those classes are managed by the class ReactionRegistry.
Base class for all individual reactions. Typically NOT instantiated by the user.
name | arguments | returns |
---|---|---|
__init__ | active=True, temp=None | |
:param active: [NOT YET IMPLEMENTED] If False, the reaction is regarded as inactive :param temp: In Kelvins |
name | arguments | returns |
---|---|---|
extract_stoichiometry | term :(int, str, int) | int |
Return the stoichiometry coefficient, from a reaction TERM :param term: A triplet (int, str, int) representing a reaction term :return: An integer with the stoichiometry coefficient |
name | arguments | returns |
---|---|---|
extract_species_name | term :(int, str, int) | str |
Return the name of the chemical species, from a reaction TERM :param term: A triplet (int, str, int) representing a reaction term :return: The name of the chemical species in the term |
name | arguments | returns |
---|---|---|
extract_rxn_order | term :(int, str, int) | int |
Return the reaction order, from a reaction TERM :param term: A triplet (int, str, int) representing a reaction term :return: An integer with the reaction order for this term |
Base class for all reactions that can be modeled kinetically as happening in 1 step (i.e. with no intermediaries). Typically NOT instantiated by the user.
name | arguments | returns |
---|---|---|
__init__ | reversible=True, kF=None, kR=None, delta_H=None, delta_S=None, delta_G=None, **kwargs | |
:param reversible: :param kF: :param kR: :param delta_H: :param delta_S: :param delta_G: :param kwargs: |
name | arguments | returns |
---|---|---|
reaction_details | str | |
Return a string with some details about the parameters of this reaction :return: EXAMPLE: " (kF = 3 / kR = 2 / Delta_G = -1,005.13 / Temp = 25 C)" |
name | arguments | returns |
---|---|---|
extract_rxn_properties | {} | |
Create a dictionary with the numerical properties of the given reaction (skipping any lists or None values) Possible values include: forward and reverse reaction rates, ΔH, ΔS, ΔG, K (equilibrium constant) :return: EXAMPLE: {'kF': 3.0, 'kR': 2.0, 'delta_G': -1005.1305052750387, 'K': 1.5} |
name | arguments | returns |
---|---|---|
set_thermodynamic_data | temp :float | None |
Set all the thermodynamic data derivable from the given temperature, and all previously passed kinetic and thermodynamic data. Raise an Exception if any inconsistency is detected. :param temp: System temperature in Kelvins. For now, assumed constant everywhere, and unvarying (or very slowly varying). If the temp gradually changes, periodically call this method. :return: None |
name | arguments | returns |
---|---|---|
extract_forward_rate | float | |
:return: The value of the forward rate constant for this reaction |
name | arguments | returns |
---|---|---|
extract_reverse_rate | float | |
:return: The value of the reverse (back) rate constant for this reaction |
name | arguments | returns |
---|---|---|
extract_equilibrium_constant | float | |
:return: The value of the equilibrium constant for this reaction |
Reactions of type A <-> B
name | arguments | returns |
---|---|---|
__init__ | reactant :str, product :str, **kwargs | |
name | arguments | returns |
---|---|---|
describe | concise=False | str |
Return as a string, a user-friendly plain-text form of the reaction :param concise: If True, less detail is shown :return: A string with a description of the specified reaction |
name | arguments | returns |
---|---|---|
extract_reactant_labels | [str] | |
:return: |
name | arguments | returns |
---|---|---|
extract_reactants | [(int, str, int)] | |
Return a list of triplets with details of the reactants of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_product_labels | [str] | |
name | arguments | returns |
---|---|---|
extract_products | [(int, str, int)] | |
Return a list of triplet with details of the products of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_chemicals_in_reaction | Set[str] | |
Return a SET of the chemical labels of all the chemicals appearing in this reaction. :return: A SET of the labels of the chemicals involved in this reaction Note: being a set, it's NOT in any particular order |
name | arguments | returns |
---|---|---|
reaction_quotient | conc, explain=False | Union[np.double, Tuple[np.double, str]] |
Compute the "Reaction Quotient" (aka "Mass–action Ratio"), given the concentrations of chemicals involved in this reaction :param conc: Dictionary with the concentrations of the species involved in the reaction. The keys are the chemical labels EXAMPLE: {'A': 23.9, 'B': 36.1} :param explain: If True, it also returns the math formula being used for the computation EXAMPLES: "([C][D]) / ([A][B])" "[B] / [A]^2" :return: If explain is False, return value for the "Reaction Quotient" (aka "Mass–action Ratio"); if True, return a pair with that quotient and a string with the math formula that was used. Note that the reaction quotient is a Numpy scalar that might be np.inf or np.nan |
name | arguments | returns |
---|---|---|
determine_reaction_rate | conc_dict :dict | float |
For the specified concentrations of the chemicals in the unimolecular reaction, determine its initial reaction's "rate" (aka "velocity"), i.e. its "forward rate" minus its "reverse rate", at the start of the time step. :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6, "D": 19.9} :return: The differences between the reaction's forward and reverse rates |
name | arguments | returns |
---|---|---|
step_simulation | delta_time, conc_dict :dict | (dict, float) |
Simulate the unimolecular reaction, over the specified time interval :param delta_time: The time duration of this individual reaction step - assumed to be small enough that the concentration won't vary significantly during this span :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6} :return: The pair (increment_dict_single_rxn, rxn_rate) - increment_dict_single_rxn is the mapping of chemical label to their concentration changes during this step - rxn_rate is the reaction rate ("velocity") for this reaction (rate of change of the product) EXAMPLE of increment_dict_single_rxn: {"B": -0.2, "F": 0.2} |
Reactions of type A + B <-> C
name | arguments | returns |
---|---|---|
__init__ | reactants :(str, str), product :str, **kwargs | |
:param reactants: :param product: :param kwargs: |
name | arguments | returns |
---|---|---|
describe | concise=False | str |
Return as a string, a user-friendly plain-text form of the reaction :param concise: If True, less detail is shown :return: A string with a description of the specified reaction |
name | arguments | returns |
---|---|---|
extract_reactant_labels | [str] | |
:return: |
name | arguments | returns |
---|---|---|
extract_reactants | [(int, str, int)] | |
Return a list of triplets with details of the reactants of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_product_labels | [str] | |
name | arguments | returns |
---|---|---|
extract_products | [(int, str, int)] | |
Return a list of triplet with details of the products of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_chemicals_in_reaction | Set[str] | |
Return a SET of the chemical labels of all the chemicals appearing in this reaction. :return: A SET of the labels of the chemicals involved in this reaction Note: being a set, it's NOT in any particular order |
name | arguments | returns |
---|---|---|
reaction_quotient | conc, explain=False | Union[np.double, Tuple[np.double, str]] |
Compute the "Reaction Quotient" (aka "Mass–action Ratio"), given the concentrations of chemicals involved in this reaction :param conc: Dictionary with the concentrations of the species involved in the reaction. The keys are the chemical labels EXAMPLE: {'A': 23.9, 'B': 36.1} :param explain: If True, it also returns the math formula being used for the computation EXAMPLES: "([C][D]) / ([A][B])" "[B] / [A]^2" :return: If explain is False, return value for the "Reaction Quotient" (aka "Mass–action Ratio"); if True, return a pair with that quotient and a string with the math formula that was used. Note that the reaction quotient is a Numpy scalar that might be np.inf or np.nan |
name | arguments | returns |
---|---|---|
determine_reaction_rate | conc_dict :dict | float |
For the specified concentrations of the chemicals in the synthesis reaction, determine its initial reaction's "rate" (aka "velocity"), i.e. its "forward rate" minus its "reverse rate", at the start of the time step. :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6, "D": 19.9} :return: The differences between the reaction's forward and reverse rates |
name | arguments | returns |
---|---|---|
step_simulation | delta_time, conc_dict :dict | (dict, float) |
Simulate the synthesis reaction A + B <-> C, over the specified time interval, using the "Forward Euler" method :param delta_time: The time duration of this individual reaction step - assumed to be small enough that the concentration won't vary significantly during this span :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"A": 1.5, "B": 31.6, "C": 19.9} :return: The pair (increment_dict_single_rxn, rxn_rate) - increment_dict_single_rxn is the mapping of chemical label to their concentration changes during this step - rxn_rate is the reaction rate ("velocity") for this reaction (rate of change of the product) EXAMPLE of increment_dict_single_rxn: "A": -1.3, "B": 2.9, "C": -1.6 |
Reactions of type A <-> B + C
name | arguments | returns |
---|---|---|
__init__ | reactant :str, products :(str, str), **kwargs | |
:param reactant: :param products: :param kwargs: |
name | arguments | returns |
---|---|---|
describe | concise=False | str |
Return as a string, a user-friendly plain-text form of the reaction :param concise: If True, less detail is shown :return: A string with a description of the specified reaction |
name | arguments | returns |
---|---|---|
extract_reactant_labels | [str] | |
:return: |
name | arguments | returns |
---|---|---|
extract_reactants | [(int, str, int)] | |
Return a list of triplets with details of the reactants of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_product_labels | [str] | |
name | arguments | returns |
---|---|---|
extract_products | [(int, str, int)] | |
Return a list of triplet with details of the products of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_chemicals_in_reaction | Set[str] | |
Return a SET of the chemical labels of all the chemicals appearing in this reaction. :return: A SET of the labels of the chemicals involved in this reaction Note: being a set, it's NOT in any particular order |
name | arguments | returns |
---|---|---|
reaction_quotient | conc, explain=False | Union[np.double, Tuple[np.double, str]] |
Compute the "Reaction Quotient" (aka "Mass–action Ratio"), given the concentrations of chemicals involved in this reaction :param conc: Dictionary with the concentrations of the species involved in the reaction. The keys are the chemical labels EXAMPLE: {'A': 23.9, 'B': 36.1} :param explain: If True, it also returns the math formula being used for the computation EXAMPLES: "([C][D]) / ([A][B])" "[B] / [A]^2" :return: If explain is False, return value for the "Reaction Quotient" (aka "Mass–action Ratio"); if True, return a pair with that quotient and a string with the math formula that was used. Note that the reaction quotient is a Numpy scalar that might be np.inf or np.nan |
name | arguments | returns |
---|---|---|
determine_reaction_rate | conc_dict :dict | float |
For the specified concentrations of the chemicals in the decomposition reaction, determine its initial reaction's "rate" (aka "velocity"), i.e. its "forward rate" minus its "reverse rate", at the start of the time step. :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6, "D": 19.9} :return: The differences between the reaction's forward and reverse rates |
name | arguments | returns |
---|---|---|
step_simulation | delta_time, conc_dict :dict | (dict, float) |
Simulate the decomposition reaction A <-> B + C, over the specified time interval, using the "Forward Euler" method :param delta_time: The time duration of this individual reaction step - assumed to be small enough that the concentration won't vary significantly during this span :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"A": 1.5, "B": 31.6, "C": 19.9} :return: The pair (increment_dict_single_rxn, rxn_rate) - increment_dict_single_rxn is the mapping of chemical label to their concentration changes during this step - rxn_rate is the reaction rate ("velocity") for this reaction (rate of change of either of the products) EXAMPLE of increment_dict_single_rxn: "A": -1.3, "B": 2.9, "C": -1.6 |
Data about a SINGLE enzyme-catalyzed reaction that can be modeled kinetically as: E + S <-> ES -> E + P E : Enzyme S : Substrate ES: Intermediate Enzyme-Substrate complex P : Product
name | arguments | returns |
---|---|---|
__init__ | enzyme=None, substrate=None, product=None, k1_F=None, k1_R=None, k2_F=None, k2_R=None, kM=None, kcat=None, **kwargs | |
:param enzyme: The label for the chemical acting as enzyme :param substrate: The reactant :param product: The final reaction product :param k1_F: :param k1_R: :param k2_F: :param k2_R: [DEPRECATED] :param kM: Michaelis constant :param kcat: |
name | arguments | returns |
---|---|---|
describe | concise=False | str |
Return as a string, a user-friendly plain-text form of the reaction :param concise: If True, less detail is shown :return: A string with a description of the specified reaction |
name | arguments | returns |
---|---|---|
extract_reactant_labels | [str] | |
:return: |
name | arguments | returns |
---|---|---|
extract_reactants | [(int, str, int)] | |
Return a list of triplets with details of the reactants of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_product_labels | [str] | |
:return: |
name | arguments | returns |
---|---|---|
extract_products | [(int, str, int)] | |
Return a list of triplet with details of the products of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_chemicals_in_reaction | Set[str] | |
Return a SET of the chemical labels of all the chemicals appearing in this reaction. :return: A SET of the labels of the chemicals involved in this reaction Note: being a set, it's NOT in any particular order |
name | arguments | returns |
---|---|---|
extract_rxn_properties | {} | |
Create a dictionary with the numerical properties of the given reaction |
name | arguments | returns |
---|---|---|
compute_vmax | E_tot :float | float |
:param E_tot: Total Enzyme concentration (bound and unbound enzyme); at times referred to as E0 :return: The maximal reaction rate (the asymptote of the rate, as the Substrate concentration grows large relative to Enzyme concentration) |
name | arguments | returns |
---|---|---|
compute_rate | S_conc :float | float |
Based on the traditional Michaelis-Menten model. The argument may also be Numpy array. :param S_conc: The concentration [S] of the (free) Substrate, or a Numpy array of concentrations :return: The corresponding reaction rate, in terms of production of the product P |
name | arguments | returns |
---|---|---|
compute_rate_morrison | S_tot :float, E_tot :float | float |
Based on the Morrison model. The arguments may also be Numpy arrays. Reference: eqn 7.32 on page 124 of "Analysis of Enzyme Reaction Kinetics, Vol. 1", by F. Xavier Malcata, Wiley, 2023 :param S_tot: The total concentration of free Substrate and Substrate bound to Enzyme (i.e. [S] + [ES]) :param E_tot: Total Enzyme concentration (bound and unbound enzyme); at times referred to as E0 :return: The corresponding reaction rate, in terms of production of the product P |
name | arguments | returns |
---|---|---|
compute_k1_forward | kM, kcat, k1_reverse, verbose=False | |
Compute and return the value for k1_forward, given kM, kcat and k1_reverse. Note that this is a linear affine transformation : k1_forward = k1_reverse * (1 / kM) + (kcat / kM) :param kM: :param kcat: :param k1_reverse: :param verbose: :return: |
name | arguments | returns |
---|---|---|
compute_k1_reverse | kM, kcat, k1_forward: Union[float, np.ndarray], verbose=False | |
Compute and return the value for k1_reverse, given kM, kcat and k1_forward Note that this is a linear affine transformation : k1_reverse = k1_forward * kM - kcat :param kM: :param kcat: :param k1_forward: :param verbose: :return: |
name | arguments | returns |
---|---|---|
min_k1_forward | kM :float, kcat :float | float |
Return the minimum physically-possible value for k1_forward, for the given kinetic parameters kM and kcat :param kM: :param kcat: :return: |
name | arguments | returns |
---|---|---|
step_simulation | delta_time, conc_dict :dict | (dict, float) |
Simulate the enzymatic reaction E + S <-> ES -> E + P, over the specified time interval, using the "Forward Euler" method :param delta_time: The time duration of this individual reaction step - assumed to be small enough that the concentration won't vary significantly during this span :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"E": 1.5, "S": 31.6, "ES": 0.4, "P": 19.9} :return: The pair (increment_dict_single_rxn, rxn_rate) - increment_dict_single_rxn is the mapping of chemical label to their concentration changes during this step - rxn_rate pair one value for each elementary reaction EXAMPLE of increment_dict_single_rxn: {"E": 0, "S": -2.9, "ES": 0.1, "P": 2.8} |
Data about a generic SINGLE reaction of the most general type, with arbitrary number of reactants and products, arbitrary stoichiometry, and arbitrary kinetic reaction orders for each participating chemical. Included: - stoichiometry - kinetic data (reaction rates, reaction orders) - thermodynamic data (temperature, changes in enthalpy/entropy/Gibbs Free Energy) - list of involved enzymes (Note: this data will eventually be stored in a graph database) Each reaction contains: "reactants" "products" "kF" (forward reaction rate constant) "kR" (reverse reaction rate constant) "enzyme" (the index of a chemical that catalyzes this reaction) "macro_enzyme" (The pair (macromolecule name, binding site number)) plus thermodynamic data: delta_H, delta_S, delta_G, K (equilibrium constant) - for details see class "ThermoDynamics" Internally, each Reactant and each Product is a triplet of the form: (stoichiometry, species index, reaction order). The "reaction order" in that triplet refers to the forward reaction for reactants, and to the reverse reaction for products. Note that any reactant and products might be catalysts
name | arguments | returns |
---|---|---|
__init__ | reactants: Union[int, str, list], products: Union[int, str, list], **kwargs | |
Create the structure for a new SINGLE chemical reaction, optionally including its kinetic and/or thermodynamic data. All the involved chemicals must be already registered - use add_chemical() if needed. NOTE: in the reactants and products, if the stoichiometry coefficients aren't specified, they're assumed to be 1. The reaction orders, if not specified, are assumed to be equal to their corresponding stoichiometry coefficients. The full structure of each term in the list of reactants and of products is the triplet: (stoichiometry coefficient, name, reaction order) EXAMPLES of formats to use for each term in the lists of the reactants and of the products: "F" is taken to mean (1, "F", 1) - default stoichiometry and reaction order (2, "F") is taken to mean (2, "F", 2) - stoichiometry coefficient used as default for reaction order (2, "F", 1) means stoichiometry coefficient 2 and reaction order 1 - no defaults invoked It's equally acceptable to use LISTS in lieu of tuples for the pair or triplets :param reactants: A list of triplets (stoichiometry, species name, reaction order), or simplified terms in various formats; for details, see above. If not a list, it will get turned into one :param products: A list of triplets (stoichiometry, species name, reaction order of REVERSE reaction), or simplified terms in various formats; for details, see above. If not a list, it will get turned into one :param kF: [OPTIONAL] Forward reaction rate constant :param kR: [OPTIONAL] Reverse reaction rate constant :param delta_H: [OPTIONAL] Change in Enthalpy (from reactants to products) :param delta_S: [OPTIONAL] Change in Entropy (from reactants to products) :param delta_G: [OPTIONAL] Change in Free Energy (from reactants to products), in Joules :param temp: [OPTIONAL] Temperature in Kelvins. For now, assumed constant everywhere, and unvarying (or very slowly varying) |
name | arguments | returns |
---|---|---|
set_macro_enzyme | macromolecule: str, site_number: int | None |
Register that the given macromolecule, at the given site on it, catalyzes this reaction :param macromolecule: Name of macromolecule acting as a catalyst :param site_number: Integer to identify a binding site on the above macromolecule :return: None |
name | arguments | returns |
---|---|---|
extract_reactants | [(int, str, int)] | |
Return a list of triplets with details of the reactants of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_reactants_formula | str | |
Return a string with a user-friendly form of the left (reactants) side of the reaction formula EXAMPLE: "CH4 + 2 O2" :return: A string with one side of a chemical reaction |
name | arguments | returns |
---|---|---|
extract_products | [(int, str, int)] | |
Return a list of triplet with details of the products of the given reaction, incl. their stoichiometry, chemical label, and reaction order :return: A list of triplets of the form (stoichiometry, chemical label, reaction order) |
name | arguments | returns |
---|---|---|
extract_products_formula | str | |
Return a string with a user-friendly form of the right (products) side of the reaction formula :return: A string with one side of a chemical reaction |
name | arguments | returns |
---|---|---|
unpack_for_dynamics | tuple | |
A convenient unpacking meant for dynamics simulations that need the reactants, the products, and the forward and reverse rate constants :return: A 4-element tuple, containing: (reactants , products , forward rate constant , reverse rate constant) Note: both reactants products are lists of triplets |
name | arguments | returns |
---|---|---|
extract_chemicals_in_reaction | Set[str] | |
Return a SET of the chemical labels of all the chemicals appearing in this reaction. Optionally, exclude any that participate in a catalytic role (appearing identically on both sides of the reaction) :param exclude_enzyme: If True, any enzyme, if present, won't be included :return: A SET of the labels of the chemicals involved in this reaction Note: being a set, it's NOT in any particular order |
name | arguments | returns |
---|---|---|
extract_reactant_labels | [str] | |
In the order in which they appear when the reaction was first defined :return: List of chemical names |
name | arguments | returns |
---|---|---|
extract_product_labels | [str] | |
In the order in which they appear when the reaction was first defined :return: List of chemical names |
name | arguments | returns |
---|---|---|
describe | concise=False | str |
Return as a string, a user-friendly plain-text form of the reaction EXAMPLE (concise): "CH4 + 2 O2 <-> CO2 + 2 H2O" EXAMPLE (not concise): "CH4 + 2 O2 <-> CO2 + 2 H2O (kF = 3.0 / kR = 2.0 / Delta_G = -1,005.13 / K = 1.5) | 1st order in all reactants & products" :param concise: If True, less detail is shown :return: A string with a description of the specified reaction |
name | arguments | returns |
---|---|---|
reaction_quotient | conc, explain=False | Union[np.double, Tuple[np.double, str]] |
Compute the "Reaction Quotient" (aka "Mass–action Ratio"), given the concentrations of chemicals involved in this reaction :param conc: Dictionary with the concentrations of the species involved in the reaction. The keys are the chemical labels EXAMPLE: {'A': 23.9, 'B': 36.1} :param explain: If True, it also returns the math formula being used for the computation EXAMPLES: "([C][D]) / ([A][B])" "[B] / [A]^2" :return: If explain is False, return value for the "Reaction Quotient" (aka "Mass–action Ratio"); if True, return a pair with that quotient and a string with the math formula that was used. Note that the reaction quotient is a Numpy scalar that might be np.inf or np.nan |
name | arguments | returns |
---|---|---|
determine_reaction_rate | conc_dict :dict | float |
For the specified concentrations of the chemicals in the generic reaction, determine its initial reaction's "rate" (aka "velocity"), i.e. its "forward rate" minus its "reverse rate", at the start of the time step. :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6, "D": 19.9} :return: The differences between the reaction's forward and reverse rates |
name | arguments | returns |
---|---|---|
step_simulation | delta_time, conc_dict :dict | (dict, float) |
Simulate the generic reaction, over the specified time interval :param delta_time: The time duration of this individual reaction step - assumed to be small enough that the concentration won't vary significantly during this span :param conc_dict: A dict mapping chemical labels to their concentrations, for all the chemicals involved in the given reaction EXAMPLE: {"B": 1.5, "F": 31.6, "D": 19.9} :return: The pair (increment_dict_single_rxn, rxn_rate) - increment_dict_single_rxn is the mapping of chemical label to their concentration changes during this step - rxn_rate is the reaction rate ("velocity") for this reaction EXAMPLE of increment_dict_single_rxn: {"B": -1.3, "F": 2.9, "D": -1.6} |