Statistical Mechanics and Molecular Dynamics - ima.umn.edu · Statistical Mechanics and Molecular...

Preview:

Citation preview

Statistical Mechanics and Molecular Dynamics

Mark TuckermanDept. of Chemistry

and Courant Institute of Mathematical Science100 Washington Square East

New York University, New York, NY 10003

IMA Workshop on Classical and Quantum Approaches in Molecular Modeling

Lecture Outline

• Hamiltonian systems and Liouville’s theorem

• The Liouville equation and equilibrium solutions

• The microcanonical ensemble

• The canonical ensemble

• Linear response theory and transport properties

Molecular Dynamics• A physical system described at an atomistic level consists of N atoms

• The dynamics of the system can be described using the laws of classicalmechanics

• Each atom experience a force due to all the other atoms in the system and any other external influences. Hence, at any instant in time,there will be N forces F1,…,FN.

• The forces give rise to accelerations a1,…,aN according to Newton’ssecond law of motion:

2

2 1,...,ii i i i

dm m i Ndt

= = =rF a

• From these equations, we seek to determine the positions r1(t),…,rN(t)and velocities v1(t),…,vN(t) of all atoms in the system as functions of time.

Hamiltonian Mechanics

Phase SpaceCollect all momenta and coordinates into a Cartesian vector:

For a one-dimensional system with coordinate q and momentum p phase space can be visualized:

p

q

.(p,q)

Solution of Hamilton’s equations yields x(t) given initial conditions x(0)

(p(t),q(t))

(p(0),q(0))

that lives in a 6N-dimensional space called phase space.

Phase space volume evolution

x (x)η=

0 0x ( ; ) xt td J x x d=

0x (x )t tφ=

Generic recasting of Hamilton’s equations:

Time evolution as a coordinate transformation (one-parameter diffeomorphism):

Phase-space volume evolution depends on Jacobian:

Phase-space volume evolution

Tr(ln M)0

0

x(x , x ) det(M)x

ttJ e∂

= = =∂

10 0

M(x , x ) (x , x )Tr Mt td dJ Jdt dt

− =

( )1 0

0 0

x x x x x x

ii i ii ji t tj j j jj

t

dMM M

dt−∂ ∂ ∂

= = =∂ ∂ ∂

1 0

, 0

x x xMTr M x = (x )= (x )x x x

j i jt t

t t ti j ji j jt t

ddt

η κ− ∂ ∂ ∂ = = =∇ ∇ ∂ ∂ ∂ ∑ ∑ i i

Jacobian of the transformation 0x x t→

Take the time derivative of both sides:

0 0(x , x ) (x ) (x , x )t t td J Jdt

κ= 0 0(x , x ) 1J =

Phase-space volume evolution

Equation of motion for Jacobian:

1 1(x ) 0

i i i i i i

N N

t i ii i

H Hκ= =

= ∇ +∇ = −∇ ∇ +∇ ∇ = ∑ ∑p r p r r pp ri i i i

Hamiltonian systems incompressible:

0x xtd d=Phase-space volume conserved (Liouvlle’s Theorem):

The ensemble concept

• Each phase-space point is a complete specification of a system and is, therefore, called a microstate.

• Macroscopic matter consists of 1023 particles.

• Macroscopic observables should not depend sensitively on the specificdetails of each particle’s motion.

• Many microstates give rise to the same macroscopic observables,e.g. temperature:

1 1x ( ,..., , ,..., )N N= p p r r

2

1 2

Ni

i i

Tm=

⇔∑ p

• Ensemble concept: Imagine a collection of systems governed by the sameHamiltonian H, all sharing common macroscopic properties (e.g. same totalenergy, volume, numer of particles,…). Each system evolves according to themicroscopic laws of motion from a different initial condition so that at eachinstant in time, each system in the ensemble is in a unique microstate. Macroscopic observables are expressible as averages over the systems in agiven ensemble.

Ensembles and the Liouville equation

Fraction of ensemble members in a phase space volume dx at time t:

(x, ) x

( , ) 0 x (x, ) 1

f t d

f x t d f t≥ =∫

Fraction of ensemble members in x (x , )t td f tΩ

Ω = ∫

Ω

Rate of decrease of ensemble members in

x (x , ) x (x , )t t t td d f t d f tdt tΩ Ω

Ω∂

− = −∂∫ ∫

[ ]Flux out of the surface

ˆ x (x , ) x x (x , )t t t t tSdS f t d f t

Ω⋅ = ∇∫ ∫n i

