A <-> B catalyzed when ligand L binds to site 1 of macromolecule M1¶In Part 1 we consider the un-catalyzed reaction A <-> B
In Part 2 we'll see what happens when catalysis is added
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 life123 import ChemData
from life123 import UniformCompartment
import plotly.express as px
A <-> B by itself¶# Initialize the system
chem1 = ChemData(names=["A", "B"])
# Reaction A <-> B , without catalysis (slow forward rate, relative to what we'll see in Part 2)
chem1.add_reaction(reactants="A", products="B",
forward_rate=1. , delta_G= -5000)
chem1.describe_reactions()
Number of reactions: 1 (at temp. 25 C)
0: A <-> B (kF = 1 / kR = 0.13306 / delta_G = -5,000 / K = 7.5156) | 1st order in all reactants & products
Set of chemicals involved in the above reactions: {'B', 'A'}
# Set the initial concentrations of all the chemicals
dynamics1 = UniformCompartment(chem_data=chem1, preset="fast")
dynamics1.set_conc(conc={"A": 100., "B": 20.},
snapshot=True)
dynamics1.describe_state()
SYSTEM STATE at Time t = 0:
2 species:
Species 0 (A). Conc: 100.0
Species 1 (B). Conc: 20.0
Set of chemicals involved in reactions: {'B', 'A'}
# Take the system to equilibrium
dynamics1.set_diagnostics() # To save diagnostic information about the call to single_compartment_react()
# All of these settings are currently close to the default values... but subject to change; set for repeatability
#dynamics1.set_thresholds(norm="norm_A", low=0.6, high=1.0, abort=1.44)
#dynamics1.set_thresholds(norm="norm_B", low=0.04, high=0.6, abort=1.5)
#dynamics1.set_step_factors(upshift=1.2, downshift=0.7, abort=0.4, error=0.3)
dynamics1.single_compartment_react(initial_step=0.02, reaction_duration=4.0,
variable_steps=True)
single_compartment_react(): the argument `reaction_duration` is deprecated; use `duration` instead
63 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': 31, 'norm_B': 18, 'norm_C': 18, 'norm_D': 18}
#dynamics1.explain_time_advance()
dynamics1.plot_history(colors=['darkturquoise', 'green'], show_intervals=True, title_prefix="WITHOUT catalysis")
# Verify that the reaction has reached equilibrium
dynamics1.is_in_equilibrium()
0: A <-> B
Final concentrations: [A] = 14.14 ; [B] = 105.9
1. Ratio of reactant/product concentrations, adjusted for reaction orders: 7.48607
Formula used: [B] / [A]
2. Ratio of forward/reverse reaction rates: 7.51557
Discrepancy between the two values: 0.3926 %
Reaction IS in equilibrium (within 1% tolerance)
True
# Initialize the system
chem2 = ChemData(names=["A", "B", "L"])
chem2.add_macromolecules("M1")
chem2.set_binding_site_affinity("M1", site_number=1, ligand="L", Kd=5.0)
chem2.show_binding_affinities() # Review the values we have given for the dissociation constants
M1 : Site 1 - Kd (dissociation const) for L : 5.0
# Reaction A <-> B , without catalysis (same as he had in part 1)
chem2.add_reaction(reactants="A", products="B",
forward_rate=1. , delta_G= -5000)
# Reaction A <-> B , WITH catalysis (fast forward rate)
#rxn = chem2.add_reaction(reactants="A", products="B",
# forward_rate=10. , delta_G= -5000)
#rxn.set_macro_enzyme(macromolecule="M1", site_number=1)
chem2.describe_reactions()
Number of reactions: 1 (at temp. 25 C)
0: A <-> B (kF = 1 / kR = 0.13306 / delta_G = -5,000 / K = 7.5156) | 1st order in all reactants & products
Set of chemicals involved in the above reactions: {'B', 'A'}
L present; hence, only the slow reaction is in effect¶# Set the initial concentrations of all the chemicals, including the macromolecule
dynamics2 = UniformCompartment(chem_data=chem2, preset="fast")
dynamics2.set_conc(conc={"A": 100., "B": 20.},
snapshot=True) # The macromolecule ligand L is absent
dynamics2.set_macromolecules() # By default, set counts to 1 for all the registered macromolecules
dynamics2.describe_state()
SYSTEM STATE at Time t = 0:
3 species:
Species 0 (A). Conc: 100.0
Species 1 (B). Conc: 20.0
Species 2 (L). Conc: 0.0
Macro-molecules, with their counts: {'M1': 1}
Fractional Occupancy at the various binding sites for each macro-molecule:
M1 || 1: 0.0 (L)
Set of chemicals involved in reactions: {'B', 'A'}
dynamics2.set_diagnostics() # To save diagnostic information about the call to single_compartment_react()
# All of these settings are currently close to the default values... but subject to change; set for repeatability
#dynamics2.set_thresholds(norm="norm_A", low=0.6, high=1.0, abort=1.44)
#dynamics2.set_thresholds(norm="norm_B", low=0.04, high=0.6, abort=1.5)
#dynamics2.set_step_factors(upshift=1.2, downshift=0.7, abort=0.4, error=0.3)
dynamics2.single_compartment_react(initial_step=0.02, reaction_duration=4.0,
variable_steps=True)
single_compartment_react(): the argument `reaction_duration` is deprecated; use `duration` instead
63 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': 31, 'norm_B': 18, 'norm_C': 18, 'norm_D': 18}
dynamics2.explain_time_advance()
From time 0 to 0.012, in 1 step of 0.012 From time 0.012 to 0.03, in 1 step of 0.018 From time 0.03 to 0.1164, in 6 steps of 0.0144 From time 0.1164 to 0.138, in 1 step of 0.0216 From time 0.138 to 0.2762, in 8 steps of 0.0173 From time 0.2762 to 0.3022, in 1 step of 0.0259 From time 0.3022 to 0.4473, in 7 steps of 0.0207 From time 0.4473 to 0.4784, in 1 step of 0.0311 From time 0.4784 to 0.6028, in 5 steps of 0.0249 From time 0.6028 to 0.6402, in 1 step of 0.0373 From time 0.6402 to 0.7596, in 4 steps of 0.0299 From time 0.7596 to 0.8044, in 1 step of 0.0448 From time 0.8044 to 0.9477, in 4 steps of 0.0358 From time 0.9477 to 1.001, in 1 step of 0.0537 From time 1.001 to 1.087, in 2 steps of 0.043 From time 1.087 to 1.152, in 1 step of 0.0645 From time 1.152 to 1.255, in 2 steps of 0.0516 From time 1.255 to 1.333, in 1 step of 0.0774 From time 1.333 to 1.456, in 2 steps of 0.0619 From time 1.456 to 1.549, in 1 step of 0.0929 From time 1.549 to 1.624, in 1 step of 0.0743 From time 1.624 to 1.735, in 1 step of 0.111 From time 1.735 to 1.824, in 1 step of 0.0892 From time 1.824 to 1.958, in 1 step of 0.134 From time 1.958 to 2.065, in 1 step of 0.107 From time 2.065 to 2.386, in 2 steps of 0.16 From time 2.386 to 2.867, in 2 steps of 0.241 From time 2.867 to 3.228, in 1 step of 0.361 From time 3.228 to 3.77, in 1 step of 0.542 From time 3.77 to 4.583, in 1 step of 0.812 (63 steps total)
dynamics2.plot_history(colors=['darkturquoise', 'green', 'darkblue'], show_intervals=True, title_prefix="WITHOUT catalysis")
# Verify that the reaction has reached equilibrium
dynamics2.is_in_equilibrium()
0: A <-> B
Final concentrations: [A] = 14.14 ; [B] = 105.9
1. Ratio of reactant/product concentrations, adjusted for reaction orders: 7.48607
Formula used: [B] / [A]
2. Ratio of forward/reverse reaction rates: 7.51557
Discrepancy between the two values: 0.3926 %
Reaction IS in equilibrium (within 1% tolerance)
True