Sie sind auf Seite 1von 247

Understanding

Molecular Simulations

Molsim 2012
Why Molecular Simulations

Molsim 2012
Why Molecular Simulations
Paul Dirac, after completing his formalism of quantum mechanics:

Molsim 2012
Why Molecular Simulations
Paul Dirac, after completing his formalism of quantum mechanics:

“The rest is chemistry…”.

Molsim 2012
Why Molecular Simulations
Paul Dirac, after completing his formalism of quantum mechanics:

“The rest is chemistry…”.

This is a heavy burden the shoulders of “chemistry”:

Molsim 2012
Why Molecular Simulations
Paul Dirac, after completing his formalism of quantum mechanics:

“The rest is chemistry…”.

This is a heavy burden the shoulders of “chemistry”:

The “rest” amounts to the quantitative description of the world around us


and the prediction of all every-day phenomena ranging from the
chemical reactions of small molecules to the integrated description of
living organisms.

Molsim 2012
Concept of Molecular Simulations

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system

Molsim 2012
Concept of Molecular Simulations

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system
We assume the
interactions between
the particles are known!

Molsim 2012
Concept of Molecular Simulations
Exact = in the limit of
infinitely long simulations the
error bars can be made
infinitely small

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system

Molsim 2012
Concept of Molecular Simulations

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system
Pressure
Heat capacity
Heat of adsorption
Structure
….

Molsim 2012
Concept of Molecular Simulations

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system

Diffusion coefficient
Viscosity

Molsim 2012
Concept of Molecular Simulations
If one could envision
an experimental
system of these
particles that interact
for a given intermolecular
potential
with the potential.
“exactly” predict the thermodynamic and
transport properties of the system

Molsim 2012
Concept of Molecular Simulations

for a given intermolecular potential


“exactly” predict the thermodynamic and
transport properties of the system

Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”

Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”
NEWTON says: yes, my F=ma gives
the future time evolution of the
system

Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”
NEWTON says: yes, my F=ma gives
the future time evolution of the
system

LAPLACE says: in principle yes,


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

Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”
NEWTON says: yes, my F=ma gives
the future time evolution of the
system

LAPLACE says: in principle yes,


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

BOLZMANN says: yes, just solve my phase space integral


(for static properties)

Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”
NEWTON says: yes, my F=ma gives
the future time evolution of the
system

LAPLACE says: in principle yes,


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

BOLZMANN says: yes, just solve my phase space integral


(for static properties)

both approaches should lead to the same results:


Molsim 2012
“Can we predict the
THE question: macroscopic properties of
(classical) many-body systems?”
NEWTON says: yes, my F=ma gives
the future time evolution of the
system

LAPLACE says: in principle yes,


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

BOLZMANN says: yes, just solve my phase space integral


(for static properties)

Molsim 2012
both approaches should lead to the same results: But......
.... there are so many molecules....

Molsim 2012
.... there are so many molecules....
...making these approaches untractable.
What was the alternative at the time ?

Molsim 2012
.... there are so many molecules....
...making these approaches untractable.
What was the alternative at the time ?

Molsim 2012
.... there are so many molecules....
...making these approaches untractable.
What was the alternative at the time ?

1. Smart tricks (“theory”)


Only works in special cases: the Ising model: the ideal gas, etc etc

Molsim 2012
.... there are so many molecules....
...making these approaches untractable.
What was the alternative at the time ?

1. Smart tricks (“theory”)


Only works in special cases: the Ising model: the ideal gas, etc etc

2. Constructing a model (“molecular lego”).

J.D. Bernal’s ball-bearing model Watson and Crick’s model of


Molsim 2012 of an atomic liquid DNA double helix
The computer age
The computer age (1953…)
Berni Alder

Mary-Ann Mansigh
Tom Wainwright

With computers we can follow the behavior of hundreds to


Withhundreds
computers of we can follow
millions the behavior of hundreds to hundreds
of molecules.
of millions of molecules.
Molsim 2012
Increment of power since 1950’s

Molsim 2012
Performance
Super Development
computer performance development
!"%%4'()*+,%
100 Pflop/s
100000000
10 Pflop/s 2#3%4'()*+,%
10000000

1 Pflop/s
1000000

100 Tflop/s 56/%


100000 -0%1'()*+,%

10 Tflop/s
10000 780%
1 Tflop/s 0#0$%1'()*+,%
1000 6-8 years

100 Gflop/s
100 78!..%
!"#$%&'()*+,%
My Laptop (12 Gflop/s)
10 Gflop/s
10
1 Gflop/s My iPad2 & iPhone 4s (1.02 Gflop/s)
1
-..%/'()*+,%
100 Mflop/s
0.1          

Molsim 2012
Speed of MD simulations
1012
Psec/atom/CPU h

106