Ensembles and the Liouville equation

f(x,t) has a constant normalization:

[ ]

( )

x x (x , ) x (x , )

(x , ) x (x , ) 0

t t t t t

t t t t

d f t d f tt

dx f t f tt

Ω Ω

Ω

∂∇ = −

∂∂ +∇ = ∂

∫ ∫

i

i

x (x ) 0t tκ∇⋅ = =Since and choice of Ω is arbitrary, obtain Liouville equation:

(x , ) x (x , ) 0t t tf t f tt∂

+ ⋅∇ =∂

Liouville equation implies f(x,t) conserved along a trajectory df/dt=0

“Passive” form of Liouville equation:

(x, ) (x, ) (x, ) 0f t t f tt

η∂+ ⋅∇ =

Ensembles and the Liouville equation

1

(x, ) (x, ) (x, ), (x, )N

i i i i i

f H f Ht f t f t H tη=

∂ ∂ ∂ ∂⋅∇ = ⋅ − ⋅ = ∂ ∂ ∂ ∂

∑ r p p r

Poisson bracket:

(x, ) (x, ), (x, ) 0f t f t H tt∂

+ =∂

Liouville equation in terms of Poisson Bracket:

Equilibrium conditions:

0 (x), (x) 0f f Ht

∂= ⇒ =

∂Equilibrium solution:

(x) ( (x))f F H=Because of Liouville’s Theorem, we can freeze ensemble at any instant in time andcompute an observable according to

x (x) ( (x))O d O F H= ∫

Microcanonical Ensemble

A microcanonical ensemble is an ensemble of systems isolated from theirsurroundings. The evolution of each system is, therefore, governed by Hamilton’s equations. The macroscopic variables that are invariant in suchan ensemble are the total energy E, the volume V, and total number of particles N.

We first seek to describe the thermodynamics of this ensemble, so we seeka state function that depends on N, V, and E. A state function is defined asa thermodynamic function whose change is independent of the path takenin the space of thermodynamic variables.

E

VN

Microcanonical Ensemble

First law of thermodynamics:

E Q W= +

Heat absorbed by system Work done on system

QW==

Small changes along a reversible path:

rev revdE dQ dW= +

Heat absorbed related to entropy change at temperature T:

revdQdST

=

Work performed by compressing or adding particles:

revdW PdV dNµ= − +

for a one-component system.

Microcanonical ensemble

Combining work and heat with First Law:

dE TdS PdV dNµ= − +

Thus,1 PdS dE dV dNT T T

µ= + −

The entropy S=S(N,V,E) is the state function we seek.

, , ,

, , ,

1

V E N E N V

N V N E V E

S S SdS dN dV dEN V E

S P S ST E T V T N

µ

∂ ∂ ∂ = + + ∂ ∂ ∂

∂ ∂ ∂ = = = ∂ ∂ ∂

Microcanonical EnsembleConnection to microstates provided by Boltzmann’s relation:

( , , ) ln ( , , )S N V E k N V E= Ω

( , , )N V EΩ is the number of microstates available to a system.

To find this number, return to equilibrium solutions of Liouville’s equation.For a microcanonical ensemble, the condition H(x)=E must be obeyed.

( (x)) ( (x) )F H H Eδ= −N

All points on the constant-energy hypersurface are equally probably, whileall points off the surface have zero probability. A microcanonical ensembleis, therefore, one for which all accessible states have equal a priori probabilityof being accessed, the probability being 1/ ( , , )N V EΩ1/ ( , , )N V EΩ is the normalization, with

03

03 ( )

( , , ) x ( (x) )!

( ( , ) )!

N

N NN D V

EN V E d H EN h

E d d H EN h

δ

δ

Ω = −

= −

∫ ∫p r p r

(partition function)

Microcanonical EnsembleThermodynamics:

, , ,

1 ln ln ln N V N E V E

PkT E kT V kT N

µ∂ Ω ∂ Ω ∂ Ω = = = ∂ ∂ ∂

Equilibrium observables:

x (x) ( (x) )x (x) ( (x) )

( , , )x ( (x) )N

d O H E MO d O H EN V Ed H E

δδ

δ

−= = −

Ω−∫ ∫∫

Now, suppose ( , , ) ( ( , , ))S N V E CG N V E= Ω

1 x (x) ( (x) )( , , )

NT

MS d O H ET E N V E

δ∂= = −∂ Ω ∫

ln ( (x) )'( ( , , )) x ( (x) )NS H ECG N V E M d H EE E

δδ∂ ∂ −= Ω −

