Molecular Dynamics at Constant Temperature and Pressure

Download Report

Transcript Molecular Dynamics at Constant Temperature and Pressure

Molecular Dynamics at Constant Temperature and Pressure

Section 6.7 in M.M.

Introduction

Molecular mechanics simulations usually sample the microcanonical (constant NVE) ensemble .

What if we are interested in some other ensemble such as the canonical (constant NVT) or isothermal-isobaric (constant NPT)?

What if we are studying a system that gets too hot?

1. Do a Monte Carlo calculation instead (canonical).

2. Modify the molecular mechanics.

Scaling/Constraining Methods

Temperature is

K

.

E

.

i N

  1 1 2

m r

 2  3 2

NkT

Simplest way to modify T: Temperature depends on velocities so correct the velocities every step to give desired temperature.

Multiply by  

T W

/

T

(

t

) Where T

W

is the temperature that you want and T(t) is the temperature at time t. Simple, but crude and may inhibit equilibration.

More Sophisticated S/C

“Encourage” the temperature in the direction you want by coupling it to a heat bath. Have 

T

T W

T

(

t

)     1  

t

  

T T W

(

t

)   1    1 / 2  is the coupling parameter. If  =  samples the canonical ensemble.

t

the simpler form of scaling is recovered. Neither method

More Sophisticated S/C

Redefine equations of motion.

Choose x 

f

 x (

r

,

p

)

p

such that

T

 (

t

)  d d

t

  

i p i

2    0 To minimize the difference with Newtonian trajectories take This samples configurational part x  

i

p p i

i

 2

f

i

of canonical ensemble

i

Note that it prevents changes in T but does not change it to a desired value

Example, S/C

10 atoms in a cell interacting via a Lennard-Jones Potential.

Simulate using leap-frog algorithm (6.3.1)

Example, S/C

Simulate for a while

Example, S/C

1200 1000 800 600 400

Energy Pressure Temperature

200 0 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 Time Step

Obtain these properties (10,000,000 steps between 65,0000 and 650,001 not shown).

Example, S/C

Same system but with scaling to a temperature of about 300.

Example, S/C

1400 1200 Energy Pressure Temperature Same system but with scaling to a temperature of about 300.

1000 800 600 400 200 0 0 100000 200000 300000 400000 500000 600000 700000 800000 900000

Time Step

Stochastic Collisions

• Influence the system temperature by reassigning the velocity of a random particle (a “collision”). An element of Monte-Carlo. • The new velocity is from the Maxwell-Boltzmann distribution corresponding to the desired T

W

.

• Between collisions sample a micro-canonical ensemble. It can be shown that overall the canonical ensemble is sampled.

• Collision frequency is important. • Can also reassign some or all particle velocities.

Extended Systems

• Have a thermal reservoir coupled to the system.

• The reservoir has its own degree of freedom s and its own thermal inertia parameter Q.

• Energy is conserved in the total system and the micro-canonical ensemble of the total system is sampled. • Two flavours: 1.Nosé type 2.Hoover type

Nosé Method

The extra degree of freedom s which scales the real velocities and time step

V s

Z

( 

f

system is (

v

f

 1 ) 1  1

s

)     ,

kT W

2  s has its own kinetic and potential energies (f is the number of degrees of freedom) ln 

kT t Q s

    , 1

s

/ 2 

K t

 exp .

E

It can be shown that the partition function of this 

E

.

s

/ 

kT

1 2 

Z Q c s

 2

Nosé Method

Also, 

A

p

s

,

r

for a given property A.

A

 

c

Note that the total momentum and total angular momentum deviate from canonical by O(1/N).Q measures coupling between reservoir and system.It should not be too high (slow flow) or too low (oscillations).

Example of Nosé Method

System made up of 108 argon atoms.

S. Nosé Mol. Phys. 52, 255 (1984).

Hoover Method

Start with the Nosé method and redefine the time variable

dt old

new

Thus eliminate s from equations of motion 

f

 x

p

, x 

p s Q

, x  

fk

(

T

(

t

) 

T W

)

Q

Samples a canonical ensemble and is more “gentle” than straight scaling.

An Aside: Ab Initio Molecular Dynamics

(9.13.2-3) • In the Car-Parinello method (e.g. PAW) Molecular Dynamics is performed using forces derived from QM.

• The nuclear and electronic degrees of freedom are relaxed simultaneously.

• When doing dynamics the electronic part must not heat up too much.

• Couple electronic and nuclear motions each to their own Nosé-Hoover thermostat.

x 

e

 2

Q e

  

i

 

i

i

E kin

, 0   , x 

N

f Q N

T

(

t

) 

T W

Constant Pressure

Pressure:

P

 1

V

  

NkT

 1 3

kT i N

    1

j N

i

1

r ij f ij

   Can maintain constant pressure by changing V, the volume of the box. Long range corrections are important. Here f represents the forces.

Volume changes can be large: Gas in 20Å square box (volume 8000 Å 3 ) has 

V

RMS =18,100 Å 3 . Use a bigger box.

Scaling/Constraining

Can “encourage” the pressure in the direction desired by scaling box size by c c  1  

t

 (

P W

P

(

t

)) Can redefine equations of motion 

f

 c (

r

,

p

)

p

,

V

  3

V

c (

r

,

p

) Where c is pretty ugly. Get 

0

Extended Systems

• Have the system coupled to a ‘piston’ .

• The piston has its own degree of freedom V and its own ‘mass’ Q.

• Energy is conserved in the total system and the micro-canonical ensemble of the total system is sampled.

Anderson Method

• Variables are scaled.

r

V

1 / 3

r

 ,

r

  • The ‘piston’ has its own kinetic and potential energies.

K V

 1 2

Q V

 2 ,

PE V

P W V V

1 / 3

r

  • It can be shown that the time average of the trajectories derived equal the isoenthalpic-isobaric ensemble average to O(N

-2

).

Extended Systems

• Again, the size of Q is important to avoid oscillations/slow exploration of phase space.

• Changing the box shape is a special case of this. Not so useful for liquids but good for solids.

Stochastic Methods

None yet developed.

Constant Temperature and Pressure

1.

2.

The isobaric-isothermal (constant NPT) ensemble is often of interest. Achieved by combing methods already described, e.g.

Couple system with a piston then maintain temperature by the stochastic method including collisions with the piston.

Redefine equations of motion to constrain T and P Here ( cx 

f

 c

p

 x

p

x slightly less ugly than before.

and c is 3. Hoover’s formulation 

f

 c

p

 x

p

, c 

V

 / 3

V

, c   (

P

(

t

) 

P W

)

V

/  2

kT W

What Method to Use?

• Scaling is simple and easy and in the simplest case requires no parameters. Convergence may be a problem and do not sample cononical/isobaric/isobaric-isothermal ensemble. Good for equilibration.

• Constraints a little more complicated but also require no parameters. Only keep T/P unchanged.

• Stochastic approach is more stable than scaling but method is no longer deterministic. • Extended systems methods more complicated and require parameters. Nosé-Hoover thermostats enable the true canonical ensemble to be sampled.

Summary

• One may want to constrain/choose temperature and/or pressure in a molecular dynamics simulation for a number of reasons. • The temperature can be fixed by a) scaling the velocities (partially or completely) or simply redefining the equations of motion so that T does not change, b) changing some or all of the velocities of the particles to a randomly selected member of the Maxwell- Boltzmann distribution of the desired T, c) couple the system to a heat bath • Analagous methods exist to chose/maintain a constant pressure.

• Combinations of methods can be used to simulate a system at constant temperature and pressure.