1
1950 1970 1990 2010
Molsim 2012
Speed of MD simulations
1012
ab-initio MD is
invented
Psec/atom/CPU h

106

1
1950 1970 1990 2010
Molsim 2012
Uses of Molecular Simulations

Molsim 2012
Uses of Molecular Simulations
• Mimic the real world:
– Predicting properties of (new) materials
– Computer ‘experiments’ at extreme conditions
– Understanding phenomena on a molecular scale

Molsim 2012
Uses of Molecular Simulations
• Mimic the real world:
– Predicting properties of (new) materials
– Computer ‘experiments’ at extreme conditions
– Understanding phenomena on a molecular scale

• Model systems
– test theory using same simple model
– explore consequences of model
– explain poorly understood phenomena in terms of
essential physics

Molsim 2012
Properties of materials
Critical properties of long chain hydrocarbons

Molsim 2012
Properties of materials
Critical properties of long chain hydrocarbons

To predict the thermodynamic properties (boiling points)


of the hydrocarbon mixtures it is convenient to know the critical
points of the hydrocarbons.
Molsim 2012
Hydrocarbons intermolecular potential

United-atom model CH2 CH2


– Fixed bond length
CH3
– Bond-bending CH2 CH3
– Torsion
– Non-bonded: Lennard-Jones

Molsim 2012
Vapour-liquid
equilibria

13
Molsim 2012
Vapour-liquid
equilibria
Computational issues:

13
Molsim 2012
Vapour-liquid
equilibria
Computational issues:
• How to compute
vapour-liquid
equilibrium?

13
Molsim 2012
Vapour-liquid
equilibria
Computational issues:
• How to compute
vapour-liquid
equilibrium?
• How to deal with long
chain hydrocarbons?

13
Molsim 2012
Vapour-liquid
equilibria
Course on Free Computational issues:
Energies and Phase • How to compute
Equilibrium vapour-liquid
equilibrium?
• How to deal with long
chain hydrocarbons?

13
Molsim 2012
Vapour-liquid
equilibria
Course on Free Computational issues:
Energies and Phase • How to compute
Equilibrium vapour-liquid
equilibrium?
• How to deal with long
chain hydrocarbons?
Course on CBMC:
configurational-bias
Monte Carlo

13
Molsim 2012
Properties at extreme conditions
• Carbon phase behavior at very high pressure and temperature
• Empirical pair potential depending on carbon coordination

coordination number

Molsim 2012
Properties at extreme conditions
• Carbon phase behavior at very high pressure and temperature
• Empirical pair potential depending on carbon coordination

coordination number

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

Course on MD

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

• Transition path sampling

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

• Transition path sampling

Course on
rare events

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

• Transition path sampling

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

• Transition path sampling

Molsim 2012
Understand molecular processes
• Protein conformational change with Molecular dynamics
• Empirical potential, including bonds, angles dihedrals

• Transition path sampling

Leads to insight and


new hypotheses
Molsim 2012
Testing theories with simple models

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids
MAYBE NOT:
– These theories do not apply to solids

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids
MAYBE NOT:
– These theories do not apply to solids
HOWEVER:
– There no are molecules with only repulsive interactions

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids
MAYBE NOT:
– These theories do not apply to solids
HOWEVER:
– There no are molecules with only repulsive interactions
So how to test the hypothesis that molecules with only repulsive
interaction can freeze?

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids
MAYBE NOT:
– These theories do not apply to solids
HOWEVER:
– There no are molecules with only repulsive interactions
So how to test the hypothesis that molecules with only repulsive
interaction can freeze?

Molsim 2012
Testing theories with simple models
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase?
YES:
– Because theories (up to then) predict that attractions are needed for vapour-
liquid equilibrium and thus why not for solids
MAYBE NOT:
– These theories do not apply to solids
HOWEVER:
– There no are molecules with only repulsive interactions
So how to test the hypothesis that molecules with only repulsive
Your hypothesis
interaction is
can freeze?
WRONG it disagrees
with the experiments

Molsim 2012
Testing theories with simple models
My hypothesis is
In the 1950‘s an important question arose: Is an attractive interaction
always required to form a solid phase? RIGHT: but this
YES: experimentalist refuses
to usearemolecules
– Because theories (up to then) predict that attractions that
needed for vapour-
liquid equilibrium and thus why not for solids do not have any
MAYBE NOT: attractive interactions
– These theories do not apply to solids
HOWEVER:
– There no are molecules with only repulsive interactions
So how to test the hypothesis that molecules with only repulsive
Your hypothesis
interaction is
can freeze?
WRONG it disagrees
with the experiments

Molsim 2012
Simulation of hard spheres

An older Alder

Molsim 2012
Simulation of hard spheres

• Bernie Alder et al. carried out


Molecular Dynamics simulations of
the freezing of hard spheres

An older Alder

Molsim 2012
Simulation of hard spheres

