Measuring and correcting algorithmic bias in molecular dynamics averages Stephen Bond

advertisement
Measuring and correcting algorithmic bias in molecular
dynamics averages
Stephen Bond
University of Illinois Urbana-Champaign
Department of Computer Science
EPSRC Symposium Workshop on Molecular Dynamics
June 1-5, 2009
Stephen Bond
Measuring and correcting bias in MD
Collaborators
Nana Arizumi (Illinois)
Ben Leimkuhler (Edinburgh)
Brian Laird (Kansas)
Ruslan Davidchack (Leicester)
S. Bond and B. Leimkuhler Acta Numerica 16, 2007.
N. Arizumi and S. Bond, in preparation, 2009.
Stephen Bond
Measuring and correcting bias in MD
Motivation
Computation of averages
Instantaneous Temperature
1.7
1.6
1.5
1.4
1.3
0
2
4
6
8
Stephen Bond
10
time
12
14
16
18
Measuring and correcting bias in MD
20
Motivation
Convergence of averages
1.504
1.502
1.5
Temperature
1.498
1.496
1.494
1.492
1.49
1.488
1.486
2
10
3
10
Inverse Stepsize (1/dt)
Stephen Bond
Measuring and correcting bias in MD
4
10
Motivation
“While the induced temperature error is within one percent, the
resulting pressure is manyfold higher than the reference pressure, by a
factor of between 5 to 7 with a time step of 1 fs, and a factor of 14
with a time step of 2 fs.”
– M.A. Cuendet and W.F. van Gunsteren, J. Chem. Phys. 127, 184102 (2007)
Stephen Bond
Measuring and correcting bias in MD
Goal
What is the error in an average from a MD trajectory?
Error = |hAinumerical − hAiexact |
Estimate accounts for two factors:
Error ≤ Statistical Error + Truncation Error
Asymptotic Bound:
1
Error ≤ C1 √ + C2 ∆t p
t
Talk will focus on truncation error.
Poincaré hyperbolic: S. Reich, Backward error analysis for numerical integrators, ’99
Statistical error: E. Cancès, et al, Long-time averaging using symplectic ..., ’04, ’05.
Stephen Bond
Measuring and correcting bias in MD
System of Equations
Newton’s equations:
Force = Mass × acceleration
q̇ = p/m
and ṗ = −∇U(q)
q = position, m = mass, p = momenta
First order system
ż = F (z) ,
Exact solution map
where
F : Rn → Rn
z (t) = Φt (t0 , z0 )
Stephen Bond
Measuring and correcting bias in MD
Ergodic
Time average:
hAitime
1
= lim
t→∞ t
Ensemble average:
0
t
A (z (τ )) dτ
Z
hAiensemble =
Ergodicity
Z
Ω
A (z) ρ (z) dz
hAitime = hAiensemble
(a.e.)
Almost all trajectories are statistically the same.
Stephen Bond
Measuring and correcting bias in MD
Liouville Equation
Continuity equation for probability density:
∂ρ
+ ∇ · (ρ F ) = 0
∂t
or
∂ρ
+ F · ∇ρ + ρ ∇ · F = 0
∂t
In the case ρ > 0,
D ln ρ
= −∇ · F
Dt
For microcanonical ensemble
∇·F =0
⇒
Stephen Bond
ρ = C δ [H (z) − E ]
Measuring and correcting bias in MD
Example: Nosé-Hoover
Nosé-Hoover vector field
dq
dt
dp
dt
dξ
dt
= M −1 p
= −∇U (q) −
ξ
p
µ
= p T M −1 p − gkB T
Invariant distribution
1
1 T −1
ξ2
ρ ∝ exp −
p M p + U (q) +
kB T 2
2µ
Stephen Bond
Measuring and correcting bias in MD
Error Analysis
First order system
ż = F (z)
Forward error:
Is the numerical trajectory close to the exact trajectory?
kzn − z (tn ) k ≤ C ∆t p
Backward error:
Is the numerical trajectory interpolated by an exact trajectory, but for
a different problem?
kF̂∆t (z) − F (z) k ≤ C ∆t p
“Method of Modified Equations”
Stephen Bond
Measuring and correcting bias in MD
Error Analysis
Ergodicity:
Exact trajectories are sensitive (chaotic) to perturbations in the initial
conditions
→ Large Forward Error.
Statistics:
Thermodynamic properties (averages) are not a function of the
details of the initial conditions
→ Small Backward Error.
Stephen Bond
Measuring and correcting bias in MD
Symplectic Structure
In 1 dimension
Conservation of Area
dq ∧ dp = constant
Conservation
of “Oriented Area”
P
dqi ∧ dpi = constant
In n dimensions
Stephen Bond
Measuring and correcting bias in MD
Backward Error Analysis: Modified Equations
Given a pth-order numerical method, Ψh , we can always construct a
modified vector field, Fh , such that the numerical method provides a
r th-order approximation to the flow of the modified system .
If the numerical method and vector field are symplectic/Hamiltonian,
the modified vector field will be symplectic/Hamiltonian.
Stephen Bond
Measuring and correcting bias in MD
Backward Error Analysis: Modified Equations
Given a pth-order numerical method, Ψh , we can always construct a
modified vector field, Fh , such that the numerical method provides a
r th-order approximation to the flow of the modified system .
If the numerical method and vector field are symplectic/Hamiltonian,
the modified vector field will be symplectic/Hamiltonian.
Series is truncated at an optimal r ∗ , which increases as h → 0.
Use a low-order modified vector field when h is large?
Stephen Bond
Measuring and correcting bias in MD
Big Picture
Flow Map
↑
Vector Field
↓
Ensemble
Φt
↑
F
↓
ρ
Stephen Bond
≈ Ψ̂∆t
% ↓
≈ F̂∆t
↓
≈ ρ̂∆t
Measuring and correcting bias in MD
Example: Verlet
Hamiltonian
1
H (q, p) = p T M −1 p + U (q)
2
Verlet
∆t
∇U (q n )
2
n
= q + ∆tM −1 p n+1/2
∆t
= p n+1/2 −
∇U q n+1
2
p n+1/2 = p n −
q n+1
p n+1
Splitting
1
H1 = p T M −1 p,
2
Stephen Bond
H2 = U (q)
Measuring and correcting bias in MD
Example: Verlet
Strang Splitting
exp (∆tL) = exp
∆t
∆t
L2 exp (∆tL1 ) exp
L2 + O ∆t 3
2
2
L = L1 + L2
L1 = M −1 p · ∇q
L2 = −∇q U (q) · ∇p
Modified Equations
exp
[r ]
∆t L̂∆t
= exp
∆t
∆t
L2 exp (∆tL1 ) exp
L2 + O ∆t r +1
2
2
[r ]
Solve for L̂∆t using Baker-Campbell-Hausdorff formula
Stephen Bond
Measuring and correcting bias in MD
Example: Verlet
Original Hamiltonian:
1
H (q, p) = p T M −1 p + U (q)
2
Modified Hamiltonian:
∆t 2
H2,∆t (q, p) = H (q, p) +
12
1
p T M −1 U 00 M −1 p − ∇U T M −1 ∇U
2
Verlet conserves H2,∆t to 4th order accuracy!
Stephen Bond
Measuring and correcting bias in MD
Example: Verlet
Original Hamiltonian:
1
H (q, p) = p T M −1 p + U (q)
2
Modified Hamiltonian:
∆t 2
H2,∆t (q, p) = H (q, p) +
12
1
p T M −1 U 00 M −1 p − ∇U T M −1 ∇U
2
Verlet conserves H2,∆t to 4th order accuracy!
Practical Computation:
d2
d
U
(q)
=
∇U (q) · M −1 p
2
dt
dt
= p t M −1 U 00 (q) M −1 p − ∇U (q) · M −1 ∇U (q)
Stephen Bond
Measuring and correcting bias in MD
Correcting Microcanonical Averages
Hamiltonian + Symplectic integrator ⇒ Modified Hamiltonian
H(z) = E
H(z) = E
Numerical average is computed on Ĥ surface
What is the error from using the wrong surface?
Stephen Bond
Measuring and correcting bias in MD
Correcting Microcanonical Averages
H(z) = E
H(z) = E
Exact − Numerical ≈ hAiH=E − hAiĤ=Ê =
h
i
h
i
R
R
A (z) δ H (z) − E dz
A (z) δ Ĥ (z) − Ê dz
h
i
i
−− R h
R
δ H (z) − E dz
δ Ĥ (z) − Ê dz
Stephen Bond
Measuring and correcting bias in MD
Correcting Microcanonical Averages
Expand delta function
h
i
h
i h
i
0
δ H (z) = δ Ĥ (z) + H − Ĥ δ Ĥ (z) + · · ·
and use directional derivative
h
i
i
h
0
u · ∇z δ H (z) = δ H (z) u · ∇H
Corrected average
hAiexact =
where
hAinum + h∇ · (w A)inum
+ ···
h1inum + h∇ · w inum
w := Ĥ − H
Stephen Bond
u
u · ∇Ĥ
Measuring and correcting bias in MD
Example: Quartic Oscillator
−1
10
Standard
Reweighted
−2
10
−3
Err <p2>
10
−4
10
−5
10
−6
10
−7
10
0
1
10
10
1/dt
Stephen Bond
Measuring and correcting bias in MD
2
10
Example: Quartic Oscillator
−2
10
Standard
Reweighted
−3
10
−4
Err <q2>
10
−5
10
−6
10
−7
10
−8
10
0
1
10
10
1/dt
Stephen Bond
Measuring and correcting bias in MD
2
10
Correcting Microcanonical Averages
H(z) = E
H(z) = E
Alternative method:
hAiexact = hω A (T (z))inum
where T maps points on Ĥ to points on H.
Weighting factor, ω, accounts for distortion
Stephen Bond
Measuring and correcting bias in MD
Liouville Equation for Modified Vector Field
Modified Equations
d ẑ
= F̂∆t (ẑ)
dt
where F̂∆t = F + ∆t p G
Modified Liouville Equation
∂
ρ̂∆t + ∇ · ρ̂∆t F̂∆t = 0
∂t
Weighting factor
ω := ρ/ρ̂∆t ,
implies
assuming
ρ, ρ̂∆t > 0
D
ln (ω) = ∆t p (∇ · G + G · ∇ ln ρ)
Dt
Stephen Bond
Measuring and correcting bias in MD
Averages
Truncation Error Estimate
Z
hAinum − hAiexact ≈
≈
Z
Γ
A (q, p) ρ∆t dΓ −
Γ
A (q, p) ρ dΓ
hAinum hωinum − hA ωinum
hωinum
Reweighted Averages
hAiexact =
hA ωinum
+ O [∆t r ]
hωinum
Stephen Bond
Measuring and correcting bias in MD
Example:
Nosé-Poincaré Hamiltonian:
1 T −1
πs2
H (q, p̃, s, πs ) = s
p̃ M p̃ + U (q) +
+ g k T ln s − E0
2 s2
2µ
Nosé-Poincaré Modified Hamiltonian:
πs T −1
∆t 2
Ĥ∆t = HNP +
s
p̃ M ∇U
12
µs
1
1
−
∇U T M −1 ∇U + 2 p̃ T M −1 U 00 M −1 p̃
2
s
!
2
1
1 T −1
2 g k T πs2
−
p̃ M p̃ − g k T
+
2 µ s2
µ2
Stephen Bond
Measuring and correcting bias in MD
Example:
Modified marginal distribution:
ZZ
1
ρ̄∆t (q, p) dp dq =
δ Ĥ∆t (q, s, p̃, ps ) − Ê0 dp̃ dq dps ds,
C s ps
ZZ 1
0
δ s HN − HN
+ ∆t 2 G
dp̃ dq dps ds.
=
C s ps
Change of variables, integrating
−1
Z
1
Nf η0 2 ∂
η
ρ̄ =
G
(q,
e
e
gk
T
+
h
,
p,
p
)
dps .
s
B
C ps
∂η
η=η0
ps2
−1
0
+ h2 G (q, eη0 , p, ps ) − HN
,
H(q, p) +
η0 =
g kB T
2µ
More mathematical manipulations
(
"
!2 #)
2
2
ρc
∆t 2 X 2pj pk Uqj qk X Uqj 1 X pj
ρ̄ =
exp −
−
−
−gkB T
,
24kB T
mj mk
mj µ
mj
C̄
j
j,k
Stephen Bond
j
Measuring and correcting bias in MD
Example:
Weighting Factor:
−∆t 2 h T −1 00
ω ≈ exp
2p M U (q) M −1 p
24 kB T
2 1 T −1
T
−1
p M p − g kB T
−∇U (q) M ∇U (q) −
µ
Reweighted Averages:
hAiexact ≈
hA ωinum
hωiNum
Hybrid Monte Carlo:
J. Izaguirre and S. Hampton, J. Comput. Phys. 200, 2004.
E. Akhmatskaya and S. Reich, LNCSE 49, 2006.
Time correlation functions:
R. D. Skeel, SIAM J. Sci. Comput. 31, 2009.
Stephen Bond
Measuring and correcting bias in MD
Numerical Experiment:
System:
256 Particle Gas
Lennard-Jones Potential
T = 1.5/k, ρ = 0.95r03 , t = 20r0
p
m/
Method:
Nosé-Poincaré (Symplectic, Time-Reversible)
p
p
∆t = 0.012r0 m/ to 0.0001r0 m/
Reference:
Dettmann and Morriss, Phys. Rev. E 55 1997
Bond, Laird, and Leimkuhler J. Comput. Phys. 151 1999.
S. Bond and B. Leimkuhler Acta Numerica 16, 2007.
Stephen Bond
Measuring and correcting bias in MD
Numerical Experiment:
“Extended” Energy Conservation:
Stephen Bond
Measuring and correcting bias in MD
Numerical Experiment:
Improved Estimator
1.51
Standard
Reweighted
1.505
Temperature
1.5
1.495
1.49
1.485
1.48
2
3
10
10
Inverse Stepsize (1/dt)
Stephen Bond
Measuring and correcting bias in MD
Numerical Experiment:
Improved Estimator Error
−1
10
Standard
2nd Order Reference
Reweighted
4th Order Reference
−2
Error in Temperature
10
−3
10
−4
10
−5
10
−6
10
−7
10
2
10
10
Inverse Stepsize (1/dt)
Stephen Bond
Measuring and correcting bias in MD
3
Final Thoughts:
Numerical stability of pressure measurement
In general, when can we correct for numerical bias?
Is the error in the dynamics or the observation?
Stephen Bond
Measuring and correcting bias in MD
Final Thoughts:
Numerical stability of pressure measurement
In general, when can we correct for numerical bias?
Is the error in the dynamics or the observation?
Ruslan Davidchack, Warwick Capstone Minisymposium (July 1, 2009)
Stephen Bond
Measuring and correcting bias in MD
Goal-Oriented Error Estimation and Multilevel
Preconditioning for the Poisson-Boltzmann Equation
Stephen Bond
University of Illinois at Urbana Champaign
Department of Computer Science
June 1-5, 2009
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
1 / 33
Acknowledgements
Eric Cyr (Illinois / Sandia)
Michael Holst (UCSD)
Andrew McCammon (UCSD)
Burak Aksoylu (LSU)
Nathan Baker (Wash U)
Kaihsu Tai (Oxford)
Hugh MacMillan (Clemson)
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
2 / 33
Motivation
Green Mamba: Fasciculin 2
Neuromuscular Junction
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
3 / 33
Motivation
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
4 / 33
Outline
1
Motivation: Poisson-Boltzmann Equation
2
Formulation
PDE
Solvation Free Energy
Born Ion
3
Discretization
4
Adaptive Refinement
Error Indicators
Marking Strategy
Results
5
Final Thoughts
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
5 / 33
Motivation
Proteins naturally occur in solution
⇒ Must model them in solution
Two options for modeling solute-solvent electrostatic interactions
1
2
Explicit: Solvent molecules explicitly
represented
Implicit: “Average” effect of solvent is
computed
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
6 / 33
Motivation
Proteins naturally occur in solution
⇒ Must model them in solution
Two options for modeling solute-solvent electrostatic interactions
1
2
Explicit: Solvent molecules explicitly
represented
Implicit: “Average” effect of solvent is
computed
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
6 / 33
Motivation
Want to compute electrostatic Solvation Free Energy:
Total Solvation Free Energy
G = Ws − Wc + Gnp
Electrostatic Solvation Free Energy
W
c
←−−


Gy
S = Ws − Wc

G
y np
←−−
Ws
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
7 / 33
Outline
1
Motivation: Poisson-Boltzmann Equation
2
Formulation
PDE
Solvation Free Energy
Born Ion
3
Discretization
4
Adaptive Refinement
Error Indicators
Marking Strategy
Results
5
Final Thoughts
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
8 / 33
Formulation
Poisson-Boltzmann Equation (PBE): Nonlinear PDE to compute
electrostatics of protein in solution
3D infinite domain: Ω
2 Subdomains:
Solvent
Ωs
Solute: Ωm
Solvent: Ωs
Interface: Γ
_
_
_
+
+
+
_
_
+
+
_
_
+
_
+
Ions
_
+
_
+
+
+
_
+
+
_
+
_
+
_
_
Solute
(Explicit Charges)
Ωm
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
9 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x) sinh (φ(x)) = 4πρf (x)
φ(x) = 0
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for
x ∈ Ωm ∪ Ωs ,
for x = ∞,
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x) sinh (φ(x)) = 4πρf (x)
φ(x) = 0
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for
x ∈ Ωm ∪ Ωs ,
for x = ∞,
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x) sinh (φ(x)) = 4πρf (x)
for
x ∈ Ωm ∪ Ωs ,
φ(x) = g (x)
for
x ∈ ∂Ω,
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x) sinh (φ(x)) = 4πρf (x)
for
x ∈ Ωm ∪ Ωs ,
φ(x) = g (x)
for
x ∈ ∂Ω,
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x)φ(x) = 4πρf (x)
for
x ∈ Ωm ∪ Ωs ,
φ(x) = g (x)
for
x ∈ ∂Ω,
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: PDE
Poisson-Boltzmann Equation (PBE) for electrostatic potential
−∇ · (x)∇φ(x) + κ̄2 (x)φ(x) = 4πρf (x)
for
x ∈ Ωm ∪ Ωs ,
φ(x) = g (x)
for
x ∈ ∂Ω,
[(x)∇φ(x) · n] = 0
Note: and κ̄ are discontinuous at interface
Simplifications:
for x ∈ Γ.
PBE Domain
Infinite domain assumed to be finite
Linearized PBE (LPBE) assumes
φ ≈ sinh(φ)
Challenge:
ρf : point charges at solute atom
locations cause singularities in φ
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
10 / 33
Formulation: What Challenge?
Source term: ρf (x) =
PP
i
qi δ(x − xi )
Coulomb’s law for single charge is (m is dielectric in vacuum)
−m ∇2 G (x) = 4πδ(x)
⇒
G (x) =
1
m |x|
Consider PBE in molecular subdomain Ωm (i.e. κ̄2 (x) = 0)
−m ∇2 φ(x) = 4πρf (x)
Up to Ker(∇2 ), φ is given by Coulomb’s law
Standard piecewise linear FE basis does not converge to 1/|x|
singularities
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
11 / 33
Formulation: Regularized PBE
Will remove singularities from electrostatic potential analytically
Use analytical form of Coulomb potential G (x), satisfying
−m ∇2 G (x) = 4πρf (x)
G (∞) = 0
Define u = φ − G , u called Reaction Potential
Substitute φ = u + G into PBE, solve for u gives Regularized PBE
(RPBE)
)
−∇ · (x)∇u(x) + κ̄2 (x)u(x)
= ∇ · ((x) − m )∇G − κ̄2 (x)G (x)
for
x ∈ Ωm ∪ Ωs ,
u(x) = g (x) − G (x)
for
x ∈ ∂Ω,
[(x)∇u(x) · n] = (m − s )∇G (x) · n
for
x ∈ Γ.
Goto weak form
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
12 / 33
Formulation: Solvation Free Energy
Recall, goal is to compute Solvation Free Energy: S = Ws − Wc
u =φ−G
←
−
S is a linear functional of u
Z
1
u(x)ρf (x) dx
S(u) =
2
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE


