Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy,...

50
Computing free energy: thermodynamic integration(s)

Transcript of Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy,...

Page 1: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Computingfree energy:

thermodynamic integration(s)

Page 2: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Extending the scale

Essentials of computational chemistry: theories and models. 2nd edition.C. J. Cramer, JohnWiley and Sons Ltd (West Sussex, 2004).Ab initio atomistic thermodynamics and statistical mechanics of surface properties and functionsK. Reuter, C. Stampfl, and M. Scheffler, in: Handbook of Materials Modeling Vol. 1, (Ed.) S. Yip, Springer (Berlin, 2005). http://www.fhi-berlin.mpg.de/th/paper.html

{Ri}

E

Potential Energy Surface: {Ri}

(3N+1)­dimensional

10­9

10­6

10­3

1

10­15 10­9 10­3 1

Length(m)

Time (s)

Microscopicregime

Mesoscopicregime

Macroscopicregime

few processes

few atoms

many atoms

many processes

continuum

average overall processes

more deta

ils

more proce

sses

Thermodynamics:p, T, V, N

Page 3: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

(in this page, Helmholtz free energy, F(N,V,T))

if we can calculate E and write analytically on approximation for S for our system, we use this expression. Example: ab initio atomistic thermodynamics.

Ab initio

or similar derivatives that yield measurable quantities (in a computer simulation): one can estimate the free energy by integrating such relations. This is the class of the so called thermodynamic­integration methods.

Thermodynamics

Thermodynamic Integration

Ab initio

Free energy, one quantity, many definitions

Page 4: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Classical statistics (for nuclei):

● Fundamental statistical mechanics   thermodynamics link↔

Ab initioAb initio

● Probabilistic interpretation of free energy

Free energy, one quantity, many definitions

Page 5: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free­energy evaluation: 

­ Harmonic approximation (solids)

­ Thermodynamic integration. Phase diagrams

­ Thermodynamics perturbation (overlap, umbrella sampling)

­ Accelerated sampling, metadynamics.

­ Replica Exchange MD, free energy from probability

Outline

Page 6: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free­energy evaluation: 

­ Harmonic approximation (solids)

­ Thermodynamic integration. Phase diagrams

­ Thermodynamics perturbation (overlap, umbrella sampling)

­ Accelerated sampling, metadynamics.

­ Replica Exchange MD, free energy from probability

Outline

Page 7: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 8: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 9: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 10: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

The harmonic solid

Page 11: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

The harmonic solid

Page 12: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

The harmonic solid

Page 13: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

The harmonic solid: low temperature phases of ZrO2

Page 14: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 15: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 16: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 17: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 18: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free­energy evaluation: 

­ Harmonic approximation (solids)

­ Thermodynamic integration. Phase diagrams

­ Thermodynamics perturbation (overlap, umbrella sampling)

­ Accelerated sampling, metadynamics.

­ Replica Exchange MD, free energy from probability

Outline

Page 19: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

The problem of free energy sampling

Page 20: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Solutions:

1. “physical”-path thermodynamics integration

2. “unphysical”-path thermodynamics integration (after Kirkwood)

The problem of free energy sampling

Page 21: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free energy “physical”­path thermodynamics integration

Page 22: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free energy “physical”­path thermodynamics integration

Page 23: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free energy “unphysical”­path thermodynamics integration

Page 24: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free energy “unphysical”­path thermodynamics integration

Page 25: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Free energy “unphysical”­path thermodynamics integration

Example of application: ­ ZrO2 phase diagram (only temperature)­ Carbon (temperature, pressure) phase diagram

Page 26: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 27: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Phase diagram of ZrO2

Page 28: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Case study: phase diagram of pure carbon

Road map:

● Calculation  of  change  of  Helmoltz  free  energy  from  chosen reference  state  to  a  particular  (T,p)  point,  for  each  involved  phase (overlooked phases?), by means of thermodynamics integration.

● Search for of all coexistence points at a given T between all pairs of phases, via integration of equations of state P(ρ) and evaluation of crossing points (alternative: common tangent construction). 

● Prolongation of coexistence line by Gibbs­Duhem integration

Page 29: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Reference phasesLiquid: Lennard Jones

Considered phases: diamond, graphite, and liquid(s)

σ, ε ? Maximum resemblance of LJ liquid and “real”: alignment radial distribution function peaks

Case study: phase diagram of pure carbon

Page 30: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Reference phasesLiquid: Lennard Jones

Considered phases: diamond, graphite, and liquid(s)

σ, ε ? Maximum resemblance of LJ liquid and “real”: alignment radial distribution function peaks

Case study: phase diagram of pure carbon

Page 31: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

α? Maximum resemblance of harmonic and “real” potential

Case study: phase diagram of pure carbon

Reference phasesSolid(s): Einstein solid

Page 32: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Case study: λ–ensemble sampling and integration

Page 33: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Some gymnastic: Gibbs free energy as function of density

Dependence of a thermodynamic potential (Gibbs free energy density, or chemical potential) from a thermodynamic variable? look at the derivatives

By integrating:

With the ansatz:

Page 34: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Case study: P(ρ) equations of state

Page 35: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Pressure [GPa]

Difference in slopes: difference in specific volumes

Case study: equating Gibbs free energies

Page 36: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Alterative method for finding phase coexistence via F(V)

Page 37: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Notable cases (at 0 K): Silicon (1980)

Yin and Cohen, PRL 1980DFT with LDA functional

Page 38: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Notable cases (at 0 K): Cerium (2013)

Casadei et al. PRL (2013)

Page 39: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

From one coexistence point to coexistence line

Gibbs­Duhem (Clausius­Clapeyron) integration :Latent heat

Page 40: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Clausius­Clapeyron equation? (I)

?

specific entropy

specific volume

two phases

(I principle)

Page 41: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Clausius­Clapeyron equation? (II)

Gibbs­Duhem relation

Page 42: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

From one coexistence point to coexistence line

Page 43: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

De Koning et al. PRL 83: 3973 (1999)

time ?!? reversible?

Sparing CPU time: adiabatic switch

Page 44: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Silicon (classical potential)

Sparing CPU time: adiabatic switch

Too fast switch:Not reversible

Page 45: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Wang et al. PRL 95, 185701 (2005)

Ab initio diamond melting line

Page 46: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Beyond equilibrium: Jarzynski theorem

Clausius inequality:

Jarzynski equality (1997!)

Microscopic version of I principle

Proof:

Page 47: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Jarzynski theorem

Work (second term) depends on the trajectory, ID EST, on the initial point 

Average over ensemble of initial points. 

Taking:

Ensemble average of :

If Hamiltonian dynamics:

Page 48: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Change of variable (Hamiltonian trajectory)  →

Conservation of the phase space volume!

By noting:

Jarzynski theorem

Page 49: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

Jarzynski theorem: steered dynamics

Inefficient because:

Better estimated with cumulant:

Page 50: Computing free energy: thermodynamic integration(s) · (in this page, Helmholtz free energy, F(N,V,T)) if we can calculate E and write analytically on approximation for S for our

● Harmonic free energy (analytic)

● When non harmonic: thermodynamic integration, along “physical” or   “unphysical”  paths

● Construction of accurate phase diagrams

● Speeding up: adiabatic switch

● Faster, non equilibrium: Jarzynski equality

Summary