34. Stochastic Chemical Kinetics 1 by MIT OpenCourseWare

Description

34. Stochastic Chemical Kinetics 1 by MIT OpenCourseWare

Summary by www.lecturesummary.com: 34. Stochastic Chemical Kinetics 1 by MIT OpenCourseWare


  • Lecture Overview

    • [0:00] - Introduction and License details.
    • [0:11] - Goals of the lecture: Kinetic Monte Carlo example, relationship between master equations, normal kinetic equations, and kinetic Monte Carlo trajectories.
    • [0:35] - Choosing an easy example, considering that the number of possible states can be astronomical in real problems.
    • [0:58] - Easy example: Low Density Lipoprotein (LDL) oxidation within the human body.
    • [1:09] - Description of LDL, how to measure it, and its effects on health (inflammation, heart attack).
    • [2:04] - Concentrating on the easiest case: lipid oxidation without antioxidants such as Vitamin E or Vitamin C. The model is a bubble of fat (lipid) in water.
    • [2:30] - The central reaction: Peroxy radical (R) + lipid (RH) → peroxide + radical. Radicals subsequently react quickly with oxygen (O2) to reform the radical, making the net process catalytic (R + RH + O2 → R + ROOH). ROOH (peroxide) accumulation leads to inflammation.
    • [3:26] - Why stochastic kinetics may be required: Vesicles are extremely small, and the number of radicals may be extremely small due to antioxidants and minute concentrations.
    • [4:18] - Continuum model challenges: Since vesicles are small, they are not the same, even if there are numerous vesicles.
    • [4:40] - Simplifying assumptions: Oxygen concentration is never low. The quantity of lipid (RH) is taken to be constant for the time being.
    • [5:06] - Classical kinetics view: d[RO]/dt is roughly constant times [RO].
    • [5:25] - Other important processes in the system:
      • Radical termination: Collision between two peroxy radicals forms stable molecules (2R → stable). This is referred to as K4.
      • Radical arrival: Radicals from the external water may diffuse into the lipid vesicle (K1). K1 is considered to be a constant rate.
      • Radical diffusion out: Radicals diffuse out of the vesicle (K2). K2 is based on the number of radicals within.
    • [6:16] - These reactions are K1 (arrival), K2 (diffusion out), K3 (oxidation reaction), and K4 (self-destruction/termination).
    • [6:34] - Kinetic Monte Carlo method (Gillespie algorithm): Aims to calculate a trajectory of the number of radicals (n_rad) and peroxides (n_ro) over time.
    • [7:15] - Simulation inputs: Initial n_rad, initial n_ro, vector of rate coefficients (K), maximum simulation time, maximum number of steps.
    • [7:54] - The overall structure of the simulation main loop.
    • [8:08] - The loop continues while time is less than the max time.
    • [8:20] - Step 1 of Gillespie algorithm: Calculate the time step until the next event. Calculate 'A', the total of all rates.
    • [9:37] - Step 2 of Gillespie algorithm: Determine which event occurs. Compute each process's probability (P1, P2, P3, P4) by dividing its rate by the sum rate 'A'.
    • [10:20] - Generate a random number (x) between 0 and 1. Compare x with cumulative probabilities to determine which event happens.
    • [10:55] - Apply the structure of code for determining the event based on the random number x using `if/elseif/else`. Increment n_rad or n_ro according to the chosen event.
    • [12:23] - Save the simulation output (time, n_rad, n_ro) to a trajectory table.
    • [12:47] - Setting initial conditions: n_rad = 1, n_ro = 0.
    • [13:07] - Setting rate coefficients (K).
    • [13:19] - K1 (arrival) is given a small value, such as 1e-5, to begin with.
    • [13:42] - K2 (diffusion out): How it physically scales with diffusion constant (D) and vesicle radius (R) (like D/R²).
    • [14:02] - Vesicle size estimation: Choosing R = 1 micron (1e-6 meters).
    • [14:16] - Diffusion constant estimation: 1e-5 cm²/s or 1e-9 m²/s for liquid phase.
    • Calculation of K2: D/R² ~ 1e-9 / (1e-6)² = 1000 per second. Fix: Original calculation was incorrect; recalculation of K2 from 1e-9 m²/s is 1000. This implies a millisecond timescale for diffusion out.

      K3 (oxidation reaction): Referencing usual rates (10^8 L/mol·s with activation energy ~15 kcal/mol). K3 from the model must be per second units, so it's the lookup rate constant times the RH concentration.

      Approximating RH concentration: From density of organic matter and H atoms per CH2 group, unit conversions from g/cm³ to mol/m³. Must use unit conversions.

      Estimated value calculation attempt for K3: With body temperature (310K) and estimated values. First calculation appeared too small (5e-25).

      Correction: Saw unit/mole problem in RH concentration, corrected calculation. Recalculation of K3 is 30 per second.

      K4 (radical termination): Normal rates are 10^5 L/mol·s for recombination of peroxy radicals. K4 in the simulation must factor in vesicle volume. K4 is standard K divided by reactor volume, possibly incorporating Avogadro's number for units of single molecules.

      Determination of K4: 10^5 L/mol·s divided by vesicle volume (4/3 * pi * R³) and Avogadro's number, making unit conversions (L to m³).

      Attempt at calculation for K4: Student calculation correction. Recalculated K4 is 4e-5 per second.

      Determining maximum simulation time (T_max): Guessing 1000 seconds.

      Printing the calculated rates: K = [1e-5, 1000, 30, 4e-5].

      First concern with the rates: K2 (1000) is too fast, implying that radicals escape rapidly. The originally guessed K1 (1e-5) is extremely slow. This is an issue.

      Reassessing K1: K1 must agree with the rate of diffusion in, which must be comparable with the rate of diffusion out (~1000 per second), multiplied by the average concentration of radicals outside. If the average concentration inside/outside is comparable, K1 must be comparable with K2.

      K1 guessing: If average internal concentration is 1 radical, K1 must be ~1000. If average internal concentration is 10 radicals, K1 must be ~10000. Let's try K1 = 1000. K = [1000, 1000, 30, 4e-5].

      Initial attempt to execute Matlab code.

      Fixing code errors: (parentheses, saving file).

      Plotting results: (peroxides count vs. time). First plot appears weird (two points only).

      Looking at the trajectory data directly: Two points only were measured. Peroxide count jumps to 307, which is crazy for a single step increment. This points to a bug.

      Finding the bug: The step counter and path storage were outside the primary time loop, and they only executed once. Placed step update and storage within the loop.

      Second try at executing the code: It's executing now ("doing something").

      Fearing nested loops or endless loops: The step limit must be enforced in order not to flood memory.

      Advice to use: `break` when max steps is reached. By using a `while` loop condition of `(time < Tmax) & (step < max_steps)`.

      Resolving a possible bug: Using the `&&` operator in the while loop condition.

      Third try running the code: Too quick, says it completed instantly.

      Fourth try: The number of radicals plot vs. time looks better, with jumps up and down as desired. This path exhibits sampling from the stochastic process. The peroxide plot is still problematic.

      Simulation Result Analysis

      Must run numerous trajectories (e.g., 10,000) since each simulation is a sample from the probability distribution.

      Methods of Analyzing Several Trajectories:

      • Averaging trajectories: Adding together trajectories and dividing by the number of runs to obtain an average trajectory. Problem: Trajectories have different points in time, requiring a method of compounding them (e.g., interpolation or certain plot functions).
      • Histograms: Snapshots at one time point across all trajectories and a plot of the distribution of the number of radicals or peroxides.
      • Plotting figures: Such as the amount of time to achieve a given number of peroxides or standard deviation.
      • Challenge: Computing desired statistics such as mean and standard deviation from the sampled output.
      • Alternative approach: Solving the master equation as a system of ordinary differential equations (ODEs). This gives the probability distribution P(n_rad, n_ro, time) explicitly.
      • Data analysis issue: Even for ODE solutions, handling the high-dimensional probability distribution at various time points is crucial. People tend to plot the average number of species versus time (e.g., average n_ro). One should also look at the dispersion (e.g., n_rad squared average, standard deviation).
      • Reference: A homework exercise on kinetic Monte Carlo for catalysis, with an extension offer for homework due dates.
      • Conclusion: Summary of the lecture.