molecular simulation background. why simulation? 1.predicting properties of (new) materials...

70
Molecular Simulation Background

Upload: percival-blankenship

Post on 29-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Molecular Simulation

Background

Page 2: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Why Simulation?

1. Predicting properties of (new) materials

2. Understanding phenomena on a molecular scale.

Page 3: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

THE question:

“Can we predict the macroscopic properties of (classical) many-

body systems?”

Page 4: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

“Translation” In principle “Yes”.

Provided that we know the position, velocity and interaction of all molecules, then the future behavior is

predictable,…BUT

NEWTON: F=m a

LAPLACE:Nous devons donc envisager l'état présent de l'universe comme l'effet

de son état antérieur et comme la cause de delui qui va suivre. Une intelligence qui, pour un instant donné, connaîtrait toutes les forces dont la nature est animée et la situation respective des êtres qui las

composent, si d'ailleurs elle était assez vaste pour soumettre ces données à l'Analyse, embrasserait dans la même formule les

mouvements des plus grands corps de l'univers et ceux du plus lèger atome : rien ne serait incertain pour elle, et l'avenir, comme le passé,

serait présent à ses yeux.

Page 5: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

…. There are so many molecules.

This is why, before the advent of the computer, it was impossible to predict the properties of real materials.

What was the alternative?

1. Smart tricks (“theory”)

Only works in special cases

2. Constructing model (“molecular lego”)…

Page 6: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 7: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

J.D. Bernal’s “ball-bearing model” of an atomic liquid…

Page 8: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

J.D. Bernal constructs a model of a liquid… (around 1950)..

I took a number of rubber balls and stuck them together with rods of a selection of different lengths ranging from 2.75 to 4 in. I tried to do this in the first place as casually as possible, working in my own office, being interrupted every five minutes or so and not remembering what I had done before the interruption. However, ...

Page 9: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

The computer age (1953…)

With computers we can follow the behavior of hundreds to hundreds of millions of molecules.

Mary-Ann Mansigh

Berni Alder

Tom Wainwright

Page 10: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

A brief summary of:

Entropy, temperature, Boltzmann distributions and the Second Law of Thermodynamics

Page 11: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

The basics:

1. Nature is quantum-mechanical

2. Consequence:

Systems have discrete quantum states.

For finite “closed” systems, the number of states is finite (but usually very large)

3. Hypothesis: In a closed system, every state is equally likely to be observed.

4. Consequence: ALL of equilibrium Statistical Mechanics and Thermodynamics

Page 12: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

First: Simpler example (standard statistics)

Draw N balls from an infinite vessel that contains an equal number of red and blue balls

Page 13: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 14: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Now consider two systems with total energy E.

This function is very sharply peaked (for macroscopic systems)

Page 15: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Now, allow energy exchange between 1 and 2.

Page 16: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

So:

With:

Page 17: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

This is the condition for thermal equilibrium (“no spontaneous heat flow between 1 and 2”)

Normally, thermal equilibrium means: equal temperatures…

Page 18: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Let us define:

Then, thermal equilibrium is equivalent to:

This suggests that is a function of T.

Relation to classical thermodynamics:

Page 19: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Conjecture: ln = S

Almost right.

Good features:

•Extensivity

•Third law of thermodynamics comes for free

Bad feature:

•It assumes that entropy is dimensionless but (for unfortunate, historical reasons, it is not…)

Page 20: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

We have to live with the past, therefore

With kB= 1.380662 10-23 J/K

In thermodynamics, the absolute (Kelvin) temperature scale was defined such that

But we found (defined):

Page 21: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

And this gives the “statistical” definition of temperature:

In short:

Entropy and temperature are both related to the fact that we can COUNT states.

Page 22: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

How large is ?

For macroscopic systems, super-astronomically large.

For instance, for a glass of water at room temperature:

Macroscopic deviations from the second law of thermodynamics are not forbidden, but they are extremely unlikely.

Page 23: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 24: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Consider a “small” system (a molecule, a virus, a mountain) in thermal contact with a much larger system (“bath”).

The total energy is fixed. The higher the energy of the small system, the lower the energy of the bath.

What happens to the total number of accessible states?

Page 25: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

But, as =1/kBT :

The probability that the small system is in a given (“labeled”) state with energy i is

Page 26: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

This is the Boltzmann distribution:

“Low energies are more likely than high energies”

Page 27: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 28: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

The probability to find the system in state I is:

Hence, the average energy is

Page 29: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Therefore

This can be compared to the thermodynamic relation

Page 30: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

This suggests that the partition sum

is related to the Helmholtz free energy through

Page 31: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Remarks We have assumed quantum mechanics (discrete states) butoften we are interested in the classical limit

2

3

1exp d d exp

! 2N N Ni

ii ii

pE U r

h N m

p r

3

1

h Volume of phase space

1

!N Particles are indistinguishable

332 2 22

d exp dp exp2 2

N N

N ii

i

p p m

m m

p

Integration over the momenta can be carried out for most systems:

The derivation is not difficult but it takes a few minutes…

Page 32: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Remarks

Define de Broglie wave length:1

2 2

2

h

