Stochastic Modeling of Chemical Reactionstwccc.che.wisc.edu/new/haseltine.pdf · 2001-12-17 ·...
Transcript of Stochastic Modeling of Chemical Reactionstwccc.che.wisc.edu/new/haseltine.pdf · 2001-12-17 ·...
Stochastic Modeling of Chemical Reactions
Eric HaseltineDepartment of Chemical Engineering
University of Wisconsin-Madison
TWMCC
27 September 20012TWMCC ? Texas-Wisconsin Modeling and Control Consortium 11
Outline
• Why stochastic chemical kinetics?
• Stochastic simulation
• Handling reactions with different time scales
• Examples
1. Simple motivating example2. Hepatitis B infection3. Particle engineering
• Conclusions
• So what can you do with these tools?
TWMCC—27 September 2001 2
Why stochastic chemical kinetics?
• Stochastic kinetic models treatreactions as molecular events
• Consider the well-mixed reaction:
A+ Bk1zk−1CAoBo
Co
=10
500
molecules
• Scale probabilities by reaction rates– r1 = k1AB– r2 = k−1C– rtot = r1 + r2
• We randomly select:
1. When the next reaction occurs
τ = −log(p1)rtot
2. Which reaction occurs
10
p2
r1rtot
r2rtot
TWMCC—27 September 2001 3
Stochastic Simulation
One simulation Average of many simulations
0
0.2
0.4
0.6
0.8
1
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Exte
nt
Time
DeterministicStochastic
0
0.02
0.04 0
0.5
10
0.2
0.4
0.6
0.8
1
ExtentTime
Pro
babili
ty
TWMCC—27 September 2001 4
Connection to Deterministic Kinetics (Ω = System Size)
Ω Ω × 10
0
0.2
0.4
0.6
0.8
1
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Ext
ent
Time
DeterministicStochastic
0
0.2
0.4
0.6
0.8
1
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Ext
ent
Time
DeterministicStochastic
Ω × 100
0
0.2
0.4
0.6
0.8
1
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Ext
ent
Time
DeterministicStochastic
As Ω increases:Stochastic → Deterministic
Computing burden increases!
TWMCC—27 September 2001 5
What can be done when reactions occur over drasticallydifferent time scales?
0.1
1
10
100
1000
10000
0 50 100 150 200
Nu
mb
er
of
Mo
lecu
les
Time (Days)
cccDNArcDNA
Envelope
Make a stochastic approximation...
1. Partition the reactions into twosubsets:
• a fast reaction subset• a slow reaction subset
2. Fast reactions
• ODE approximation• Eliminates fluctuations
3. Slow reactions
• Time-varying reaction rates• Exact solution or approximate
solution?
TWMCC—27 September 2001 6
Solution Techniques
to
rtot
τt+τ Time
• Exact solution
∫ t+τt
rtot(t′)dt′ + log(p1) = 0
May be computationally expensiveto solve!
to
τapp
rtot
τt+τ Time
• Approximate solution
– Artificially introduce a probabilityof no reaction, a0dt
– Let τ ≈ − log(p1)rtot
– As a0 →∞, this simulationmethod becomes exact
TWMCC—27 September 2001 7
A Simple Example
Reaction System
2Ak1-→ B, ε1
A+ C k2-→ D, ε2
k1 = k2 = 1E-7A0
B0
C0
D0
=
1E+60
100
• Approximate ε1 deterministically
• Reconstruct the mean and standarddeviation with 10,000 simulations
• Stochastic simulation CPU time:∼ 8 sec per simulation
• Hybrid simulation CPU time:∼ 0.6 sec per simulation
TWMCC—27 September 2001 8
Exact Stochastic-Deterministic Results
0
200000
400000
600000
800000
1e+06
0 10 20 30 40 50 60 70 80 90 100
Num
ber
of M
olec
ules
Time
Mean for A and B
Stochastic AExact A
Stochastic BExact B
0.01
0.1
1
10
100
1000
0 10 20 30 40 50 60 70 80 90 100
Num
ber
of M
olec
ules
Time
Standard Deviation for A and B
Stochastic AExact A
Stochastic BExact B
0123456789
1011
0 10 20 30 40 50 60 70 80 90 100
Num
ber
of M
olec
ules
Time
C
Stochastic MeanStochastic +/-1 SD
Exact MeanExact +/-1 SD
0
2
4
6
8
10
0 20 40 60 80 100
Num
ber
of M
olec
ules
Time
D
Stochastic MeanStochastic +/-1 SD
Exact MeanExact +/-1 SD
TWMCC—27 September 2001 9
Approximate Stochastic-Deterministic Results, a0 = 4E-2
0
200000
400000
600000
800000
1e+06
0 10 20 30 40 50 60 70 80 90 100
Num
ber
of M
olec
ules
Time
Mean for A and B
Stochastic AExact A
Stochastic BExact B
0.01
0.1
1
10
100
1000
0 10 20 30 40 50 60 70 80 90 100
Num
ber
of M
olec
ules
Standard Deviation for A and B
Stochastic AExact A
Stochastic BExact B
0
2
4
6
8
10
0 20 40 60 80 100
Num
ber
of M
olec
ules
C
Stochastic MeanStochastic +/-1 SD
Exact MeanExact +/-1 SD
0
2
4
6
8
10
0 20 40 60 80 100
Num
ber
of M
olec
ules
D
Stochastic MeanStochastic +/-1 SD
Exact MeanExact +/-1 SD
TWMCC—27 September 2001 10
Squared Error Trends
Error in Mean Error in Standard Deviation
0.1
1
10
0.01 0.1 1 10
Squ
ared
Err
or
a0
Approximate CExact C
0.01
0.1
1
10
0.01 0.1 1 10S
quar
ed E
rror
a0
Approximate CExact C
TWMCC—27 September 2001 11
Hepatitis B Infection
• Consider the infection of a cell by a virus
• System model:
nucleotidescccDNA-→ rcDNA (1)
nucleotides + rcDNA -→ cccDNA (2)
nucleotides + amino acidscccDNA-→ envelope (3)
cccDNA -→ degraded (4)
envelope -→ secreted (5)
rcDNA + envelope -→ virus (6)
• Assume:
1. nucleotides and amino acids areavailable at constant concentrations
2. cccDNA catalyzes reactions (1) and (3)
TWMCC—27 September 2001 12
Hepatitis B Infection
• Reduced state
· x =
cccDNArcDNA
envelope
=ABC
· xo =
100
· After ∼ 200 days:
xss =
20200
10000
• System reaction channels H:
H(x) =
k1Ak2Bk3Ak4Ak5Ck6BC
,
k1
k2
k3
k4
k5
k6
=
10.02510000.25
1.99857.5E-6
day−1
• When A>0 and C>100, reactions(3) and (5) dominate. Partition thesystem accordingly.
TWMCC—27 September 2001 13
cccDNA Comparisons
ApproximateStochastic Results Stochastic-Deterministic Results
Average of 1000 Simulations Average of 1000 Simulations
TWMCC—27 September 2001 14
cccDNA Comparisons
Prob(cccDNA = 0,t) Prob(cccDNA,t = 199 days)
0 50 100 150 2000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Time (Days)
Pro
babili
ty
StochasticApproximate
0 10 20 30 400
0.05
0.1
0.15
0.2
0.25
cccDNA Molecules
Pro
babili
ty
StochasticApproximate
TWMCC—27 September 2001 15
rcDNA Comparisons
Comparison of theComparison of the Mean Standard Deviation
0 50 100 150 2000
50
100
150
200
250
rcD
NA
Mole
cule
s
Time (Days)
StochasticApproximationODE
0 50 100 150 2000
20
40
60
80
100
120
rcD
NA
Mole
cule
s
Time (Days)
StochasticApproximation
An ODE model gets the mean wrong!
TWMCC—27 September 2001 16
Envelope Comparisons
Comparison of theComparison of the Mean Standard Deviation
0 50 100 150 2000
2000
4000
6000
8000
10000
12000
14000
Time (Days)
Envelo
pe M
ole
cule
s
StochasticApproximationODE
0 50 100 150 2000
1000
2000
3000
4000
5000
6000
Envelo
pe M
ole
cule
s
Time (Days)
StochasticApproximation
TWMCC—27 September 2001 17
Why the deterministic solution is wrong...
Typical Infection Aborted Infection
0.1
1
10
100
1000
10000
0 50 100 150 200
Num
ber
of M
ole
cule
s
Time (Days)
cccDNArcDNA
Envelope
0.1
1
10
100
1000
0 1 2 3 4 5
Num
ber
of M
ole
cule
s
Time (Days)
cccDNArcDNA
Envelope
The deterministic model cannot express both cases.
TWMCC—27 September 2001 18
Particle Engineering
• Size-independent nucleation and growth
– Empirical deterministic formulation– Stochastic formulation– Examples
• Size-independentnucleation, growth and agglomeration
TWMCC—27 September 2001 19
more
more
more
more
more
more
more
TWMCC—27 September 2001 20
Empirical Deterministic Formulation
Population Balance
∂f(L, t)∂t
= −G∂f(L, t)∂L
in which f(L, t) is the number of crystals of size L and G is the crystal growth rate.
Mass and Energy Balances
dCdt
= −3ρckvhG∫∞
0fL2dL ρVCp
dTdt
= −3∆HcρckvVG∫∞
0fL2dL−UA(T − Tj(t))
Nucleation and growth in the bulk
B = kb(C − Csat(T)Csat(T)
)b= kbSb G = kg
(C − Csat(T)Csat(T)
)g= kgSg
TWMCC—27 September 2001 21
Stochastic Formulation
Reaction Mechanism for Nucleation and Growth
2M kn-→ Nl1 ∆Hnrxn
Nln +Mkg-→ Nln+1 ∆Hg
rxn
Nln is the number of crystals of size ln per volume.
Mass Balance Energy Balance
Mtot = Msat +M dTdt =
UAρCpV (Tj − T)
(between reaction events)
Solubility Relationship
log10Msat = a log10 T +bT+ c
TWMCC—27 September 2001 22
Isothermal, Size-Independent Nucleation and Growth
Stochastic Solution Deterministic SolutionAverage of 100 Simulations Via Orthogonal Collocation
Discrete particle sizes Continuous particle sizesInteger-valued particle accounting Real-valued particle accounting
TWMCC—27 September 2001 23
Nonisothermal, Size-Independent Nucleation and Growth
Stochastic Solution Deterministic SolutionAverage of 500 Simulations Via Orthogonal Collocation
TWMCC—27 September 2001 24
Isothermal, Size-Independent Nucleation, Growth, andAgglomeration
Stochastic Solution Deterministic Solution
Add one reaction: Nlp +Nlqka-→ Nlp+q Via Adaptive Mesh Methods?
Average of 500 Simulations Large time investment!
TWMCC—27 September 2001 25
Conclusions
Stochastic models are important when:
1. Fluctuations in the numbers of particles are important
2. In regions where multiple steady states are possible
3. Solution or formulation of the deterministic problem is difficult
Our advances to the current technology:
1. New modeling approximation for handling reactions occurring overdifferent time scales
2. Application of modeling techniques
TWMCC—27 September 2001 26
So what can you do with these tools?
• Wide array of possible applications
– Biotechnology– Particle engineering
• Bridging the gap from the microscopic to the macroscopic
– Engineering at interfaces– Modeling site interactions on catalysts– Nanomaterials
• Further insight into the estimation problem
– Better understanding of:1. State estimation for fluctuating systems2. Chemical reaction models
– Other approaches for computing conditional densities of nonlineardynamical systems
TWMCC—27 September 2001 27