cycles_1¶A <-> B <-> C <-> A and C + E_High <-> A + E_Low¶The system automatic detects those problems, intercepts the problematic steps and re-runs them with 1/2 the time step.
Negative concentrations are automatically avoided, but nonetheless the plots are ragged... and the solutions are eventually unstable.
with thresholds that lead to those substeps being actually utilized a fair part of the time.
The raggedness and instabilities are now eliminated.
(Note: the 1/2 substeps are on a per-reaction basis)
LAST REVISED: Dec. 3, 2023 THIS IS AN ARCHIVED EXPERIMENT
If you bypass the execution exit in the first cell, and run the other cells, you WILL NOT REPLICATE the results below!
# To stop the current and subsequent cells: USED TO PREVENT ACCIDENTAL RUNS OF THIS NOTEBOOK!
class StopExecution(Exception):
def _render_traceback_(self):
return []
raise StopExecution # See: https://stackoverflow.com/a/56953105/5478830
from experiments.get_notebook_info import get_notebook_basename
from src.modules.chemicals.chem_data import ChemData as chem
from src.modules.reactions.reaction_dynamics import ReactionDynamics
from src.modules.visualization.graphic_log 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_1"],
extra_js="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.21.2/cytoscape.umd.js")
-> Output will be LOGGED into the file 'large_time_steps_1.log.htm'
# Initialize the system
chem_data = chem(names=["A", "B", "C", "E_high", "E_low"])
# Reaction A <-> B, mostly in forward direction (favored energetically)
# Note: all reactions in this experiment have 1st-order kinetics for all species
chem_data.add_reaction(reactants="A", products="B",
forward_rate=9., reverse_rate=3.)
# Reaction B <-> C, also favored energetically
chem_data.add_reaction(reactants="B", products="C",
forward_rate=8., reverse_rate=4.)
# Reaction C + E_High <-> A + E_Low, also favored energetically, but kinetically slow
# Note that, thanks to the energy donation from E, we can go "upstream" from C, to the higher-energy level of "A"
chem_data.add_reaction(reactants=["C" , "E_high"], products=["A", "E_low"],
forward_rate=1., reverse_rate=0.2)
chem_data.describe_reactions()
# Send the plot of the reaction network to the HTML log file
graph_data = chem_data.prepare_graph_network()
GraphicLog.export_plot(graph_data, "vue_cytoscape_1")
Number of reactions: 3 (at temp. 25 C) 0: A <-> B (kF = 9 / kR = 3 / Delta_G = -2,723.41 / K = 3) | 1st order in all reactants & products 1: B <-> C (kF = 8 / kR = 4 / Delta_G = -1,718.28 / K = 2) | 1st order in all reactants & products 2: C + E_high <-> A + E_low (kF = 1 / kR = 0.2 / Delta_G = -3,989.73 / K = 5) | 1st order in all reactants & products [GRAPHIC ELEMENT SENT TO LOG FILE `large_time_steps_1.log.htm`]
initial_conc = {"A": 100., "B": 0., "C": 0., "E_high": 1000., "E_low": 0.} # Note the abundant energy source "E_high"
initial_conc
{'A': 100.0, 'B': 0.0, 'C': 0.0, 'E_high': 1000.0, 'E_low': 0.0}
Time [0-0.03] fast changes
Time [0.03-5.] medium changes
Time [5.-8.] slow changes, as we approach equilibrium
The system automatic detects those problems, intercepts the problematic steps and re-runs them with 1/2 the time step.
Negative concentrations are automatically avoided, but nonetheless the plots are ragged... and the solutions are eventually unstable.
dynamics = ReactionDynamics(chem_data=chem_data)
dynamics.set_conc(conc=initial_conc, snapshot=True)
dynamics.describe_state()
SYSTEM STATE at Time t = 0: 5 species: Species 0 (A). Conc: 100.0 Species 1 (B). Conc: 0.0 Species 2 (C). Conc: 0.0 Species 3 (E_high). Conc: 1000.0 Species 4 (E_low). Conc: 0.0
dynamics.set_diagnostics() # To save diagnostic information about the call to single_compartment_react()
#dynamics.verbose_list = ["substeps"] # Uncomment for debugging information
dynamics.single_compartment_react(time_step=0.0012, stop_time=0.03)
#dynamics.get_history()
The computation took 36 extra step(s) - automatically added to prevent negative concentrations 44 total step(s) taken
dynamics.explain_time_advance()
From time 0 to 0.0012, in 2 substeps of 0.0006 (each 1/2 of full step) From time 0.0012 to 0.0162, in 50 substeps of 0.0003 (each 1/4 of full step) From time 0.0162 to 0.024, in 13 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012
dynamics.single_compartment_react(time_step=0.0025, stop_time=5.)
#dynamics.get_history()
The computation took 130 extra step(s) - automatically added to prevent negative concentrations 2053 total step(s) taken
dynamics.explain_time_advance()
From time 0 to 0.0012, in 2 substeps of 0.0006 (each 1/2 of full step) From time 0.0012 to 0.0162, in 50 substeps of 0.0003 (each 1/4 of full step) From time 0.0162 to 0.024, in 13 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012 From time 0.0312 to 0.0337, in 2 substeps of 0.00125 (each 1/2 of full step) From time 0.0337 to 0.17, in 218 substeps of 0.000625 (each 1/4 of full step) From time 0.17 to 0.172, in 1 FULL step of 0.0025 From time 0.172 to 2.28, in 1686 substeps of 0.00125 (each 1/2 of full step) From time 2.28 to 5, in 1089 FULL steps of 0.0025
The time step that was originally requested hovers near the cusp of being so large as to lead to negative concentrations
dynamics.single_compartment_react(time_step=0.008, stop_time=8.)
The computation took 49 extra step(s) - automatically added to prevent negative concentrations 400 total step(s) taken
df = dynamics.get_history()
df
| SYSTEM TIME | A | B | C | E_high | E_low | caption | |
|---|---|---|---|---|---|---|---|
| 0 | 0.00000 | 100.000000 | 0.000000 | 0.000000 | 1000.000000 | 0.000000 | Initial state |
| 1 | 0.00060 | 99.460000 | 0.540000 | 0.000000 | 1000.000000 | 0.000000 | Interm. step, due to the fast rxns: [0, 1, 2] |
| 2 | 0.00120 | 98.923888 | 1.073520 | 0.002592 | 1000.000000 | 0.000000 | |
| 3 | 0.00150 | 98.658537 | 1.337075 | 0.004388 | 999.999222 | 0.000778 | Interm. step, due to the fast rxns: [0] |
| 4 | 0.00180 | 98.394140 | 1.599676 | 0.006183 | 999.998445 | 0.001555 | |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 3623 | 7.97045 | 10.018391 | 30.006875 | 59.974735 | 32.330220 | 967.669780 | |
| 3624 | 7.97845 | 10.018012 | 30.006785 | 59.975202 | 32.329439 | 967.670561 | |
| 3625 | 7.98645 | 10.017978 | 30.006691 | 59.975330 | 32.328339 | 967.671661 | |
| 3626 | 7.99445 | 10.017485 | 30.006608 | 59.975908 | 32.327699 | 967.672301 | |
| 3627 | 8.00245 | 10.017621 | 30.006514 | 59.975865 | 32.326462 | 967.673538 |
3628 rows × 7 columns
cycles_1, which this analysis is based on¶dynamics.explain_time_advance()
From time 0 to 0.0012, in 2 substeps of 0.0006 (each 1/2 of full step) From time 0.0012 to 0.0162, in 50 substeps of 0.0003 (each 1/4 of full step) From time 0.0162 to 0.024, in 13 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012 From time 0.0312 to 0.0337, in 2 substeps of 0.00125 (each 1/2 of full step) From time 0.0337 to 0.17, in 218 substeps of 0.000625 (each 1/4 of full step) From time 0.17 to 0.172, in 1 FULL step of 0.0025 From time 0.172 to 2.28, in 1686 substeps of 0.00125 (each 1/2 of full step) From time 2.28 to 5, in 1089 FULL steps of 0.0025 From time 5 to 6.42, in 354 substeps of 0.004 (each 1/2 of full step) From time 6.42 to 6.5, in 10 FULL steps of 0.008 From time 6.5 to 6.51, in 2 substeps of 0.004 (each 1/2 of full step) From time 6.51 to 6.64, in 17 FULL steps of 0.008 From time 6.64 to 6.65, in 2 substeps of 0.004 (each 1/2 of full step) From time 6.65 to 6.8, in 19 FULL steps of 0.008 From time 6.8 to 6.81, in 2 substeps of 0.004 (each 1/2 of full step) From time 6.81 to 6.98, in 21 FULL steps of 0.008 From time 6.98 to 6.99, in 2 substeps of 0.004 (each 1/2 of full step) From time 6.99 to 7.17, in 23 FULL steps of 0.008 From time 7.17 to 7.18, in 2 substeps of 0.004 (each 1/2 of full step) From time 7.18 to 7.38, in 25 FULL steps of 0.008 From time 7.38 to 7.39, in 2 substeps of 0.004 (each 1/2 of full step) From time 7.39 to 7.6, in 27 FULL steps of 0.008 From time 7.6 to 7.61, in 2 substeps of 0.004 (each 1/2 of full step) From time 7.61 to 7.84, in 29 FULL steps of 0.008 From time 7.84 to 7.85, in 2 substeps of 0.004 (each 1/2 of full step) From time 7.85 to 8, in 19 FULL steps of 0.008
At times, especially near the end, the throttling gets very frequent ("frantic"!)
dynamics.plot_history(chemicals=["E_high", "E_low"], colors=["red", "grey"])
dynamics.plot_history(chemicals=["A", "B", "C"])
with thresholds that lead to those substeps being actually utilized a fair part of the time.
The raggedness and instabilities are now eliminated.
(Note: the 1/2 substeps are on a per-reaction basis)
dynamics = ReactionDynamics(chem_data=chem_data) # Note: OVER-WRITING the "dynamics" object
dynamics.set_conc(conc=initial_conc, snapshot=True)
dynamics.describe_state()
SYSTEM STATE at Time t = 0: 5 species: Species 0 (A). Conc: 100.0 Species 1 (B). Conc: 0.0 Species 2 (C). Conc: 0.0 Species 3 (E_high). Conc: 1000.0 Species 4 (E_low). Conc: 0.0
dynamics.set_diagnostics() # To save diagnostic information about the call to single_compartment_react()
#dynamics.verbose_list = ["substeps"] # Uncomment for debugging information
dynamics.single_compartment_react(time_step=0.0012, stop_time=0.03,
dynamic_substeps=2, abs_fast_threshold=750.)
#dynamics.get_history()
single_compartment_react(): setting rel_fast_threshold to 89.99999999999999 The computation took 38 extra step(s) - automatically added to prevent negative concentrations (an extra dynamic substeps that might have been taken, are NOT part of the above count) 45 total step(s) taken
dynamics.explain_time_advance()
From time 0 to 0.0024, in 2 FULL steps of 0.0012 From time 0.0024 to 0.024, in 36 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012
(1/2 factors arise from either the negative concentrations or the optional substeps triggered by large changes; sometime both occur)
dynamics.single_compartment_react(time_step=0.0025, stop_time=5.,
dynamic_substeps=2, abs_fast_threshold=250.)
#dynamics.get_history()
single_compartment_react(): setting rel_fast_threshold to 62.5 The computation took 109 extra step(s) - automatically added to prevent negative concentrations (an extra dynamic substeps that might have been taken, are NOT part of the above count) 2043 total step(s) taken
dynamics.explain_time_advance()
From time 0 to 0.0024, in 2 FULL steps of 0.0012 From time 0.0024 to 0.024, in 36 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012 From time 0.0312 to 0.17, in 111 substeps of 0.00125 (each 1/2 of full step) From time 0.17 to 0.257, in 35 FULL steps of 0.0025 From time 0.257 to 0.259, in 1 substep of 0.00125 (1/2 of full step) From time 0.259 to 0.276, in 7 FULL steps of 0.0025 From time 0.276 to 0.277, in 1 substep of 0.00125 (1/2 of full step) From time 0.277 to 0.29, in 5 FULL steps of 0.0025 From time 0.29 to 0.291, in 1 substep of 0.00125 (1/2 of full step) From time 0.291 to 0.304, in 5 FULL steps of 0.0025 From time 0.304 to 0.305, in 1 substep of 0.00125 (1/2 of full step) From time 0.305 to 0.322, in 7 FULL steps of 0.0025 From time 0.322 to 0.324, in 1 substep of 0.00125 (1/2 of full step) From time 0.324 to 0.341, in 7 FULL steps of 0.0025 From time 0.341 to 0.342, in 1 substep of 0.00125 (1/2 of full step) From time 0.342 to 0.355, in 5 FULL steps of 0.0025 From time 0.355 to 0.356, in 1 substep of 0.00125 (1/2 of full step) From time 0.356 to 0.374, in 7 FULL steps of 0.0025 From time 0.374 to 0.375, in 1 substep of 0.00125 (1/2 of full step) From time 0.375 to 0.392, in 7 FULL steps of 0.0025 From time 0.392 to 0.394, in 1 substep of 0.00125 (1/2 of full step) From time 0.394 to 0.416, in 9 FULL steps of 0.0025 From time 0.416 to 0.417, in 1 substep of 0.00125 (1/2 of full step) From time 0.417 to 0.435, in 7 FULL steps of 0.0025 From time 0.435 to 0.436, in 1 substep of 0.00125 (1/2 of full step) From time 0.436 to 0.459, in 9 FULL steps of 0.0025 From time 0.459 to 0.46, in 1 substep of 0.00125 (1/2 of full step) From time 0.46 to 0.482, in 9 FULL steps of 0.0025 From time 0.482 to 0.484, in 1 substep of 0.00125 (1/2 of full step) From time 0.484 to 0.511, in 11 FULL steps of 0.0025 From time 0.511 to 0.512, in 1 substep of 0.00125 (1/2 of full step) From time 0.512 to 0.545, in 13 FULL steps of 0.0025 From time 0.545 to 0.546, in 1 substep of 0.00125 (1/2 of full step) From time 0.546 to 0.579, in 13 FULL steps of 0.0025 From time 0.579 to 0.58, in 1 substep of 0.00125 (1/2 of full step) From time 0.58 to 0.622, in 17 FULL steps of 0.0025 From time 0.622 to 0.624, in 1 substep of 0.00125 (1/2 of full step) From time 0.624 to 0.676, in 21 FULL steps of 0.0025 From time 0.676 to 0.677, in 1 substep of 0.00125 (1/2 of full step) From time 0.677 to 0.78, in 41 FULL steps of 0.0025 From time 0.78 to 0.781, in 1 substep of 0.00125 (1/2 of full step) From time 0.781 to 5, in 1688 FULL steps of 0.0025
dynamics.single_compartment_react(time_step=0.008, stop_time=8.,
dynamic_substeps=2, abs_fast_threshold=2.)
single_compartment_react(): setting rel_fast_threshold to 1.6 375 total step(s) taken
df = dynamics.get_history()
df
| SYSTEM TIME | A | B | C | E_high | E_low | caption | |
|---|---|---|---|---|---|---|---|
| 0 | 0.0000 | 100.000000 | 0.000000 | 0.000000 | 1000.000000 | 0.000000 | Initial state |
| 1 | 0.0012 | 98.920000 | 1.080000 | 0.000000 | 1000.000000 | 0.000000 | |
| 2 | 0.0024 | 97.855552 | 2.134080 | 0.010368 | 1000.000000 | 0.000000 | |
| 3 | 0.0030 | 97.337194 | 2.648440 | 0.014366 | 999.993779 | 0.006221 | |
| 4 | 0.0036 | 96.824887 | 3.156616 | 0.018497 | 999.985232 | 0.014768 | |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 2493 | 7.9732 | 8.663600 | 30.034016 | 61.302385 | 33.266197 | 966.733803 | |
| 2494 | 7.9812 | 11.674383 | 29.976478 | 58.349140 | 30.352451 | 969.647549 | |
| 2495 | 7.9892 | 7.609519 | 30.046276 | 62.344205 | 34.296194 | 965.703806 | |
| 2496 | 7.9972 | 13.130430 | 29.945103 | 56.924467 | 28.948509 | 971.051491 | |
| 2497 | 8.0052 | 5.686231 | 30.076908 | 64.236860 | 36.165999 | 963.834001 |
2498 rows × 7 columns
dynamics.explain_time_advance()
From time 0 to 0.0024, in 2 FULL steps of 0.0012 From time 0.0024 to 0.024, in 36 substeps of 0.0006 (each 1/2 of full step) From time 0.024 to 0.0312, in 6 FULL steps of 0.0012 From time 0.0312 to 0.17, in 111 substeps of 0.00125 (each 1/2 of full step) From time 0.17 to 0.257, in 35 FULL steps of 0.0025 From time 0.257 to 0.259, in 1 substep of 0.00125 (1/2 of full step) From time 0.259 to 0.276, in 7 FULL steps of 0.0025 From time 0.276 to 0.277, in 1 substep of 0.00125 (1/2 of full step) From time 0.277 to 0.29, in 5 FULL steps of 0.0025 From time 0.29 to 0.291, in 1 substep of 0.00125 (1/2 of full step) From time 0.291 to 0.304, in 5 FULL steps of 0.0025 From time 0.304 to 0.305, in 1 substep of 0.00125 (1/2 of full step) From time 0.305 to 0.322, in 7 FULL steps of 0.0025 From time 0.322 to 0.324, in 1 substep of 0.00125 (1/2 of full step) From time 0.324 to 0.341, in 7 FULL steps of 0.0025 From time 0.341 to 0.342, in 1 substep of 0.00125 (1/2 of full step) From time 0.342 to 0.355, in 5 FULL steps of 0.0025 From time 0.355 to 0.356, in 1 substep of 0.00125 (1/2 of full step) From time 0.356 to 0.374, in 7 FULL steps of 0.0025 From time 0.374 to 0.375, in 1 substep of 0.00125 (1/2 of full step) From time 0.375 to 0.392, in 7 FULL steps of 0.0025 From time 0.392 to 0.394, in 1 substep of 0.00125 (1/2 of full step) From time 0.394 to 0.416, in 9 FULL steps of 0.0025 From time 0.416 to 0.417, in 1 substep of 0.00125 (1/2 of full step) From time 0.417 to 0.435, in 7 FULL steps of 0.0025 From time 0.435 to 0.436, in 1 substep of 0.00125 (1/2 of full step) From time 0.436 to 0.459, in 9 FULL steps of 0.0025 From time 0.459 to 0.46, in 1 substep of 0.00125 (1/2 of full step) From time 0.46 to 0.482, in 9 FULL steps of 0.0025 From time 0.482 to 0.484, in 1 substep of 0.00125 (1/2 of full step) From time 0.484 to 0.511, in 11 FULL steps of 0.0025 From time 0.511 to 0.512, in 1 substep of 0.00125 (1/2 of full step) From time 0.512 to 0.545, in 13 FULL steps of 0.0025 From time 0.545 to 0.546, in 1 substep of 0.00125 (1/2 of full step) From time 0.546 to 0.579, in 13 FULL steps of 0.0025 From time 0.579 to 0.58, in 1 substep of 0.00125 (1/2 of full step) From time 0.58 to 0.622, in 17 FULL steps of 0.0025 From time 0.622 to 0.624, in 1 substep of 0.00125 (1/2 of full step) From time 0.624 to 0.676, in 21 FULL steps of 0.0025 From time 0.676 to 0.677, in 1 substep of 0.00125 (1/2 of full step) From time 0.677 to 0.78, in 41 FULL steps of 0.0025 From time 0.78 to 0.781, in 1 substep of 0.00125 (1/2 of full step) From time 0.781 to 5, in 1688 FULL steps of 0.0025 From time 5 to 5.38, in 47 FULL steps of 0.008 From time 5.38 to 5.38, in 1 substep of 0.004 (1/2 of full step) From time 5.38 to 5.44, in 7 FULL steps of 0.008 From time 5.44 to 5.44, in 1 substep of 0.004 (1/2 of full step) From time 5.44 to 5.48, in 5 FULL steps of 0.008 From time 5.48 to 5.49, in 1 substep of 0.004 (1/2 of full step) From time 5.49 to 5.54, in 7 FULL steps of 0.008 From time 5.54 to 5.55, in 1 substep of 0.004 (1/2 of full step) From time 5.55 to 5.59, in 5 FULL steps of 0.008 From time 5.59 to 5.59, in 1 substep of 0.004 (1/2 of full step) From time 5.59 to 5.65, in 7 FULL steps of 0.008 From time 5.65 to 5.65, in 1 substep of 0.004 (1/2 of full step) From time 5.65 to 5.69, in 5 FULL steps of 0.008 From time 5.69 to 5.69, in 1 substep of 0.004 (1/2 of full step) From time 5.69 to 5.75, in 7 FULL steps of 0.008 From time 5.75 to 5.75, in 1 substep of 0.004 (1/2 of full step) From time 5.75 to 5.79, in 5 FULL steps of 0.008 From time 5.79 to 5.8, in 1 substep of 0.004 (1/2 of full step) From time 5.8 to 5.85, in 7 FULL steps of 0.008 From time 5.85 to 5.86, in 1 substep of 0.004 (1/2 of full step) From time 5.86 to 5.9, in 5 FULL steps of 0.008 From time 5.9 to 5.9, in 1 substep of 0.004 (1/2 of full step) From time 5.9 to 5.96, in 7 FULL steps of 0.008 From time 5.96 to 5.96, in 1 substep of 0.004 (1/2 of full step) From time 5.96 to 6.02, in 7 FULL steps of 0.008 From time 6.02 to 6.02, in 1 substep of 0.004 (1/2 of full step) From time 6.02 to 6.06, in 5 FULL steps of 0.008 From time 6.06 to 6.07, in 1 substep of 0.004 (1/2 of full step) From time 6.07 to 6.12, in 7 FULL steps of 0.008 From time 6.12 to 6.13, in 1 substep of 0.004 (1/2 of full step) From time 6.13 to 6.17, in 5 FULL steps of 0.008 From time 6.17 to 6.17, in 1 substep of 0.004 (1/2 of full step) From time 6.17 to 6.23, in 7 FULL steps of 0.008 From time 6.23 to 6.23, in 1 substep of 0.004 (1/2 of full step) From time 6.23 to 6.29, in 7 FULL steps of 0.008 From time 6.29 to 6.29, in 1 substep of 0.004 (1/2 of full step) From time 6.29 to 6.33, in 5 FULL steps of 0.008 From time 6.33 to 6.33, in 1 substep of 0.004 (1/2 of full step) From time 6.33 to 6.39, in 7 FULL steps of 0.008 From time 6.39 to 6.39, in 1 substep of 0.004 (1/2 of full step) From time 6.39 to 6.45, in 7 FULL steps of 0.008 From time 6.45 to 6.45, in 1 substep of 0.004 (1/2 of full step) From time 6.45 to 6.49, in 5 FULL steps of 0.008 From time 6.49 to 6.5, in 1 substep of 0.004 (1/2 of full step) From time 6.5 to 6.55, in 7 FULL steps of 0.008 From time 6.55 to 6.56, in 1 substep of 0.004 (1/2 of full step) From time 6.56 to 6.61, in 7 FULL steps of 0.008 From time 6.61 to 6.62, in 1 substep of 0.004 (1/2 of full step) From time 6.62 to 6.66, in 5 FULL steps of 0.008 From time 6.66 to 6.66, in 1 substep of 0.004 (1/2 of full step) From time 6.66 to 6.72, in 7 FULL steps of 0.008 From time 6.72 to 6.72, in 1 substep of 0.004 (1/2 of full step) From time 6.72 to 6.78, in 7 FULL steps of 0.008 From time 6.78 to 6.78, in 1 substep of 0.004 (1/2 of full step) From time 6.78 to 6.82, in 5 FULL steps of 0.008 From time 6.82 to 6.83, in 1 substep of 0.004 (1/2 of full step) From time 6.83 to 6.88, in 7 FULL steps of 0.008 From time 6.88 to 6.89, in 1 substep of 0.004 (1/2 of full step) From time 6.89 to 6.94, in 7 FULL steps of 0.008 From time 6.94 to 6.95, in 1 substep of 0.004 (1/2 of full step) From time 6.95 to 6.99, in 5 FULL steps of 0.008 From time 6.99 to 6.99, in 1 substep of 0.004 (1/2 of full step) From time 6.99 to 7.05, in 7 FULL steps of 0.008 From time 7.05 to 7.05, in 1 substep of 0.004 (1/2 of full step) From time 7.05 to 7.11, in 7 FULL steps of 0.008 From time 7.11 to 7.11, in 1 substep of 0.004 (1/2 of full step) From time 7.11 to 7.15, in 5 FULL steps of 0.008 From time 7.15 to 7.15, in 1 substep of 0.004 (1/2 of full step) From time 7.15 to 7.21, in 7 FULL steps of 0.008 From time 7.21 to 7.21, in 1 substep of 0.004 (1/2 of full step) From time 7.21 to 7.27, in 7 FULL steps of 0.008 From time 7.27 to 7.27, in 1 substep of 0.004 (1/2 of full step) From time 7.27 to 7.31, in 5 FULL steps of 0.008 From time 7.31 to 7.32, in 1 substep of 0.004 (1/2 of full step) From time 7.32 to 7.37, in 7 FULL steps of 0.008 From time 7.37 to 7.38, in 1 substep of 0.004 (1/2 of full step) From time 7.38 to 7.43, in 7 FULL steps of 0.008 From time 7.43 to 7.44, in 1 substep of 0.004 (1/2 of full step) From time 7.44 to 7.48, in 5 FULL steps of 0.008 From time 7.48 to 7.48, in 1 substep of 0.004 (1/2 of full step) From time 7.48 to 7.54, in 7 FULL steps of 0.008 From time 7.54 to 7.54, in 1 substep of 0.004 (1/2 of full step) From time 7.54 to 7.6, in 7 FULL steps of 0.008 From time 7.6 to 7.6, in 1 substep of 0.004 (1/2 of full step) From time 7.6 to 7.64, in 5 FULL steps of 0.008 From time 7.64 to 7.65, in 1 substep of 0.004 (1/2 of full step) From time 7.65 to 7.7, in 7 FULL steps of 0.008 From time 7.7 to 7.71, in 1 substep of 0.004 (1/2 of full step) From time 7.71 to 7.76, in 7 FULL steps of 0.008 From time 7.76 to 7.77, in 1 substep of 0.004 (1/2 of full step) From time 7.77 to 7.81, in 5 FULL steps of 0.008 From time 7.81 to 7.81, in 1 substep of 0.004 (1/2 of full step) From time 7.81 to 7.87, in 7 FULL steps of 0.008 From time 7.87 to 7.87, in 1 substep of 0.004 (1/2 of full step) From time 7.87 to 7.93, in 7 FULL steps of 0.008 From time 7.93 to 7.93, in 1 substep of 0.004 (1/2 of full step) From time 7.93 to 7.97, in 5 FULL steps of 0.008 From time 7.97 to 7.97, in 1 substep of 0.004 (1/2 of full step) From time 7.97 to 8.01, in 4 FULL steps of 0.008
dynamics.plot_history(chemicals=["E_high", "E_low"], colors=["red", "grey"])
dynamics.plot_history(chemicals=["A", "B", "C"])