IMA Summer Program Classical and Quantum Approaches in Molecular Modeling Lecture 5: Molecular Sampling Robert D. Skeel Department of Computer Science, and of Mathematics Purdue University http://bionum.cs.purdue.edu/2007July24.pdf Acknowledgment: NIH
32
Embed
IMA Summer Program Classical and Quantum Approaches in ... · IMA Summer Program Classical and Quantum Approaches in Molecular Modeling Lecture 5: Molecular Sampling Robert D. Skeel
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IMA Summer Program
Classical and Quantum Approachesin Molecular Modeling
Lecture 5: Molecular Sampling
Robert D. SkeelDepartment of Computer Science, and of Mathematics
Purdue University
http://bionum.cs.purdue.edu/2007July24.pdf
Acknowledgment: NIH
SamplingCreate a stochastic (or deterministic!) ergodic Markov chain togenerate x1, x2, . . . , xn, . . . having the desired distribution.
• Monte Carlo methods are unbiased in the limit Ntrials→∞but waste information.
• Molecular dynamics with extended Hamiltonians and/orstochastic terms has a bias due to finite ∆t.
Sampling can be accelerated by techniques such as replicaexchange and multicanonical/Wang-Landau sampling.
2
Canonical ensembleLet β = 1/kBT .The probability density function factors as
const e−βpTM−1p/2 · ρ(x) where ρ(x) = const e−βU(x).
The constant in ρ(x) is unknown.
3
Outline
I. Markov chain Monte Carlo methods
II. Hybrid Monte Carlo methods
III. Molecular dynamics
IV. Replica exchange method
V. Multicanonical/Wang-Landau sampling
VI. Practicalities
4
A simple Markov chain Monte Carlo methodGiven x, one step is as follows:
Pick an atom i at random.Generate i.i.d. values ∆x, ∆y, ∆z uniform on [−1
2∆, 12∆]x′ = x with [∆x,∆y,∆z]T added to ~riAccept x′ with probability
min {1, ρ(x′)/ρ(x)}—Metropolis acceptance criterion.
Otherwise, choose x as the new value.Note. A rejected move counts as a step in the chain.
These trial moves have symmetric conditional p.d.f.:ρt(x|x′) = ρt(x′|x).
5
MCMC ConvergenceEach configuration xn of the Markov chain has a density ρn(x).Only in the limit n→∞ might ρn(x)→ ρ(x): convergence.
To get a 50% acceptance rate, we need〈∆H〉 = 0.9099 kBT ,
which implies∆t ∝ N−1/2p
12
Outline
I. Markov chain Monte Carlo methods
II. Hybrid Monte Carlo methods
III. Molecular dynamics
IV. Replica exchange method
V. Multicanonical/Wang-Landau sampling
VI. Practicalities
13
Deterministic MDInstantaneous temperature T (p) = pTM−1p/kBNd
where Nd = number of DOFs.Nose-Hoover augments Newton’s equations with a thermostat:
ddtx = M−1p,
ddtp = −∇U(x)−ps
Qp,
ddtps = NdkB(T (p)− T ).
where Q = thermal inertia.If T (p) > T , the value of ps will increase,
and eventually ps will be positive,causing p—and T (p)—to decrease.
(And the opposite happens if T (p) < T .)
14
Nose-Hoover generates canonical ensemble via
〈A(x, p)〉 = limt→∞
1t
∫ t
0
A(x(t), p(t)) dt.
It is not Hamiltonian but has a conserved quantity
12pTM−1p+ U(x) +
12Q
p2s +NdkBT ln s
whereddts =
1Qpss.
Drift in this “extended energy” may be excessive, however.
15
Nose-PoincareIt is defined by the extended Hamiltonian H(x, s, p, ps) =
s
(12s−2pTM−1p+ U(x) +
12Q
p2s +NdkBT ln s− E
)where E is chosen to make H initially zero.
〈A〉 = limt→∞
1t
∫ t
0
A(x(t′), s(t′)−1p(t′)) dt′.
16
Stochastic MDRecall Langevin dynamics
Md
dt2x = F (x)− CM d
dtx+ (2kBTCM)1/2
ddtW (t)
where
C is a diagonal matrix of damping constants, e.g., 5 ps−1, and
W (t) is a set of 3N independent canonical Wiener processes.
17
Outline
I. Markov chain Monte Carlo methods
II. Hybrid Monte Carlo methods
III. Molecular dynamics
IV. Replica exchange method
V. Multicanonical/Wang-Landau sampling
VI. Practicalities
18
Temperature replica exchangeLarge conformational barriers can be surmounted
by raising temperature,and this can be done
while maintaining Boltzmann-Gibbs samplingusing replica-exchange aka parallel tempering (1995).
19
MethodSimulate an ensemble of systems at temperaturesT1 < T2 < · · · < Tµ where T1 is the desired temperature.Periodically, choose ν at random from 1, 2, . . . , µ− 1,and consider swapping configurations x(ν) and x(ν+1).Probability of the swapped state relative the unswapped state is
r =ρν(x(ν+1))ρν(x(ν))
ρν+1(x(ν))ρν+1(x(ν+1))
where ρν(x) is the probability density for temperature Tν.Accept the exchange with a probability
min {1, r} .Then continue sampling.
20
ShortcomingProbability of rejection increases with system size N .
Number of replicas needed to prevent excessive rejectionsincreases as N1/2.
21
Hamiltonian replica exchangeA generalization of replica exchange.
As an example, write U = Upp + Upw + Uww
where the splitting represents protein–protein, protein–water, andwater–water interactions, respectively.
not a Markov chainScheme tries to create a flat energy distribution,the resistance encountered is a correction to g(k)(E).
28
Outline
I. Markov chain Monte Carlo methods
II. Hybrid Monte Carlo methods
III. Molecular dynamics
IV. Replica exchange method
V. Multicanonical/Wang-Landau sampling
VI. Practicalities
29
PracticalitiesThe practicalities of doing such calculations involve three steps:
structure building Setting up the input files is best doneinteractively with scripts and visual feedback.visualization programs: RasMol, VMD, PyMOL, . . .
simulation Generating dynamics or sampling trajectories is bestdone in background or remotely.simulation programs: CHARMM, Amber, Gromacs, NAMD,LAMMPS, NWChem, Tinker, . . .
analysis Analyzing trajectory data.
30
Simulation specifications
• Specify molecular system & surroundings
• Specify computational tasks
• Select computational model:uncontrolled approximations and error tolerances
- internal forces- external forces, e.g., temperature and pressure control- dynamics (sampling or real)
• (Override defaults for performance parameters)
• Design simulation protocol
31
References
• M. P. Allen and D. J. Tildesley, Computer Simulation ofLiquids, 1987,
• D. Frenkel and B. Smit, Understanding Molecular Simulation:From Algorithms to Applications, 2nd edition, 2002.
• A. R. Leach, Molecular Modelling: Principles andApplications, 2nd edition, 2001,
• T. Schlick, Molecular Modeling and Simulation: AnInterdisciplinary Guide, 2002,