lecture 13: conformational sampling: mc and md dr. ronald m. levy [email protected] contributions...

22
Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy [email protected] Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Upload: bryant-alberts

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Lecture 13: Conformational Sampling:MC and MD

Dr. Ronald M. Levy

[email protected]

Contributions from Mike Andrec and Daniel Weinstock

Statistical Thermodynamics

Page 2: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Importance Sampling and Monte Carlo Methods

Energy functions are useless without sampling methods

• Knowing the energy of every point in a high-dimensional phase space is essential but not terribly informative

• Thermodynamic quantities are averages over an ensemble over the entire phase space

• We are often interested in the distribution of certain quantities (e.g. radius of gyration) averaged over all of the “uninteresting” degrees of freedom (aka “potentials of mean force”)

Page 3: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Thermodynamic quantities are averages over an ensemble over the entire phase space

This could be evaluated by numerical integration over a grid, or by generating random points uniformly over phase space and estimating the integral by MC integration:

In fact, the complete phase space may not be needed, since the velocity contributions can often be accounted for analytically. Then, we only need to consider the potential energy of conformational degrees of freedom.

Page 4: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

These methods are generally hopeless for molecular systems: N is huge, Q is unknown, and most points in a uniform sampling have a very small value of the integrand.

Frenkel & Smit (2002) Understanding Molecular Simulations, 2nd Ed., Academic Press

Page 5: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics
Page 6: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Importance Sampling by Markov Chain Monte Carlo

Given a current point i in configuration space, choose a subsequent point i+1 with transition probability (i, i+1) that depends only on i. To get the correct sampling, it is sufficient that the transition probabilities satisfy microscopic reversibility:

(i) (i, i+1) = (i+1) (i+1, i),

or i ij= j ji

Want to produce conformations distributed according to

ij(flux i to j = flux j to i = equilibrium)

Page 7: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

ij=qij Pij

ij

Proposal probability(probability of picking move)

Acceptance probability(probability of accepting move once it has been selected)

one valid choice: P ij=min 1 , j

i=min 1 , e−U ij

If q ji=q ij

j i

i ij=i q ij=i q ji

j ji= j q ji

i

j

=i q ji

i ij= j ji

(symmetric MC scheme)

Page 8: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

The “classic” Metropolis algorithm

• Pick a degree of freedom x

• Displace x by a uniformly distributed random number in range ±

• Calculate the potential energy difference between the current state i and the proposed displaced state j

• Accept the move if

• Otherwise draw random number and accept if

U jU i

01 e− U j−U i

“Reject” does not mean “omit”…

ij

Page 9: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Connections between microscopic information such as atomic positions and velocities and macroscopic observables is through statistical mechanics.

In statistical mechanics, averages are defined as ensemble averages

However, in MD simulations, we calculate time averages

Molecular Dynamics (MD)

Ergodic Hypothesis

⟨A ⟩ensemble=⟨A ⟩time

Page 10: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

1956: Alder and Wainwright MD method developed to study interactions of hard spheres

1964: Rahman first simulation with realistic potential - liquid Argon

1971: Stillinger and Rahman first simulation of realistic system - liquid water

1977: McCammon, Gelin, and Karplusfirst protein simulation - BPTI

Historical Background

Page 11: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

System of N particles

Positions of the N particles, Velocities of the N particles

Energy(E) of the system

Kinetic Energy

Potential Energy, V( r)

System Temperature

Microcanonical ensemble (constant NVE)closed system - no energy enters or leavesenergy conservation used to check MD algorithm

Page 12: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

The forces are complicated functions of the coordinates, non-linear functions of position, so the set of 3N coupled differential equations cannot be solved analytically.

Newton’s Equations of Motion

Page 13: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

The integrator is the heart of an MD algorithm

Given molecular position, velocities and other dynamic information at time t, we attempt to obtain the positions, velocities, etc. at a later time t+δt to a sufficient degree of accuracy

Numerical Integration of the Equations of Motion

Finite difference method:

r t t =r t v t t12

at t 2

