U
("Up-regulator") up-regulates X
, by sharing an upstream reagent S
("Source") across 2 separate reactions:¶2 S <-> U
and S <-> X
(both mostly forward)¶1st-order kinetics throughout.
Invoking Le Chatelier's principle, it can be seen that, starting from equilibrium, when [U] goes up, so does [S]; and when [S] goes up, so does [X].
Conversely, when [U] goes down, so does [S]; and when [S] goes down, so does [X].
This experiment is a counterpart of experiment up_regulate_2
, with "upstream" rather than "downstream" reactions.
Note: numerical errors in the same reactions (with the same initial conditions) is explored in the experiment "large_time_steps_2"
LAST REVISED: June 23, 2024 (using v. 1.0 beta36)
import set_path # Importing this module will add the project's home directory to sys.path
Added 'D:\Docs\- MY CODE\BioSimulations\life123-Win7' to sys.path
from experiments.get_notebook_info import get_notebook_basename
from life123 import ChemData as chem
from life123 import UniformCompartment
from life123 import GraphicLog
# Initialize the HTML logging
log_file = get_notebook_basename() + ".log.htm" # Use the notebook base filename for the log file
# Set up the use of some specified graphic (Vue) components
GraphicLog.config(filename=log_file,
components=["vue_cytoscape_2"],
extra_js="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.21.2/cytoscape.umd.js")
-> Output will be LOGGED into the file 'up_regulate_3.log.htm'
# Initialize the system
chem_data = chem(names=["U", "X", "S"])
# Reaction 2 S <-> U , with 1st-order kinetics for all species (mostly forward)
chem_data.add_reaction(reactants=[(2, "S", 1)], products="U",
forward_rate=8., reverse_rate=2.)
# Reaction S <-> X , with 1st-order kinetics for all species (mostly forward)
chem_data.add_reaction(reactants="S", products="X",
forward_rate=6., reverse_rate=3.)
chem_data.describe_reactions()
# Send the plot of the reaction network to the HTML log file
chem_data.plot_reaction_network("vue_cytoscape_2")
Number of reactions: 2 (at temp. 25 C) 0: 2 S <-> U (kF = 8 / kR = 2 / delta_G = -3,436.6 / K = 4) | 1st order in all reactants & products 1: S <-> X (kF = 6 / kR = 3 / delta_G = -1,718.3 / K = 2) | 1st order in all reactants & products Set of chemicals involved in the above reactions: {'X', 'U', 'S'} [GRAPHIC ELEMENT SENT TO LOG FILE `up_regulate_3.log.htm`]
dynamics = UniformCompartment(chem_data=chem_data)
dynamics.set_conc(conc={"U": 50., "X": 100.})
dynamics.describe_state()
SYSTEM STATE at Time t = 0: 3 species: Species 0 (U). Conc: 50.0 Species 1 (X). Conc: 100.0 Species 2 (S). Conc: 0.0 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics = UniformCompartment(chem_data=chem_data, preset="fast")
dynamics.set_conc(conc={"U": 50., "X": 100.})
#dynamics.describe_state()
dynamics.set_diagnostics() # To save diagnostic information about the call to single_compartment_react()
dynamics.single_compartment_react(initial_step=0.01, target_end_time=1.5,
variable_steps=True)
#df = dynamics.get_history()
#dynamics.explain_time_advance()
30 total step(s) taken Number of step re-do's because of negative concentrations: 0 Number of step re-do's because of elective soft aborts: 1 Norm usage: {'norm_A': 23, 'norm_B': 15, 'norm_C': 15, 'norm_D': 15}
dynamics.plot_history(colors=['green', 'orange', 'darkturquoise'])
# Verify that the reaction has reached equilibrium
dynamics.is_in_equilibrium()
0: 2 S <-> U Final concentrations: [S] = 18.18 ; [U] = 72.73 1. Ratio of reactant/product concentrations, adjusted for reaction orders: 3.99995 Formula used: [U] / [S] 2. Ratio of forward/reverse reaction rates: 4 Discrepancy between the two values: 0.001174 % Reaction IS in equilibrium (within 1% tolerance) 1: S <-> X Final concentrations: [S] = 18.18 ; [X] = 36.36 1. Ratio of reactant/product concentrations, adjusted for reaction orders: 2.00006 Formula used: [X] / [S] 2. Ratio of forward/reverse reaction rates: 2 Discrepancy between the two values: 0.002978 % Reaction IS in equilibrium (within 1% tolerance)
True
dynamics.describe_state()
SYSTEM STATE at Time t = 1.6638105: 3 species: Species 0 (U). Conc: 72.72664619276735 Species 1 (X). Conc: 36.364832680090714 Species 2 (S). Conc: 18.18187493437456 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.set_single_conc(species_name="U", conc=100.)
dynamics.describe_state()
SYSTEM STATE at Time t = 1.6638105: 3 species: Species 0 (U). Conc: 100.0 Species 1 (X). Conc: 36.364832680090714 Species 2 (S). Conc: 18.18187493437456 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.get_history(tail=3)
SYSTEM TIME | U | X | S | caption | |
---|---|---|---|---|---|
29 | 1.296478 | 72.327210 | 37.127853 | 18.217727 | |
30 | 1.663810 | 72.726646 | 36.364833 | 18.181875 | |
31 | 1.663810 | 100.000000 | 36.364833 | 18.181875 | Set concentration of `U` |
dynamics.use_adaptive_preset(preset="mid")
#set_step_factors(upshift=1.2, downshift=0.5, abort=0.4) # Needs to tighten the time advance, to prevent mild instability
dynamics.single_compartment_react(initial_step=0.01, target_end_time=3.0,
variable_steps=True)
#df = dynamics.get_history()
#dynamics.explain_time_advance()
19 total step(s) taken Number of step re-do's because of negative concentrations: 0 Number of step re-do's because of elective soft aborts: 1 Norm usage: {'norm_A': 42, 'norm_B': 34, 'norm_C': 34, 'norm_D': 34}
dynamics.plot_history(colors=['green', 'orange', 'darkturquoise'])
# Verify that the reaction has reached equilibrium
dynamics.is_in_equilibrium()
0: 2 S <-> U Final concentrations: [S] = 23.16 ; [U] = 92.57 1. Ratio of reactant/product concentrations, adjusted for reaction orders: 3.99637 Formula used: [U] / [S] 2. Ratio of forward/reverse reaction rates: 4 Discrepancy between the two values: 0.09086 % Reaction IS in equilibrium (within 1% tolerance) 1: S <-> X Final concentrations: [S] = 23.16 ; [X] = 46.23 1. Ratio of reactant/product concentrations, adjusted for reaction orders: 1.99593 Formula used: [X] / [S] 2. Ratio of forward/reverse reaction rates: 2 Discrepancy between the two values: 0.2035 % Reaction IS in equilibrium (within 1% tolerance)
True
dynamics.describe_state()
SYSTEM STATE at Time t = 3.2112105: 3 species: Species 0 (U). Conc: 92.57375924458273 Species 1 (X). Conc: 46.234703179720654 Species 2 (S). Conc: 23.16448594557913 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.set_single_conc(species_name="U", conc=150.)
dynamics.describe_state()
SYSTEM STATE at Time t = 3.2112105: 3 species: Species 0 (U). Conc: 150.0 Species 1 (X). Conc: 46.234703179720654 Species 2 (S). Conc: 23.16448594557913 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.get_history(tail=3)
SYSTEM TIME | U | X | S | caption | |
---|---|---|---|---|---|
49 | 2.944977 | 92.638507 | 46.140467 | 23.129227 | |
50 | 3.211210 | 92.573759 | 46.234703 | 23.164486 | |
51 | 3.211210 | 150.000000 | 46.234703 | 23.164486 | Set concentration of `U` |
dynamics.single_compartment_react(initial_step=0.01, target_end_time=4.5,
variable_steps=True)
#dynamics.get_history()
#dynamics.explain_time_advance()
19 total step(s) taken Number of step re-do's because of negative concentrations: 0 Number of step re-do's because of elective soft aborts: 1 Norm usage: {'norm_A': 60, 'norm_B': 52, 'norm_C': 52, 'norm_D': 52}
dynamics.plot_history(colors=['green', 'orange', 'darkturquoise'])
# Verify that the reaction has reached equilibrium
dynamics.is_in_equilibrium(explain=False)
True
dynamics.describe_state()
SYSTEM STATE at Time t = 4.5023771: 3 species: Species 0 (U). Conc: 134.48228669496106 Species 1 (X). Conc: 66.874053871657 Species 2 (S). Conc: 33.56056186372072 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.set_single_conc(species_name="U", conc=80.)
dynamics.describe_state()
SYSTEM STATE at Time t = 4.5023771: 3 species: Species 0 (U). Conc: 80.0 Species 1 (X). Conc: 66.874053871657 Species 2 (S). Conc: 33.56056186372072 Set of chemicals involved in reactions: {'X', 'U', 'S'}
dynamics.get_history(tail=3)
SYSTEM TIME | U | X | S | caption | |
---|---|---|---|---|---|
69 | 4.280516 | 134.710837 | 66.428575 | 33.548940 | |
70 | 4.502377 | 134.482287 | 66.874054 | 33.560562 | |
71 | 4.502377 | 80.000000 | 66.874054 | 33.560562 | Set concentration of `U` |
dynamics.single_compartment_react(initial_step=0.01, target_end_time=6.,
variable_steps=True)
20 total step(s) taken Number of step re-do's because of negative concentrations: 0 Number of step re-do's because of elective soft aborts: 1 Norm usage: {'norm_A': 79, 'norm_B': 71, 'norm_C': 71, 'norm_D': 71}
#dynamics.history.get_dataframe()
#dynamics.explain_time_advance()
dynamics.plot_history(colors=['green', 'orange', 'darkturquoise'])
# Verify that the reaction has reached equilibrium
dynamics.is_in_equilibrium(explain=False)
True
Effect of the stoichiometry and the Delta_G on the "amplification" of the signal (from [U] to [X])
Effect of a continuously-varying (maybe oscillating [U]), and its being affected by the reactions' kinetics
Combining this experiment and up_regulate_2
in a "bifan motif"