m

Partition function:

3

1, , d exp

!N N

NQ N V T U r

N r

Page 33: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Check: ideal gas 3

1, , d exp

!N N

NQ N V T U r

N r

3 3

1d 1

! !

NN

N N

V

N N

r

Free energy:

Pressure:

T

F NP

V V

Energy:

3 3

2 B

F NE Nk T

1ln!

ln 33

NN

VF

N

N

Thermo recall (3)

Helmholtz Free energy:

T

FP

V

d d dF S T p V

1

F T FE

T

Energy:

Pressure

Page 34: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Relating macroscopic observables to microscopic quantities

Example:

Heat capacity

Pressure

Diffusion coefficient

Page 35: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Fluctuation expression for heat capacity.

Recall:

with

Page 36: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Then the heat capacity is

Using our expression for E:

Page 37: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Both the numerator and denominator depend on .

And, finally:

Page 38: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

COMPUTING THE PRESSURE:

Page 39: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Introduce “scaled” coordinates:

Page 40: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 41: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 42: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 43: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 44: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

For pairwise additive forces:

Then

Page 45: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

And we can write

i and j are dummy variable hence:

Page 46: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

But as action equals reaction (Newton’s 3rd law):

And hence

Inserting this in our expression for the pressure, we get:

Where

Page 47: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

What to do if you cannot use the virial expression?

Page 48: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Other ensembles?In the thermodynamic limit the thermodynamic properties areindependent of the ensemble: so buy a bigger computer …

However, it is most of the times much better to think and to carefullyselect an appropriate ensemble.

For this it is important to know how to simulate in the variousensembles.

But for doing this wee need to know the Statistical Thermodynamicsof the various ensembles.

COURSE: MD and MC

different ensembles

Page 49: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Example (1): vapour-liquid equilibrium mixture

Measure the composition of the coexisting vapour and liquid phases if we start with a homogeneous liquid of two different compositions:– How to mimic this with the N,V,T

ensemble?

– What is a better ensemble?composition

T

L

V

L+V

Page 50: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Example (2):swelling of clays

Deep in the earth clay layers can swell upon adsorption of water:– How to mimic this in the N,V,T

ensemble?

– What is a better ensemble to use?

Page 51: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Ensembles

• Micro-canonical ensemble: E,V,N

• Canonical ensemble: T,V,N

• Constant pressure ensemble: T,P,N

• Grand-canonical ensemble: T,V,μ

Page 52: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Constant pressure simulations: N,P,T ensemble

Consider a small system that can exchange volume and energy with a large reservoir

,

ln lnln ln ,i i i i

V E

V V E E V E E VE V

,ln

,i i i i

B B

E E V V E pV

E V k T k T

1/kBT

Hence, the probability to find Ei,Vi:

, ,

exp,,

, exp

exp

i ii ii i

j k j kj k j k

i i

E pVE E V VP E V

E E V V E pV

E pV

,i iV E ,i

i

E E

V V

p/kBTThermo recall (4)

d d d + di iiE T S p V N

First law of thermodynamics

Hence

,T N

S p

V T

,

1=

V N

S

T E

and

Page 53: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Grand-canonical simulations: μ,V,T ensemble

Consider a small system that can exchange particles and energy with a large reservoir

,

lnlnln ln ,i i i i

N E

N N E E N E E NE N

,ln

,i i i i i

B B

E E N N E N

E N k T k T

1/kBT

Hence, the probability to find Ei,Ni:

, ,

exp,,

, exp

exp

i i ii ii i

j k j k kj k j k

i i i

E NE E N NP E N

E E N N E N

E N

,i iN E ,i

i

E E

N N

-μ/kBTThermo recall (5)

d d d + di iiE T S p V N

First law of thermodynamics

Hence

,

i

i T V

S

N T

,

1=

V N

S

T E

and

Page 54: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Computing transport coefficients from an EQUILIBRIUM simulation.

How?

Use linear response theory (i.e. study decay of fluctuations in an equilibrium system)

Linear response theory in 3 slides:

Page 55: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Consider the response of an observable A due to an external field fB that couples to an observable B:

For small fB we can linearize:

For simplicity, assume that

Page 56: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Hence

Now consider a weak field that is switched off at t=0.

fB

A

0t

Page 57: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Using exactly the same reasoning as in the static case, we find:

Page 58: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Simple example: Diffusion

Page 59: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Average total displacement:

Mean squared displacement:

Page 60: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Macroscopic diffusion equations

Fick’s laws:

(conservation law)

(constitutive law)

Page 61: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Combine:

Initial condition:

Solve:

Page 62: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Compute mean-squared width:

Page 63: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Integrating the left-hand side by parts:

Page 64: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Or:

This is how Einstein proposed to measure the diffusion coefficient of Brownian particles

Page 65: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 66: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale
Page 67: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

(“Green-Kubo relation”)

Page 68: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Other examples: shear viscosity

Page 69: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Other examples: thermal conductivity

Page 70: Molecular Simulation Background. Why Simulation? 1.Predicting properties of (new) materials 2.Understanding phenomena on a molecular scale

Other examples: electrical conductivity