∂ ∂∫

If (x) ln ( (x) ) / , '( ) 1/ , ( ) lnTA H E E G Gδ= ∂ − ∂ Ω = Ω Ω = Ω

Microcanonical Ensemble

The microcanonical ensemble can be generated by solving Hamilton’s equations:

= r

ii i

i i i i

H H Um

∂ ∂ ∂= = − = −∂ ∂ ∂

pr pp r

Phase-space averages computing as time averages:

0

x (x) ( (x) ) 1lim (x )x ( (x) ) t

d O H EO dt O O

d H E

δ

δ →∞

−= = =

−∫ ∫∫

T

T T

Not ergodic if E<V‡

( )U x

x

Canonical Ensemble

Using N,V, and E as thermodynamic control variables for an ensemble is notA natural choice, as experiments in the condensed phase are never performedUnder these conditions. More natural choices are (N,V,T) or (N,P,T), Corresponding to the canonical and isothermal-isobaric ensembles.

Recall: 1 S ETT E S

∂ ∂= ⇒ =∂ ∂

( , , ) ( , , )S S N V E E E N V S= ⇒ =

Energy function of N,V,T by Legendre transformation:

( , , ) ( , , ( , , )) ( , , )

EA N V T E N V S N V T S N V TS

E TS

∂= −

∂= −

A(N,V,T) called the Helmholtz free energy (talk more about tomorrow!)

Canonical EnsembleSmall change in A(N,V,T):

dA dE SdT TdSTdS PdV dV SdT TdS

PdV dN SdTµ

µ

= − −= − + − −= − + −

Also,

, , ,V T N T N V

A A AdA dN dV dTN V T∂ ∂ ∂ = + + ∂ ∂ ∂

Thermodynamic relations:

, , ,

V T N T N V

A A AP SN V T

µ ∂ ∂ ∂ = = − = − ∂ ∂ ∂

Canonical Ensemble

Microscopic picture:1 1 1, ,N V E

2 2 2, ,N V E

1 2 1 2

1 2 1 2

1 2

N N V VE E E E E

T T T

= +

= =

1 1 2 2(x) (x ) (x )H H H= +

( )1 2 1 1 2 2 1 1 1 1 2 2 2 2

1 1 1 1 1 2 2 2 10

( , , ) x x (x ) (x ) ( , , ) ( , , )

( , , ) ( , , )E

N V E d d H H E N V E N V E

C dE N V E N V E E

δΩ = + − ≠ Ω Ω

= Ω Ω −

∫∫

( )1 2 1 1 2 2( (x )) x (x ) (x )F H d H H Eδ∝ + −∫1 2 2 2 1 1 2 2 2

2 2 2 1 1

ln ( (x )) ln x ( (x ) ) (x ) ln x ( (x ) )

( , , ) (x )

F H d H E H d H EE

S N V E Hk kT

δ δ∂≈ − − −

= −

∫ ∫

Microcanonical partion function:

Distribution function of system 1:

Canonical Ensemble

Canonical distribution:

(x)

(x)3

1 1( (x)) ( , , )

1( , , ) x !

HN

HN N N

F H C eQ N V T kT

Q N V T C d e CN h

β

β

β−

= =

= =∫Thermodynamics:

1 ( , , ) ln ( , , )AA E TS E T A N V T Q N V TT β∂

= − = + ⇒ = −∂

, , ,

ln ln ln lnV T N T N V

Q P Q QS k Q kTkT N kT V Tµ ∂ ∂ ∂ = − = = + ∂ ∂ ∂

Equilibrium properties:

(x)x (x)( , , )

HNCO d O eQ N V T

β−= ∫

Canonical Ensemble

In the canonical ensemble, energy is not conserved. Therefore, Hamilton’sequations cannot be used to generate a canonical distribution. We need tosupplement them with an effect that mimics the thermal reservoir. Many waysto do this!!

Langevin dynamics:

2

ii

i

i i ii

d dtm

Ud dt dt m kT dWγ γ

=

∂= − − +

pr

p pr

Corresponding Fokker-Planck equation:

( , , ) ( , , )ii i

i i i i i i i

P t U m kT P tt m

γ γ ∂ ∂ ∂ ∂ ∂ ∂ = + − − + ∂ ∂ ∂ ∂ ∂ ∂

∑ pp r p p rr p r p pi i i

Stationary solution:

( , )( , ) HP e β−∝ p rp r

Canonical EnsembleNosé Hamiltonian: [S. Nosé J. Chem. Phys. 81, 511 (1984)]