y


y
←
−
June 1-5, 2009
13 / 33
Formulation: Born ion example
Born ion is single ion in center of sphere: analytical solution known
⇒ Sphere radius= 2Å, m = 1, s = 78, κ̄2 = 0
Γ
+
2A
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
14 / 33
Outline
1
Motivation: Poisson-Boltzmann Equation
2
Formulation
PDE
Solvation Free Energy
Born Ion
3
Discretization
4
Adaptive Refinement
Error Indicators
Marking Strategy
Results
5
Final Thoughts
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
15 / 33
Discretization
Discretization concerns
Complex geometry of molecule ⇒ Use Finite Elements
Problem: Need mesh matching molecular surface
Use GAMer (Geometry preserving Adaptive MeshER) from Holst group
∗
∗
Z. Yu, M. Holst, Y. Cheng, and J.A. McCammon,
J. Mol. Graphics, 2008.
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
16 / 33
Discretization
Use finite elements to solve linear RPBE
Primal problem is
where
Z
a(u, v ) =
L(v ) =
ZΩ
Ω
a(u, v ) = L(v )
∀v ∈ V
(x)∇u(x) · ∇v (x) + κ̄2 (x)u(x)v (x) dx
−((x) − m )∇G (x) · ∇v (x) − κ̄2 G (x)v (x) dx.
Want to compute solvation free energy: S(u)
Initial mesh not good enough for accurate solvation free energy
Use Adaptive Mesh Refinement to improve accuracy
see RPBE
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
17 / 33
Outline
1
Motivation: Poisson-Boltzmann Equation
2
Formulation
PDE
Solvation Free Energy
Born Ion
3
Discretization
4
Adaptive Refinement
Error Indicators
Marking Strategy
Results
5
Final Thoughts
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
18 / 33
Adaptive Mesh Refinement
Adaptive Mesh Refinement (AMR) Algorithm
SOLVE −→ ESTIMATE −→ MARK −→ REFINE
SOLVE: Solve Regularized LPBE
ESTIMATE: Construct elementwise error estimates
MARK: Select elements with “large” error for refinement
REFINE: Subdivide selected elements into smaller simplices
−→
Stephen Bond (Illinois Computer Science)
−→
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
19 / 33
Adaptive Mesh Refinement
Adaptive Mesh Refinement (AMR) Algorithm
SOLVE −→ ESTIMATE −→ MARK −→ REFINE
SOLVE: Solve Regularized LPBE
ESTIMATE: Construct elementwise error estimates
MARK: Select elements with “large” error for refinement
REFINE: Subdivide selected elements into smaller simplices
I will focus on ESTIMATE and MARK
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
19 / 33
AMR - ESTIMATE
From approximate solution u h calculate error
1
2
Easily computed
Bounds the error
What error should be bounded?
How to compute error in u h ?
Relate weak residual to error
R(v ) = L(v ) − a(u h , v )
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
∀v ∈ V
June 1-5, 2009
20 / 33
AMR - ESTIMATE: Energy-based
Measure error in energy-norm (|||g |||2 = a(g , g ))
2
h u − u ≤ C
X
!
2
ηK
(u h )
K
Indicator is
1
2
2
ηK
(u h ) = hK
krK k2L2 (K ) + h∂K kr∂K k2L2 (∂K )
4
where
rK (x) = (∇ · ((x) − m )∇G (x) − κ̄2 (x)G (x)) − (−∇ · (x)∇u h (x) + κ̄2 (x)u h (x))
r∂K (x) = nK · ((x) − m )∇G (x) + (x)∇u h (x) n
K
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
21 / 33
AMR - ESTIMATE: Energy-based
Elementwise error in solution of RPBE for Born ion
X Indicator shows correct error distribution
× Scaling of indicator is wrong
× No explicit knowledge of Solvation Free Energy
Exact Error
Stephen Bond (Illinois Computer Science)
Numerical Indicator
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
22 / 33
AMR - ESTIMATE: Goal-oriented
Want to find error in solvation free energy: S(u − u h )
By Riesz Representation there exits a w such that
R(w ) = a(u − u h , w ) = S(u − u h )
Given w , error in S(u h ) can be computed
To find w , solve the Dual problem
a(v , w ) = S(v ) ∀v ∈ V
In practice, w is approximated by FE solution
Indicators bound error in functional
h
h
|S(u − u )| = |a(u − u , w )| ≤ C
X
ηK (u h , w h )
K
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
23 / 33
AMR - ESTIMATE: Goal-oriented
Algorithm: Goal-Oriented Refinement
1
Solve primal problem for u h
2
Solve dual problem for w h
3
Compute error indicator
|S(u − u h )| = |a(u − u h , w )| ≤
X
ηK (u h , w h )
K
where K is an element
4
Refine elements where ηK (u h , w h ) is “large”
5
Repeat
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
24 / 33
AMR - ESTIMATE: Goal-oriented
Two options for computing ηK
1 Solve dual problem using quadratic basis functions: w ≈ w h,2
|S(u − u h )| = |L(w h,2 ) − a(u h , w h,2 )| ≤
X
ηK (u h , w h,2 )
K
where
Z ηK (u h , w h,2 ) = ( − m )∇G (x)∇w h,2 (x) + κ̄2 (x)G (x)w h,2 (x)
K
h
h,2
2
h
h,2
+ (x)∇u (x) · ∇w (x) + κ̄ (x)u (x)w (x) dx
2
Solve dual problem using linear basis functions
|S(u − u h )| =
X1
K
1
k(u − u h ) + (w − w h )k2K − k(u − u h ) − (w − w h )k2K
4
4
where u − u h and w − w h are approximated using element residual
method
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
25 / 33
AMR - MARK
MARK: Select elements with “large” error for refinement
Choice of marking greatly effects quality of refinement
For a triangulation T = T m ∪ T s : two marking strategies
1 Global Marking: For γ ∈ (0, 1)
Mark all K ∈ T such that
2
ηK > γ max ηT
T ∈T
Split Marking: For γ ∈ (0, 1)
Mark all
Stephen Bond (Illinois Computer Science)
K ∈Ts
K ∈Tm
(
such that
Goal-Oriented Adaptivity for the PBE
ηK > γ maxs ηT
T ∈T
ηK > γ maxm ηT
T ∈T
June 1-5, 2009
26 / 33
Implicit Solvent Results
Fasciculin-1
Compute solvation free energy
“Exact” solution from uniform
refinement
Meshes from GAMer (Holst Group)
Goal-oriented vs. energy-based
refinement
921 Atoms
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
27 / 33
Implicit Solvent Results
Energy-based
Split
Goal-oriented
Error Indicator
Global
Marking Strategy
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
28 / 33
Implicit Solvent Results
Relative Error in Solvation Free Energy of Fasciculin-1
Take Home: Goal-oriented mesh refinement can achieve greater accuracy
with fewer degrees of freedom
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
29 / 33
Multilevel Preconditioning: Multigrid
Form a coarse problem: Ai−1 = Pit Ai Pi
Smooth: Ai ui ≈ fi ,
ri = fi − Ai ui
Restrict: fi−1 = Pit ri
Solve: Ai−1 ui−1 = fi−1
Prolong: ui = ui + Pi ui−1
Smooth: Ai ui ≈ fi
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
30 / 33
Electrostatics: Hierarchical Basis and BPX
B. Aksoylu, S. Bond, M. Holst, SIAM J. Sci. Comput. (2003)
Introduce a change of basis
Only smooth on the “new” mesh points
Hierarchical Basis (Bank, Dupont, Yserentant)
Recursively defined locally supported basis functions
BPX (Bramble, Pasciak, Xu)
Equivalent to smoothing on the “one-ring”
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
31 / 33
Outline
1
Motivation: Poisson-Boltzmann Equation
2
Formulation
PDE
Solvation Free Energy
Born Ion
3
Discretization
4
Adaptive Refinement
Error Indicators
Marking Strategy
Results
5
Final Thoughts
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
32 / 33
Final Thoughts
1
Poisson-Boltzmann equation models electrostatic effects of implicit
solvent
2
Can develop error indicators using weak residual
3
Goal-oriented refinement requires the solution of dual problem
4
Solvation free energy accurately calculated using goal-oriented
refinement
5
Appropriate marking strategy must be used
6
Multilevel preconditioning challenging with adaptively refined meshes
Stephen Bond (Illinois Computer Science)
Goal-Oriented Adaptivity for the PBE
June 1-5, 2009
33 / 33
References
S.D. Bond and B.J. Leimkuhler, ‘Molecular Dynamics and the Accuracy of Numerically
Computed Averages,’ Acta Numerica, 16 (2007) 1.
B. Aksoylu, S.D. Bond, E.C. Cyr, and M. Holst, Adaptive Solution of the PBE using
Goal-Oriented Error Indicators. Preprint (2009)
S.D. Bond, J.H. Chaudhry, E.C. Cyr and L.N. Olson, ‘A First Order Least Squares Finite
Element Method for the PBE,’ J. Comput. Chem., submitted (2009).
Y. Cheng, J.K. Suen, Z. Radić, S.D. Bond, M.J. Holst and J.A. McCammon, ‘Continuum
Simulations of ACh Diffusion with Reaction-determined Boundaries in Neuromuscular Junction
Models,’ Biophys. Chem., 127 (2007) 129.
Y. Cheng, J.K. Suen, D. Zhang, S.D. Bond, Y. Zhang, Y. Song, N. Baker, C.L. Bajaj, M. Holst
and J.A. McCammon, ‘Finite Element Analysis of the Time-Dependent Smoluchowski Equation
for ACh Reaction Rate Calculations,’ Biophys. J., 92 (2007) 3397.
Stephen Bond (Illinois Computer Science)
References
June 1-5, 2009
1/5
References
B. Lu, Y.C. Zhou, G.A. Huber, S.D. Bond, M.J. Holst and J.A. McCammon, ‘Electrodiffusion:
A continuum modeling framework for biomolecular systems with realistic spatiotemporal
resolution’ J. Chem. Phys., 127 (2007) 135102.
K. Tai, S.D. Bond, H.R. MacMillan, N.A. Baker, M.J. Holst and J.A. McCammon, ‘Finite
Element simulations of ACh diffusion in Neuromuscular Junctions,’ Biophys. J., 84 (2003) 2234.
B. Aksoylu, S. Bond and M. Holst, ‘Local refinement and multilevel preconditioning III:
Implementation and Numerical Experiments,’ SIAM J. Sci. Comput., 25 (2003) 478.
S.D. Bond, B.J. Leimkuhler and B.B. Laird, ‘The Nosé-Poincaré Method for Constant
Temperature MD,’ J. Comput. Phys., 151 (1999) 114.
Stephen Bond (Illinois Computer Science)
References
June 1-5, 2009
2/5
Download