• Bernie Alder et al. carried out


Molecular Dynamics simulations of
the freezing of hard spheres
• But, …. did the scientific
community accept this computer
results as evidence …?

An older Alder

Molsim 2012
Simulation of hard spheres

• Bernie Alder et al. carried out


Molecular Dynamics simulations of
the freezing of hard spheres
• But, …. did the scientific
community accept this computer
results as evidence …?
• … during a New Jersey conference
in 1957 it was proposed to vote on
it …

An older Alder

Molsim 2012
Simulation of hard spheres

• Bernie Alder et al. carried out


Molecular Dynamics simulations of
the freezing of hard spheres
• But, …. did the scientific
community accept this computer
results as evidence …?
• … during a New Jersey conference
in 1957 it was proposed to vote on
it …
• … and it was voted against the
results of Alder!
An older Alder

Molsim 2012
Experiments are now possible
.. not on molecules but on colloids

from :Yethiraj and van Blaaderen


Nature 421, 513-517 (2003)

and show that hard spheres indeed crystallize at high density

Molsim 2012
Explore consequences of model
• Trans membrane peptides

• Coarse-grained model of a membrane to study the interactions


between peptides in a membrane

Molsim 2012
Explore consequences of model
• Trans membrane peptides

• Coarse-grained model of a membrane to study the interactions


between peptides in a membrane
Course on
coarse graining

Molsim 2012
Explore consequences of model
• Trans membrane peptides

• Coarse-grained model of a membrane to study the interactions


between peptides in a membrane

Molsim 2012
Explore consequences of model
• Trans membrane peptides

• Coarse-grained model of a membrane to study the interactions


between peptides in a membrane

Molsim 2012
Understanding in terms of essential physics

Molsim 2012
Understanding in terms of essential physics
• Protein folding is complex:
explicit MD intractable

Molsim 2012
Understanding in terms of essential physics
• Protein folding is complex:
explicit MD intractable

• Make simple lattice model with


essential physics of proteins
– polymer connectivity
– heteropolymer sequence
– attraction/repulsion

Molsim 2012
Understanding in terms of essential physics
• Protein folding is complex:
explicit MD intractable

• Make simple lattice model with


essential physics of proteins
– polymer connectivity
– heteropolymer sequence
– attraction/repulsion

Molsim 2012
Understanding in terms of essential physics
• Protein folding is complex:
explicit MD intractable

• Make simple lattice model with


essential physics of proteins
– polymer connectivity
– heteropolymer sequence
– attraction/repulsion

• MC simulation yields understanding

Molsim 2012
Understanding in terms of essential physics
• Protein folding is complex:
explicit MD intractable

• Make simple lattice model with


essential physics of proteins
– polymer connectivity
– heteropolymer sequence
– attraction/repulsion

• MC simulation yields understanding

Course on
lattice models

Molsim 2012
The limits of Molecular Simulation
• Brute-force simulations can never bridge all the scales between
microscopic (nanometers/picoseconds) and macroscopic (cells,
humans, planets).

• Need different levels of


description (“coarse
graining”) - and we need
input from experiments
at many different levels
to validate our models.

Molsim 2012
The limits of experiments

Molsim 2012
The limits of experiments
• Increasingly, experiments generate far more data than humans can digest.

Molsim 2012
The limits of experiments
• Increasingly, experiments generate far more data than humans can digest.

• Result: “Experulation” or “Simuriment”.

Molsim 2012
The limits of experiments
• Increasingly, experiments generate far more data than humans can digest.

• Result: “Experulation” or “Simuriment”.

• Simulations are becoming an integral part of the analysis of experimental


data.

Molsim 2012
Understanding Molecular Simulation
Molecular simulations are based on the framework of statistical
mechanics/thermodynamics

Hence:

Molsim 2012
Understanding Molecular Simulation
Molecular simulations are based on the framework of statistical
mechanics/thermodynamics

Hence:

An introduction
(or refresher) of
Statistical
Thermodynamics

Molsim 2012
Outline
• Basic Assumption
– micro-canonical ensemble
– relation to thermodynamics

• Canonical ensemble
– free energy
– thermodynamic properties

• Other ensembles
– constant pressure
– grand-canonical ensemble

Molsim 2012
Statistical Thermodynamics: the basics

Molsim 2012
Statistical Thermodynamics: the basics
• Nature is quantum-mechanical

Molsim 2012
Statistical Thermodynamics: the basics
• Nature is quantum-mechanical

• Consequence:
– Systems have discrete quantum states.
– For finite “closed” systems, the number of states is finite (but usually
very large)

Molsim 2012
Statistical Thermodynamics: the basics
• Nature is quantum-mechanical

• Consequence:
– Systems have discrete quantum states.
– For finite “closed” systems, the number of states is finite (but usually
very large)

• Hypothesis: In a closed system, every state is equally likely to be