v t t =v t a t t

at t = 1m

F t t

Not very accurate, leads to divergences unless δt is made very small.

Page 14: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Allen and Tildesley. Computer Simulations of Liquids. 1987.

Better O(δt2) algorithms: velocity Verlet, position Verlet, leap frog, predictor-corrector, ...

?

Page 15: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

The Liouville operator

iL= { , H }=∂H∂ p

∂∂ q−∂ H∂ q

∂∂ p

q~r

p~m v

iL= pm∂∂ qF q ∂

∂ p=iLqi L p

For any property A: At =e i L t At=0

q-component propagates coordinates in time:

e i Lq t qt ≈1 tpm∂∂q qt =q t t

pm

p-component propagates momenta in time:

e i L p t p t ≈1 t F q ∂∂ p p t = pt t F q

H= p2

2mV q

Page 16: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Trotter expansion

qt pt =ei L t q 0p 0 t=P t

qt pt = [e i L t ]P q 0p 0=e i L te i L t q 0p 0In general e i L q L p t≠e i L q t e i L p t

Because Lq and L

p don't commute

However if δt is sufficiently small: e i LqL p t≈ei L p t /2 ei Lq t e i Lp t /2O t3Trotter

qt pt = [e i L t ]P q 0p 0=e i L p t /2e i L p t /2 ei L p t /2 ei Lq t e i Lp t /2 q0p0

Page 17: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

rRESPA

qt pt = [e i L t ]P q 0p 0=e i L p t /2e i L p t /2 ei L p t /2 ei Lq t e i Lp t /2 q0p0Defines integrator made of P steps each made of 3 operations:

1. Propagate momenta to δt/2:

1. Propagate momenta to δt/2:

1. Propagate momenta to δt:

e i L p t /2 q 0p 0≈ q 0p t /2= p 0F q0 t /2

e i Lq t q 0p t /2≈q t =q 0 t p t /2/m

p t /2 e i L p t /2 q t

p t /2≈ q t p t = p t /2F q t t /2

Page 18: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

rRESPA equivalent to velocity Verlet

Most other integrators can be derived using different forms of short time expansions of the Liouville propagator

Page 19: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Choice of Time StepTime Step should be small enough for trajectories to be close to exact

Energy Conservation is used as a criteria for choosing the time step

signals good energy conservation

We want to use a time step that minimizes computational time, while maintaining Energy Conservation

The faster time scales control the time step δt to use. To integrate vibrations need to choose δt much smaller than 1fs

Page 20: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Multiple time step rRESPA

Decompose total force in a fast component (covalent interactions - inexpensive) and a slow component (non-bonded interactions - expensive):

iL= pm∂∂ q−F f q

∂∂ p

−F s q∂∂ p

=iL fi Ls

e i L t≈ e i L s t / 2 e i L f t e i L s t /2Short time propagator:

Then break up inner fast propagator using a shorter time step: t /N

e i L t≈ei L s t /2 [ei L f t /N ]N ei L s t /2

Fast forces are applied N times in the inner loop allowing larger time step in outer loop.

Page 21: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Canonical ensemble (constant N,V,T)

There are different methods for constant temperature MD

• Andersen velocity resampling

• Nosé-Hoover thermostat (extended system)• the system is coupled to extra degrees of freedom which simulate heat bath.

Original system is canonical, extended system is microcanonical

• Langevin thermostat. Periodically atomic velocities are stochastically perturbed based on friction coefficient and relaxation time.

• Berendsen thermostat (velocity rescaling – non canonical)

Constant Temperature Molecular Dynamics

P v x , v y , vz ∝e− 12mv x

2v y2vz

2

s=1 t T target

T instantaneus

−1

Page 22: Lecture 13: Conformational Sampling: MC and MD Dr. Ronald M. Levy ronlevy@temple.edu Contributions from Mike Andrec and Daniel Weinstock Statistical Thermodynamics

Typical Organization of a MD simulation

1) Energy minimization2) Thermalization3) Equilibration4) Production5) Trajectory Analysis