8
Course MP3 – Lecture 8 20/11/2006 (JAE) 1 Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission. Dr James Elliott Molecular dynamics method II How to study real physical situations using tractable constraints Course MP3 – Lecture 8 20/11/2006 8.1 Revisiting the molecular dynamics method In lecture 7, we introduced the molecular dynamics (MD) method, which is a deterministic simulation technique for evolving systems to equilibrium by solving Newton’s laws numerically. Because the interactions are completely elastic and pairwise acting, both energy and momentum are conserved. Therefore, MD naturally samples from the microcanonical or NVE ensemble. As mentioned previously, the NVE ensemble is not very useful for studying real systems. We would like to be able to simulate systems at constant temperature or constant pressure.

Molecular Dynamics Simulations

Embed Size (px)

DESCRIPTION

Molecular Dynamics Simulations

Citation preview

Page 1: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

1Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

Dr James Elliott

Molecular dynamics method II

How to study real physical situations using tractable constraints

Course MP3 – Lecture 8

20/11/2006

8.1 Revisiting the molecular dynamics method

In lecture 7, we introduced the molecular dynamics (MD) method, which is a deterministic simulation technique for evolving systems to equilibrium by solving Newton’s laws numerically.Because the interactions are completely elastic and pairwise acting, both energy and momentum are conserved. Therefore, MD naturally samples from the microcanonical or NVE ensemble.As mentioned previously, the NVE ensemble is not very useful for studying real systems.We would like to be able to simulate systems at constant temperature or constant pressure.

Page 2: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

2Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.2 MD in different thermodynamic ensembles

In this lecture, we will discuss ways of using MD to sample from different thermodynamic ensembles, which are identified by their conserved quantities.Canonical (NVT)

– Fixed number of particles, total volume and temperature. Requires the particles to interact with a thermostat.

Isobaric-isothermal (NpT)– Fixed number of particles, pressure and temperature. Requires

particles to interact with a thermostat and barostat.

Isobaric-isenthalpic (NpH)– Fixed number of particles, pressure and enthalpy. Unusual, but

requires particles to interact with a barostat only.

8.3 Revision of NVE MD

Let’s start by revising how to do NVE MD.Recall that we calculated the forces on all atoms from the derivative of the force field, then integrated the e.o.m. using a finite difference scheme with some time step ∆t.We then recalculated the forces on the atoms, and repeated the process to generate a dynamical trajectory in the NVE ensemble.Because the mean kinetic energy is constant, the average kinetic temperature TK is also constant.However, in thermal equilibrium, we know that instantaneous TK will fluctuate. If we want to sample from the NVT ensemble, we should keep the statisticaltemperature constant.

Page 3: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

3Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.4.1 Extended Lagrangians

There are essentially two ways to keep the statistical temperature constant, and therefore sample from the true NVT ensemble.

– Stochastically, using hybrid MC/MD methods– Dynamically, via an extended Lagrangian

We will describe the latter method in this lecture, and discuss hybrid methods more fully in lecture 12.An extended Lagrangian is simply a way of including a degree of freedom which represents the reservoir, and then carrying out a simulation on this extended system. Energy can flow dynamically back and forth from the reservoir, which has a certain thermal ‘inertia’ associated with it. All we have to do is add some terms to Newton’s equations of motion for the system.

8.4.2 Extended Lagrangians

The standard Lagrangian L is written as the difference of the kinetic and potential energies:

Newton’s laws then follow by substituting this into the Euler-Lagrange equation:

Newton’s equations and Lagrangian formalism are equivalent, but the latter uses generalised coordinates.

212

N

i ii

L m x V= −∑

0dd

=∂∂

−∂∂

ii xL

xL

t

Page 4: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

4Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.5.1 Canonical MD

So, our extended Lagrangian includes an extra coordinate ζ, which is a frictional coefficient that evolves in time so as to minimise the difference between the instantaneous kinetic and statistical temperatures.The modified equations of motion are:

The conserved quantity is the Helmholtz free energy.