Consider a Hamiltonian of the form:

( )

2 2

121

2

( , , , ) ( ,..., ) ln2 2

/ , ln2

Ni s

N s Ni i

s

p pH p s U r r gkT sm s Q

pH s gkT sQ

=

= + + +

= + +

∑p r

p r

Microcanonical partition function:2

( , , ) ( / , ) ln2

ss

pN V E d dp d ds H s gkT s EQ

δ

Ω = + + −

∫ p r p r

Change variables:i

i s′ =

pp

23( , , ) ( , ) ln

2N s

spN V E d dp d ds s H gkT s EQ

δ

′ ′Ω = + + −

∫ p r p r

Canonical Ensemble

0

0

( )( ( ))( )

s sf sf s

δδ −=

2(3 1)( ( , ) / 2 ) /

/( , ) /

( , , )

2 ( , , )

(3 1) 3 1

sN E H p Q gkTs

E kTH kT

N V E d dp d e

e QkTd d e Q N V T

N kTg N

π

+ − −

Ω =

= ∝+

= +

p r

p r

p r

p r

By solving Hamilton’s equations for the extended Hamiltonian, a canonical phase-space average can be computed as a time average:

(x)

(x) 0

x (x) 1lim (x )x

H

tH

d O eO dt O O

d e

β

β

− →∞= = =∫ ∫∫

T

T T

Delta function identity:

Classical non-Hamiltonian statistical mechanics

0 0(x , x ) (x ) (x , x )t t td J Jdt

κ= 0 0(x , x ) 1J =

Note that for Hamiltonian systems, 0(x) 0 (x ,x ) 1tJκ = ⇒ =

Equation of motion for Jacobian:

0 0 0x (x , x ) x x (Liouville's Theorem)t td J d d= =

0If (x) 0, system is non-Hamiltonian, (x , x ) 1tJκ ≠ ≠

Let the non-Hamiltonian phase space be a general Riemannian manifold with a metric tensor gij(x,t) and determinant g(x,t)

Then, Liouville’s theorem can be generalized to:0 0( , ) ( ,0)t tg x t dx g x dx=

Since 00

(x ,0)(x , x )

(x , )tt

gJ

g t=

MET, Mundy, Martyna, Europhys. Lett. 45, 149 (1999); MET, Ciccotti, Martyna, Liu, J. Chem. Phys. 115, 1678 (2001).

Classical non-Hamiltonian statistical mechanics

0 0(x , x ) (x ) (x , x )t t td J Jdt

κ= 0 0(x , x ) 1J =

Solution: 0 (x )

0(x , x )t

sds

tJ eκ∫=

Define: (x ) (x , )t td w tdt

κ =

Then: 0(x , ) (x ,0)0(x , x ) tw t w

tJ e −=

Whence: 0 0x (x , x ) x t td J d= ⇒ 0(x , ) (x ,0)0x xtw t w

te d e d− −=

Equation of motion for Jacobian:

Canonical ensembleNosé-Hoover equations:

2

r

3

ii i i

i i

i

i i

pUm Qp

p NkTQ m

η

ηηη

∂= = − −

= = −∑

pr p p

p

Non-Hamiltonian with compressibility

13 3

i i

N

i ii

p pN N

p Qη η

η

ηκ ηη=

∂∂ = ∇ +∇ + + = − = − ∂ ∂∑ p rp ri i

Metric factor: 3w Ne e η− =

Conserved energy: 2

( , ) 32p

H H NkTQη η′ = + +p r

Canonical Ensemble

23

( , )

( , , ) ( , ) 32

( , , )

N

H

pN V E d dp d d e H NkT E

Q

d d e

Q N V T

ηηη

β

η δ η

Ω = + + −

∫ p r

p r p r

p r

mpem

pf 2/2

2)( β

πβ −=

2/2

22

2)( xmemxf ωβ

πωβ −=

22 21

2 2pH m xm

ω= +

Thermostattedequations ofmotion:

Nosé-Hoover

Nosé-Hoover Chains

Hamilton

Nosé-Hoover chains: Canonical molecular dynamicsMartyna, Tuckerman, Klein JCP 97, 2635 (1992)

13x MN N N M Md e d d d d pη ηηη+ +=

Conserved volume element

r p

1 chain element 3 chain elements 4 chain elements

One-dimensional canonical harmonic oscillator

mpem

pf 2/2

2)( β

πβ −= 2/

222

2)( xmemxf ωβ

πωβ −=

22 21

2 2pH m xm

ω= +

Radial distribution functions of water

DVRNeutronX-ray

H. –S. Lee and MET, JPCA (in press)Neutron: Soper, et. al. JCP 106, 247 (1997)X-ray: Hura, et. al. Chem. Phys. 113, 9140 (2000)

CP-BLYP, 753 grid, 30 ps, NVT, 300 K, µ = 500 au

NVT fluctuations half those of NVE

Driven dynamics and transport properties

20 cosp px p m x F t

m mω γ= = − − + Ω

Driven harmonic oscillator:

After a short time, transient behavior gives way to steady state behaviorthat resembles equilibrium in a different region of phase space. The steadystate allows transport properties to be computed.

General driven equations of motion:

( , ) ( )

( , ) ( )

ii i e

i

i i i e

F tm

F t

= +

= +

pr C p r

p F D p r

Assume incompressibility:

( , ) ( , ) 0i ii

∇ +∇ = ∑ i ip rD p r C p ri i

Driven dynamics and transport propertiesLiouville equation:

(x, ) x (x, ) (x, ) (x, ) 0f t f t f t iLf tt t∂ ∂

+ ⋅∇ = + =∂ ∂

Linearization scheme:

0

0

(x, ) ( (x)) (x, )( )

f t f H f tiL iL i L t

= + ∆= + ∆

Equilibrium condition:

0 0 ( (x)) 0iL f H =

Linearized Liouville equation:

0 0(x, ) ( ) ( (x))iL f t i L t f Ht∂ + ∆ = − ∆ ∂

Driven dynamics and transport properties

Solution:0 ( )

00( , ) ( ) ( (x))

t iL t sf x t ds e i L s f H− −∆ = − ∆∫Simplification:

( )0 0 0 0( ) ( (x)) ( ) ( (x)) ( ) ( (x))i L s f H iL s iL f H iL s f H∆ = − =

00( ) ( (x)) (x) ( )

(x)

(x) ( , ) ( , )

e

i ii i i

fiL s f H j F sH

H Hj

∂= −

∂ ∂= − + ∂ ∂ ∑ D p r C p r

p ri i

Take equilibrium distribution as a canonical distribution:(x)

0 ( (x))( , , )

HNC ef H

Q N V T

β−

=

0 0( ) ( (x)) ( (x)) (x) ( )eiL s f H f H j F sβ=

(dissipative flux)

Driven dynamics and transport properties

Nonequilibrium observable:

0

0

x (x) (x, ) x (x) ( (x)) x (x) (x, )

x (x) (x, )t

O d O f t d O f H d O f t

O d O f t

= = + ∆

= + ∆

∫ ∫ ∫∫

From linearized solution:

0 ( )00 0

x ( (x)) (x) (x) ( )t iL t s

etO O ds d f H O e j F sβ − −= − ∫ ∫

Let xt be the unperturbed evolution of the phase-space vector. Evolution of O(xt)

0 0

x 0

0 0

(x ) x (x ) (x )

(x ) (x ) (x )

t

tt t t

iL t iL tt

dO O iL Odt

O e O O e−

= ⋅∇ =

= =

Driven dynamics and transport properties

00 0

0 00

( ) x ( (x)) (x (x)) (x)

( ) ( ) (0)

t

e t st

t

e

O O ds F s d f H O j

O ds F s O t s j

β

β

−= −

= − −

∫ ∫∫

Nonequilibrium observable:

The quantity 0( ) (0)O t s j− is called an equilibrium time correlation function

( )j x

(x (x))tO

(0) ( ) ( ) (0) lim (0) ( )t

A B t A t B A B t A B→∞

= − =Properties: 0

1(0) ( ) lim (x ) (x )tA B t d A Bτ ττ +→∞= ∫

T

T T

Driven dynamics and transport properties

x

yExample: Shear viscosity:

ˆ

ˆi

ii i

i

i i y

ym

p

γ

γ

= +

= −

pr x

p F x

Equations of motion:

Dissipative flux:

( , ) i i

i

x yx i xy

i i

p pj F y VP

mγ γ

= + =

∑p r

Driven dynamics and transport propertiesCoefficient of shear viscosity:

lim xy t

t

γ→∞= −

From linear response formula:

0 00(0) ( )

t

xy xy xy xytP P V ds P P t sβγ= − −∫

0

Viscosity:

00(0) ( ) xy xyV d P P t sη β τ τ τ

∞= = −∫

known as a Green-Kubo formula. Transport coefficient related totime integral of an equilibrium autocorrelation function.

Recommended