observed.

Molsim 2012
Statistical Thermodynamics: the basics
• Nature is quantum-mechanical

• Consequence:
– Systems have discrete quantum states.
– For finite “closed” systems, the number of states is finite (but usually
very large)

• Hypothesis: In a closed system, every state is equally likely to be


observed.

• Consequence:
ALL of equilibrium Statistical Mechanics and Thermodynamics

Molsim 2012
Simpler example: standard statistics
First: Simpler example (standard statistics)
Draw N balls from an infinite vessel that contains an equal
Draw of
number N red
ballsand
from an balls
blue infinite vessel that contains an
equal number of red and blue balls

! !

Molsim 2012
1.0

0.8

0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

NR/N

Molsim 2012
1.0

0.8 N=10
0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

NR/N

Molsim 2012
1.0

N=100
0.8 N=10
0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

NR/N

Molsim 2012
N=1000
1.0

N=100
0.8 N=10
0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

NR/N

Molsim 2012
N=1000
N=10000
1.0

N=100
0.8 N=10
0.6

0.4

0.2

0.2 0.4 0.6 0.8 1.0

NR/N

Molsim 2012
Molecular consequence of
basic assumption

Molsim 2012
Molecular consequence of
Each individual
microstate is equally
probable basic assumption

Molsim 2012
Molecular consequence
Each individual
microstate is equally
of
…, but there are not many
microstates that give these
probable basic assumption extreme results

Molsim 2012
Molecular consequence
Each individual
microstate is equally
of
…, but there are not many
microstates that give these
probable basic assumption extreme results

If the number of particles


is large (>100) the
probability functions for
these states are sharply
peaked
Molsim 2012
Does the basis assumption lead to something that is
consistent with classical thermodynamics?

Molsim 2012
Does the basis assumption lead to something that is
consistent with classical thermodynamics?
Systems 1 and 2 are weakly coupled
such that they can exchange energy.

What will be E1?

Molsim 2012
Does the basis assumption lead to something that is
consistent with classical thermodynamics?
Systems 1 and 2 are weakly coupled
such that they can exchange energy.

What will be E1?

Molsim 2012
Does the basis assumption lead to something that is
consistent with classical thermodynamics?
Systems 1 and 2 are weakly coupled
such that they can exchange energy.

What will be E1?

BA: each configuration is equally probable; but the number of states that
give an energy E1 is not (yet) known.

Molsim 2012
Does the basis assumption lead to something that is
consistent with classical thermodynamics?
Systems 1 and 2 are weakly coupled
such that they can exchange energy.

What will be E1?

BA: each configuration is equally probable; but the number of states that
give an energy E1 is not (yet) known.

The most likely E1, is the E1 that maximizes Ω1(E1)x Ω2(E-E1)


Molsim 2012
Molsim 2012
Molsim 2012
Molsim 2012
Molsim 2012
( )
⎛ ∂ ln Ω1 E1 ⎞ ( )
⎛ ∂ ln Ω2 E − E1 ⎞
+ ⎜ =0
⎜ ⎟ ⎟
⎝ ∂E1 ⎠ N ,V ⎝ ∂E1 ⎠ N
1 1 2 ,V2

Molsim 2012
Energy is conserved!
dE1=-dE2

( )
⎛ ∂ ln Ω1 E1 ⎞ ( )
⎛ ∂ ln Ω2 E − E1 ⎞
+ ⎜ =0
⎜ ⎟ ⎟
⎝ ∂E1 ⎠ N ,V ⎝ ∂E1 ⎠ N
1 1 2 ,V2

Molsim 2012
Energy is conserved!
dE1=-dE2

( )
⎛ ∂ ln Ω1 E1 ⎞ ( )
⎛ ∂ ln Ω2 E − E1 ⎞
+ ⎜ =0
⎜ ⎟ ⎟
⎝ ∂E1 ⎠ N ,V ⎝ ∂E1 ⎠ N
1 1 2 ,V2

Molsim 2012
Energy is conserved!
dE1=-dE2

( )
⎛ ∂ ln Ω1 E1 ⎞ ( )
⎛ ∂ ln Ω2 E − E1 ⎞
+ ⎜ =0
⎜ ⎟ ⎟
⎝ ∂E1 ⎠ N ,V ⎝ ∂E1 ⎠ N
1 1 2 ,V2

This can be seen as an


equilibrium condition

Molsim 2012
Energy is conserved!
dE1=-dE2

( )
⎛ ∂ ln Ω1 E1 ⎞ (
⎛ ∂ ln Ω2 E − E1 ⎞
+ ⎜
) =0
⎜ ⎟ ⎟
⎝ ∂E1 ⎠ N ,V ⎝ ∂E1 ⎠ N
1 1 2 ,V2

This can be seen as an


equilibrium condition

Indeed this is the condition for thermal equilibrium:


“no spontaneous heat flow between 1 and 2”
Molsim 2012
Normally, thermal equilibrium means: equal temperatures

Let us define:

Molsim 2012
Normally, thermal equilibrium means: equal temperatures

Let us define:

Molsim 2012
Normally, thermal equilibrium means: equal temperatures

Let us define:

Then, thermal equilibrium is equivalent to:

This suggests that β is a function of T.

Molsim 2012
Relation to thermodynamics
Conjecture:

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…)

Molsim 2012
Relation to thermodynamics
Conjecture:

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…)

Molsim 2012
We have to live with the past, therefore

With kB= 1.380662 10-23 J/K

Molsim 2012
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

Molsim 2012
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

Molsim 2012
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
n
dE = TdS-pdV + ∑ µi dN i
i =1

Molsim 2012
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

Molsim 2012
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):

Molsim 2012
And this gives the “statistical” definition of temperature:

with
1
β=
kB T

Molsim 2012
And this gives the “statistical” definition of temperature:

with
1
β=
kB T
In short:
Entropy and temperature are both related
to the fact that we can COUNT states.

Molsim 2012
Number of configurations

35

Molsim 2012
Number of configurations

How large is Ω?

35

Molsim 2012
Number of configurations

How large is Ω?
For macroscopic systems, super-astronomically large.

35

Molsim 2012
Number of configurations

How large is Ω?
For macroscopic systems, super-astronomically large.
For instance, for a glass of water at room temperature:

35

Molsim 2012
Number of configurations

How large is Ω?
For macroscopic systems, super-astronomically large.
For instance, for a glass of water at room temperature:

35

Molsim 2012
Number of configurations

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.

35

Molsim 2012
Deviation from the 2nd law?
What is the probability that 1 mole of argon gas spontaneously lowers it
entropy by 0.00000001% (=10-10) ?

standard molar entropy of argon : Sargon =307.2 J/K mol-1


slightly lower entropy Sargon,low =307.2 (1 - 10-10) J/K mol-1

probability of occurrence is

Molsim 2012
Deviation from the 2nd law?
What is the probability that 1 mole of argon gas spontaneously lowers it
entropy by 0.00000001% (=10-10) ?

standard molar entropy of argon : Sargon =307.2 J/K mol-1


slightly lower entropy Sargon,low =307.2 (1 - 10-10) J/K mol-1

probability of occurrence is
� � � −8

Ωargon,low Sargon,low − Sargon −3.07 × 10 −1015
P ≈ = exp = exp ≈ 10
Ωargon kB 1.38 × 10−23

Molsim 2012
Deviation from the 2nd law?
What is the probability that 1 mole of argon gas spontaneously lowers it
entropy by 0.00000001% (=10-10) ?

standard molar entropy of argon : Sargon =307.2 J/K mol-1


slightly lower entropy Sargon,low =307.2 (1 - 10-10) J/K mol-1

probability of occurrence is
� � � −8

Ωargon,low Sargon,low − Sargon −3.07 × 10 −1015
P ≈ = exp = exp ≈ 10
Ωargon kB 1.38 × 10−23

A mathematical relation : 10-1015 ≠ 0

A physical relation : 10-1015 = 0

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Molsim 2012
Canonical ensemble 1/kBT

Consider a small system that can exchange heat with a big reservoir

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Partition�
function:
Hence, the probability to find Ei: Q= exp(−Ej /kB T )
j

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

Boltzmann distribution
Molsim 2012
Canonical ensemble
Consider a small system that can exchange heat with a big reservoir

Hence, the probability to find Ei:

“Low energies are more likely than high energies”


Molsim 2012
Thermodynamics
What is the average energy of the system?

Molsim 2012
Thermodynamics
What is the average energy of the system?

Molsim 2012
Thermodynamics
What is the average energy of the system?

Molsim 2012
Thermodynamics
What is the average energy of the system?

Molsim 2012
Thermodynamics
What is the average energy of the system?

Compare:

Molsim 2012
Thermodynamics
Thermo recall
What is the average energy ofequation
Fundamental the system?

Helmholtz Free energy:

Compare:

Molsim 2012
Thermodynamics
What is the average energy of the system?

Compare:

Hence:

Molsim 2012
The classical limit
We have assume quantum mechanics (discrete states) but
we are interested in the classical limit

Particles are indistinguishable

N
“volume of phase space”

Why does planck constant appear?

Molsim 2012
Appearance of Plank’s constant?
Easiest to look at translation partition function Qx of particle in 1D box
1 2 p2 p= momentum
"trans = mv = m=mass
2 2m
Postulate quantum mechanics: p=h/λ met h Planck’s constant
Particle is standing wave with length
!