{ }1/)(τ1ζ

ζ/

SK2T

−=

−==

TtT

m

iii

iii

pFppr

(modified form of Newton II)

8.5.2 Canonical MD

By adjusting the thermostat relaxation time τT (usually in the range 0.5 to 2 ps) the simulation will reach an equilibrium state with constant statistical temperature TS.TS is now a parameter of our system, as opposed to the measured instantaneous value of TK which fluctuates according to the amount of thermal energy in the system at any particular time.Too high a value of τT and energy will flow very slowly between the system and the reservoir (overdamped).Too low a value of τT and temperature will oscillate about its equilibrium value (underdamped).This is the Nosé-Hoover thermostat method.

Page 5: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

5Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.5.3 Canonical MD

There are many other methods for achieving constant temperature, but not all of them sample from the true NVT ensemble due to a lack of microscopic reversibility.We call these pseudo-NVT methods, and they include:

– Berendsen methodVelocities are rescaled deterministically after each step so that the system is forced towards the desired temperature

– Gaussian constraintsMakes the kinetic energy a constant of the motion by minimising the least squares difference between the Newtonian and constrained trajectories

These methods are often faster, but only converge on the true canonical average properties as O(1/N).

8.6.1 Isothermal-isobaric MD

We can apply the extended Lagrangian approach to simulations at constant pressure by simply adding yet another coordinate to our system.We use η, which is a frictional coefficient that evolves in time to minimise the difference between the instantaneous pressure p(t), measured by a virial expression, and the pressure of an external reservoir pext.The equations of motion for the system can then be obtained by substituting the modified Lagrangian into the Euler-Lagrange equations. These now include two relaxation times: one for the thermostat τT, and one for the barostat τp.

Page 6: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

6Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.6.2 Isothermal-isobaric MD

The is known as the Nosé-Hoover method (Melchionna type) and the equations of motion are:

( )

{ }

{ }

η3

)(τ

1/)(τ1ζ

ηζ)η(/

ext2pSB

SK2T

0

VV

ptpTNk

TtT

m

iii

iiii

=

−=

−=

+−=−+=pFpRrpr

(modified form of Newton II)

8.6.3 Isothermal-isobaric MD

The shape of the simulation cell can also be made to vary in what is known as the Parinello-Rahmanapproach. We simply replace the scalar barostat variables p and η by second rank tensors pij and ηij.

The simulation box volume V is then calculated by the scalar triple product of basis vectors forming the cell, and the equations of motion are virtually unchanged.

[from Allen & Tildesley (OUP, 1987)]

Page 7: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

7Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.6.4 Isothermal-isobaric MD

Again, there are many pseudo-NpT methods that suffer from a lack of microscopic reversibility and which converge on the true NpT averages as O(1/N).These methods include:

– Berendsen methodCell volume is rescaled deterministically after each step so that the system is forced towards the desired pressure

– Gaussian constraintsAttempts to make the instantaneous pressure a constant of the motion by least squares minimisation

Note that a barostat can used in isolation to sample from the isobaric-isenthalpic or NpH ensemble, but this is not often a physically interesting situation to study.

8.7 Fast MD of macromolecules

MD of macromolecules for fixed CPU time limited by largest value of time step that can be used without instability.Instability caused by the high frequency degrees of freedom, e.g. bond stretching, light atoms, etc.Often these degrees of freedom are irrelevant to the larger scale behaviour (cf. Born-Oppenheimer approximation) although we cannot ignore their mean values.Solution is to freeze out these degrees of freedom and reparameterise the system taking account of the mean field in which the lower frequency degrees of freedom move.This process is sometimes referred to as coarse-graining (more in course MP5)

Page 8: Molecular Dynamics Simulations

Course MP3 – Lecture 820/11/2006 (JAE)

8Copyright © 2006 University of Cambridge. Not to be quoted or copied without permission.

8.8 Summary

In this lecture, we revised the standard NVE molecular dynamics method and discussed some algorithms for simulating in the NVT, NpT and NpH ensembles using the principle of an extended Lagrangian.In this approach, the internal energy and/or cell volume are dynamical variables of the system, just like the particle positions and momenta.This is similar in principle to the idea of thermal or pressure reservoirs (described in lecture 5) for Monte Carlo, except that MD evolves system in time.This concludes our introduction to MD/MC, and next lecture we will start to look at applications in detail.