Molsim 2012
Appearance of Plank’s constant?
Easiest to look at translation partition function Qx of particle in 1D box
1 2 p2 p= momentum
"trans = mv = m=mass
2 2m
Postulate quantum mechanics: p=h/λ met h Planck’s constant
Particle is standing wave with length
! 2
2L p 2 ( h / #) n 2h 2
"= "trans = = =
n 2m 2m 8mL2

! !

Molsim 2012
Appearance of Plank’s constant?
Easiest to look at translation partition function Qx of particle in 1D box
1 2 p2 p= momentum
"trans = mv = m=mass
2 2m
Postulate quantum mechanics: p=h/λ met h Planck’s constant
Particle is standing wave with length
! 2
2L p 2 ( h / #) n 2h 2
"= "trans = = =
n 2m 2m 8mL2
" " $ ! n2h2 '
Qx = # exp(!!"trans ) = # exp & ! 2 )
n=1 n=1 % 8mL (
! !

Molsim 2012
Appearance of Plank’s constant?
Easiest to look at translation partition function Qx of particle in 1D box
1 2 p2 p= momentum
"trans = mv = m=mass
2 2m
Postulate quantum mechanics: p=h/λ met h Planck’s constant
Particle is standing wave with length
! 2
2L p 2 ( h / #) n 2h 2
"= "trans = = =
n 2m 2m 8mL2
" $ ! n2h2 ' "
Qx = # exp(!!"trans ) = # exp & ! 2 )
n=1 n=1 % 8mL (
! !
" ! ! n 2 h 2 /(8mL2 ) L 2" m
Qx = # 1
dne =
h !

Molsim 2012
Appearance of Plank’s constant?
Easiest to look at translation partition function Qx of particle in 1D box
1 2 p2 p= momentum
"trans = mv = m=mass
2 2m
Postulate quantum mechanics: p=h/λ met h Planck’s constant
Particle is standing wave with length
! 2
2L p 2 ( h / #) n 2h 2
"= "trans = = =
n 2m 2m 8mL2
" $ ! n2h2 ' "
Qx = # exp(!!"trans ) = # exp & ! 2 )
n=1 n=1 % 8mL (
! !
" ! ! n 2 h 2 /(8mL2 ) L 2" m
Qx = # 1
dne =
h !

now compare
� � to classical integration without Planck’s constant
� �
2 2
p p 2πm
Qx = dpdr exp(−β + U (r)) = L dp exp(−β )=L
2m 2m β
factor of h is missing for each degree of freedom.
Molsim 2012
The classical limit
We have assume quantum mechanics (discrete states) but
we are interested in the classical limit

Particles are indistinguishable

N
Volume of phase space (particle in a box)

Molsim 2012
The classical limit
We have assume quantum mechanics (discrete states) but
we are interested in the classical limit

Particles are indistinguishable

N
Volume of phase space (particle in a box)

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

Molsim 2012
The classical limit

Molsim 2012
The classical limit

Define de Broglie wavelength:

Molsim 2012
The classical limit

Define de Broglie wavelength:

Partition function:

Molsim 2012
Example: ideal gas

Molsim 2012
Example: ideal gas

Molsim 2012
Example: ideal gas

Molsim 2012
Example: ideal gas

Free energy:

! N ln " 3 # N lnV + N ln N # N

Molsim 2012
Example: ideal gas

Free energy:

! N ln " 3 # N lnV + N ln N # N

! F = N ( ln( !! 3 ) "1) with density ρ=N/V

Molsim 2012
Example: ideal gas
Thermo recall

Helmholtz Free energy:

Free energy: Pressure

! N ln " 3 # N lnV + N ln N # N

(
! F = NEnergy:
ln( !! 3
) "1) with density ρ=N/V

Molsim 2012
Example: ideal gas

Free energy:

! N ln " 3 # N lnV + N ln N # N

! F = N ( ln( !! 3 ) "1) with density ρ=N/V

Molsim 2012
Example: ideal gas

Free energy:

! N ln " 3 # N lnV + N ln N # N

! F = N ( ln( !! 3 ) "1) with density ρ=N/V

Pressure:

Molsim 2012
Example: ideal gas

Free energy:

! N ln " 3 # N lnV + N ln N # N

! F = N ( ln( !! 3 ) "1) with density ρ=N/V

Pressure: Energy:

Molsim 2012
Ideal gas (2)
⎛ ∂F ⎞
Chemical potential: µi = ⎜ ⎟
∂N
⎝ i ⎠ T ,V , N j

Molsim 2012
Ideal gas (2)
⎛ ∂F ⎞
Chemical potential: µi = ⎜ ⎟
∂N
⎝ i ⎠ T ,V , N j

! F = N ( ln( !! ) "1)
3
with density ρ=N/V

Molsim 2012
Ideal gas (2)
⎛ ∂F ⎞
Chemical potential: µi = ⎜ ⎟
∂N
⎝ i ⎠ T ,V , N j

! F = N ( ln( !! ) "1)
3
with density ρ=N/V

!µ = ln ! 3 + ln "

Molsim 2012
Ideal gas (2)
⎛ ∂F ⎞
Chemical potential: µi = ⎜ ⎟
∂N
⎝ i ⎠ T ,V , N j

! F = N ( ln( !! ) "1)
3
with density ρ=N/V

!µ = ln ! 3 + ln "

IG 0
βµ = βµ + ln ρ

Molsim 2012
Heat capacity from energy fluctuation

!! E $ ! ! E $ ! !" $
CV = # & = # & # &
" ! T %V ,N " !" %V ,N " ! T %

Molsim 2012
Heat capacity from energy fluctuation

!! E $ ! ! E $ ! !" $ 2
"! E %
CV = # & = # & # & kBT CV = ! $ '
" ! T %V ,N " !" %V ,N " ! T % # !" &V ,N

Molsim 2012
Heat capacity from energy fluctuation

!! E $ ! ! E $ ! !" $ 2
"! E %
CV = # & = # & # & kBT CV = ! $ '
" ! T %V ,N " !" %V ,N " ! T % # !" &V ,N

" E exp(!! E )
i i
i
E =
" exp(!! E ) i
i

Molsim 2012
Heat capacity from energy fluctuation

!! E $ ! ! E $ ! !" $ 2
"! E %
CV = # & = # & # & kBT CV = ! $ '
" ! T %V ,N " !" %V ,N " ! T % # !" &V ,N

!
" E exp(!" E )
i i
kBT 2CV =! i
!" " exp(!" E ) i
i
2
" E exp(!" Ei ) #% " Ei exp(!" Ei ) &(
i
2

= i !% i (
" exp(! " Ei ) % " exp(! " Ei ) (
i $ i '
2 2 2
= E ! E = (E ! E )
Molsim 2012
Heat capacity from energy fluctuation

!! E $ ! ! E $ ! !" $ 2
"! E %
CV = # & = # & # & kBT CV = ! $ '
" ! T %V ,N " !" %V ,N " ! T % # !" &V ,N

!
" E exp(!" E )
i i
kBT 2CV =! i
!" " exp(!" E ) i
i
2
" E exp(!" Ei ) #% " Ei exp(!" Ei ) &(
i
2
P(E) fluctuation in E
= i !% i ( grows as 1/√N
" exp(! " Ei ) % " exp(! " Ei ) (
i $ i '
2 2 2
= E ! E = (E ! E )
Molsim 2012
!"
Computing the pressure
∂F
P =−
∂V
F = −kT ln Q

Introduce “scaled” coordinates:

Introduce scaled coordinates

Molsim 2012
Computing the pressure

Molsim 2012
Molsim 2012
Free energy derivative can be written as ensemble average!
Molsim 2012
For pairwise additive forces:

Then

Molsim 2012
i and j are dummy variable hence:

And we can write

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

And hence

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

Where
This is known as the virial expression
Molsim 2012
What
Whatdo youif do
to do youif cannot
you can’t
useuse
the the virial
virial expression?
expression?

This will be the case e.g. with discontinuous potentials.

Molsim 2012
Summary:
micro-canonical ensemble (N,V,E)

Molsim 2012
Summary:
micro-canonical ensemble (N,V,E)
Partition function:

Molsim 2012
Summary:
micro-canonical ensemble (N,V,E)
Partition function:

Probability to find a particular configuration

Molsim 2012
Summary:
micro-canonical ensemble (N,V,E)
Partition function:

Probability to find a particular configuration

Entropy

S = kB lnQN,V ,E
Molsim 2012
Summary:
Canonical ensemble (N,V,T)

Molsim 2012
Summary:
Canonical ensemble (N,V,T)
Partition function:

Molsim 2012
Summary:
Canonical ensemble (N,V,T)
Partition function:

Probability to find a particular configuration

Molsim 2012
Summary:
Canonical ensemble (N,V,T)
Partition function:

Probability to find a particular configuration

Free energy

Molsim 2012
Ensemble averages
For properties that only depend on the configurational part

Molsim 2012
Ensemble averages
For properties that only depend on the configurational part

Probability to find a configuration:

Molsim 2012
Ensemble averages
For properties that only depend on the configurational part

Probability to find a configuration:

1
P(!) = exp ["!U(!)]
Q

Molsim 2012
Ensemble averages
For properties that only depend on the configurational part

Probability to find a configuration:

1
P(!) = exp ["!U(!)]
Q
Ensemble average:

A = " d!A(!)P(!)

Molsim 2012
Ergodicity theorem
suppose we have an ensemble average of a system defined by U(Γ) obtained by MC

Now suppose we have a NVT molecular dynamics trajectory for the same system
A time average over the trajectory is simply

Molsim 2012
Ergodicity theorem
suppose we have an ensemble average of a system defined by U(Γ) obtained by MC

Now suppose we have a NVT molecular dynamics trajectory for the same system
A time average over the trajectory is simply

Ergodicity theorem states that for an ‘ergodic system’

Molsim 2012
Ergodicity theorem
suppose we have an ensemble average of a system defined by U(Γ) obtained by MC

Now suppose we have a NVT molecular dynamics trajectory for the same system
A time average over the trajectory is simply

Ergodicity theorem states that for an ‘ergodic system’

MC and MD give the same averages


Molsim 2012
Other ensembles?

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties are
independent of the ensemble: so buy a bigger computer …

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties are
independent of the ensemble: so buy a bigger computer …

However, it is most of the times much better to think and to carefully


select an appropriate ensemble.

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties are
independent of the ensemble: so buy a bigger computer …

However, it is most of the times much better to think and to carefully


select an appropriate ensemble.

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

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties
Course on are
independent of the ensemble: so buy a bigger
MDcomputer
and MC in…
different ensembles
However, it is most of the times much better to think and to carefully
select an appropriate ensemble.

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

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties are
independent of the ensemble: so buy a bigger computer …

However, it is most of the times much better to think and to carefully


select an appropriate ensemble.

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

Molsim 2012
Other ensembles?
In the thermodynamic limit the thermodynamic properties are
independent of the ensemble: so buy a bigger computer …

However, it is most of the times much better to think and to carefully


select an appropriate ensemble.

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

But for doing this we need to know the Statistical Thermodynamics


of the various ensembles.

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble
1/kBT p/kBT
Consider a small system that can exchange volume
and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble
Thermo recall
1/kBT p/kBT
Fundamental equation
Consider a small system that can exchange volume
and energy with a big reservoir

Hence

and

Molsim 2012
Constant pressure simulations:
N,P,T ensemble
1/kBT p/kBT
Consider a small system that can exchange volume
and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Hence, the probability to find Ei,Vi:

Molsim 2012
Constant pressure simulations:
N,P,T ensemble

Consider a small system that can exchange volume


and energy with a big reservoir

Hence, the probability to find Ei,Vi:

Molsim 2012
N,P,T ensemble (2)
In the classical limit, the partition function becomes

Molsim 2012
N,P,T ensemble (2)
In the classical limit, the partition function becomes

Molsim 2012
N,P,T ensemble (2)
In the classical limit, the partition function becomes

The probability to find a particular configuration:

Molsim 2012
N,P,T ensemble (2)
In the classical limit, the partition function becomes

The probability to find a particular configuration:

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble
1/kBT
Consider a small system that can exchange particles
and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble
-µ/kBT
1/kBT
Consider a small system that can exchange particles
and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble
Thermo recall
-µ/kBT
1/kBT
Fundamental equation
Consider a small system that can exchange particles
and energy with a big reservoir

Hence

and

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble
-µ/kBT
1/kBT
Consider a small system that can exchange particles
and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Hence, the probability to find Ei,Ni:

Molsim 2012
Grand-canonical simulations:
µ,V,T ensemble

Consider a small system that can exchange particles


and energy with a big reservoir

Hence, the probability to find Ei,Ni:

Molsim 2012
µ,V,T ensemble (2)
In the classical limit, the partition function becomes

Molsim 2012
µ,V,T ensemble (2)
In the classical limit, the partition function becomes

Molsim 2012
µ,V,T ensemble (2)
In the classical limit, the partition function becomes

The probability to find a particular configuration:

Molsim 2012
Summary

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

• At constant temperature Boltzmann distribution follows:


canonical ensemble

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

• At constant temperature Boltzmann distribution follows:


canonical ensemble

• other ensembles are isobaric and grand canonical ensembles

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

• At constant temperature Boltzmann distribution follows:


canonical ensemble

• other ensembles are isobaric and grand canonical ensembles

• MD and MC are two roads to the same equilibrium answer: ergodicity

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

• At constant temperature Boltzmann distribution follows:


canonical ensemble

• other ensembles are isobaric and grand canonical ensembles

• MD and MC are two roads to the same equilibrium answer: ergodicity

• MD also gives dynamical properties (viscosity, diffusion etc)

Molsim 2012
Summary
• Molecular simulation is firmly rooted in equilibrium statistical
mechanics/thermodynamics

• Basis of statistical thermodynamics: configurations with same energy


are equally likely: microcanonical ensemble

• At constant temperature Boltzmann distribution follows:


canonical ensemble

• other ensembles are isobaric and grand canonical ensembles

• MD and MC are two roads to the same equilibrium answer: ergodicity

• MD also gives dynamical properties (viscosity, diffusion etc)

• Rest of the week: MC and MD in depth.

Molsim 2012
The end

Molsim 2012

Das könnte Ihnen auch gefallen