Free Energy and Phase equilibria Thermodynamic integration 7.1 Chemical potentials 7.2 Overlapping distributions 7.2 Umbrella sampling 7.4 Application: Phase diagram of Carbon
Why free energies? Reaction equilibrium constants Examples: Chemical reactions, catalysis, etc... A B K = [B] [A] = p B p A = exp β(g B G A ) [ ] Protein folding, binding: free energy gives binding constants Phase diagrams Prediction of thermodynamic stability of phases, Coexistence lines Critical points Triple points First order/second order phase transitions
Phase diagrams Critical point: no difference between liquid and vapor Triple point: liquid, vapor and solid in equilibrium. How do we compute these lines? Along the liquid gas coexistence line increasing the pressure and temperature at constant volume the liquid density becomes lower and the vapor density higher.
Phase equilibrium Criteria for equilibrium (for single component) T I = T II P I = P II µ I = µ II Chemical potential # µ = % F $ N & ( ' V,T # = G & % ( $ N ' P,T = G m If µ I > µ II : transport of particles from phase I to phase II. Stable phase: Lowest chemical potential (for single phase: lowest Gibbs free energy)
Relation thermodynamic potentials Helmholtz free energy: F = U - TS Gibbs free energy: G = F + PV Suppose we have F(n,V,T) Then we can find G from F from: $ P = & F % V ' ) ( n,t G = F V F V n, T All thermodynamic quantities can be derived from F and its derivatives
Phase equilibria from F(V,T) Common tangent construction F liquid Equal tangents $ P = F ' & ) % V ( n,t Connecting line: equal G gas V
Common tangent construction Helmholtz Free Energy Perspective F liquid G = F V F V n, T gas V
Common tangent construction Gibbs Free Energy Perspective G $ G = F V& F % V ' ) ( n,t liquid Both liquid and vapor G equal and minimal gas V Only equilibrium when P,T is on coexistence line.
We need F or µ So equilibrium from F(V) alone or from P and µ F(V ) = F(V 0 ) + F(ρ) = F(ρ 0 ) + N # F & V % ( dv = F(V V 0 $ V' 0 ) PdV ρ ρ 0 So in fact for only 1 point of the equation of state the F is needed N,T P( ρ #) d ρ # ρ 2 For liquid e.o.s even from ideal gas βf(ρ) /N = βf id (ρ) /N + ρ 0 βp( ρ $ ) - ρ $ d ρ $ ρ 2
Equation of state P = P ρ,t F(ρ) = F(ρ 0 ) + N ρ 0 βf(ρ) /N = βf id (ρ) /N + ρ P( ρ #) d ρ # ρ 2 ρ 0 # % $ βp( ρ $ ) - ρ $ d ρ $ ρ 2 F V & ( ' N,T = P
Free Energies and Phase Equilibria General Strategies Determine free energy of both phases relative to a reference state Free energy difference calculation General applicable: Gas, Liquid, Solid, Inhomogeneous systems, Determine free energy difference between two phases Gibbs Ensemble Specific applicable: Gas, Liquid
Statistical Thermodynamics Probability to find a particular configuration P( r N ) = 1 1 Q NVT Λ 3N N! dr' N δ( r' N r N )exp βu r' N [ ] exp βu( r N ) [ ] Partition function Q NVT = Free energy βf 1 Λ 3N N! = ln dr N Q NVT exp[ βu( r N )] Ensemble average A NVT = 1 1 Q NVT Λ 3N N! [ ] dr N A( r N )exp βu r N
Ensemble average versus free energy Generate configuration using MC: A = 1 M M A N r i i=1 dr N A r N Generate configuration using MD: [ ] [ ] exp βu r N dr N exp βu r N r N 1,r N 2,r N 3,r N N { 4!,r M } = A NVT r N 1,r N 2,r N 3,r N N { 4!,r M } A = 1 M M A N r i i=1 1 T βf = lnq NVT = ln T 0 dta(t) 1 Λ 3N N! A NVT dr N exp[ βu( r N )] ergodicity F is difficult, because requires accounting of phase space volume
I - Thermodynamic integration Known reference state λ=0 unkown target state λ=1 U λ Q NVT = 1 λ ( λ) = Coupling parameter U I + λu II 1 dr N Λ 3N N! exp βu λ [ ] F(λ =1) F(λ = 0) = λ=1 λ=0 # dλ F λ & % ( $ λ ' N,V,T
Thermodynamic integration λ $ F λ ' & ) % ( N,T = 1 β λ ln ( Q ) = 1 1 β Q Q λ = dr N ( U( λ) λ) exp βu λ dr N exp βu λ [ ] [ ] = U λ ( λ) λ Free energy as ensemble average! F( λ =1) F( λ = 0) = d λ U λ λ λ
In general λ U λ λ Specific example U 0 = U II U I λ Example = U LJ = U Stockm Stockmayer U 1 = (1 λ)u I + λu II U λ U( λ) = U LJ + λu dipole-dipole U( λ) λ λ = U dip dip λ Lennard-Jones
Free energy of solid More difficult. What is reference? Not the ideal gas. Instead it is the Einstein crystal: harmonic oscillators around r 0 U ( λ;r N ) = (1 λ)u ( r N ) N + λu r 0 F = F ein + λ=1 dλ U ( λ ) λ= 0 λ λ N i=1 + λ α(r i r i ) 2 F = F ein + λ=1 λ= 0 dλ U( r N N ) + U r 0 N + α(r i r i ) 2 i=1 λ
Hard sphere freezing P liquid free energy from Ideal gas Solid free energy from Einstein crystal Equal µ/p (and T) ρ
II - Thermodynamic perturbation Two systems: System 0: N, V, T, U 0 System 1: N, V, T, U 1 Q 0 = V N Λ 3N N! ds N exp( βu 0 ) Q 1 = V N Λ 3N N! ds N exp( βu 1 ) ΔβF = βf 1 βf 0 = ln Q 1 Q 0 ds N exp$ βu & % 1 ' = ln ds N exp( βu ) 0 ds N exp$ β ( U 1 U )& % 0 ' = ln exp $ βu & % 0' ds N exp βu 0 Δ β F = ln exp $ & β U1 U0 %' 0
Chemical potential Q NVT = V N Λ 3N N! [ ] ds N exp βu s N ;L βf = ln( Q ) NVT $ = ln V N ' & ) ln( ds N exp[ βu( s N ;L)]) % Λ 3N N! ( % = N ln' 1 ( & Λ 3 * + N ln( ds N exp[ βu( s N ;L)]) ρ) βf = βf IG + βf ex βµ = βµ IG + βµ ex $ µ F ' & ) % N ( V,T } βµ IG & βf $ % N IG #! " V, T βµ ex & $ % βf N ex #! " V, T
Widom test particle insertion βf( N) ) & βf # βf N +1) βµ $! βµ = % N " N +1 N V, T = ln Q ( N +1 ) Q( N) $ & = ln& & & % V N +1 Λ 3N +3 N +1! V N Λ 3N N! $ V = ln& % Λ 3 N +1 βµ = βµ IG + βµ ex % ds N +1 exp βu s N +1 ;L βµ ex = ln' ' & ds N exp βu( s N ;L) ' ) $ ) ds N +1 exp βu s N +1 ;L ln& ) & ds N exp βu( s N ;L) ) % ( ' $ ds N +1 exp[ βu( s N +1 ;L)]' ) ln& ) ( & ds N exp[ βu( s N ;L)] ) % ( [ ] [ ] ( * * ) [ ] [ ] ' ) ) (
% βµ ex = ln' ' & U s N +1 ;L & βµ ex = ln ( ( ' & = ln( ( ' Widom test particle insertion [ ] ds N +1 exp βu s N +1 ;L [ ] ds N exp βu s N ;L = ΔU + + U( s N ;L) ds N ds N +1 exp β ΔU + + U s N ;L ds N +1 ( * * ) [ ( )] [ ] ds N exp βu s N ;L = ln ds N +1 exp βδu + ds N { exp[ βδu + ]}exp βu s N ;L ds N exp βu s N ;L ) + + * [ ] [ ] Ghost particle! [ ] NVT ) + + *
Hard spheres [ ] NVT βµ ex = ln ds N +1 exp βδu + = & r σ U r % ' 0 r > σ exp[ βδu + ] = % 0 if overlap & ' 1 no overlap exp[ βδu + ] probability to insert a test particle! But, may fail at high density
III - Overlapping Distribution Method Two systems: System 0: N, V,T, U 0 System 1: N, V,T, U 1 Q 0 = p 1 ( ΔU) = p 1 V N Λ 3N N! ds N exp( βu 0 ) Q 1 = V N ΔβF = βf 1 βf 0 = ln Q 1 Q 0 Q 0 = exp( βδf) Q 1 = ln ds N exp( βu 1 ) Λ 3N N! # ds N exp βu 1 % $ ds N exp βu 0 & ( = ln # Q & 1 % ( ' $ Q 0 ' =ΔU (δ function) ds N exp( βu ds N 1 )δ( U 1 U 0 ΔU) exp( βu 0 )δ U 1 U 0 ΔU p 0 ( ΔU) = ds N exp( βu ds N 1 ) exp( βu 0 ) ds N exp[ β( U 1 U 0 )]exp[ βu 0 ]δ( U 1 U 0 ΔU) p 1 ( ΔU) = ds N exp( βu 1 ) = 1 = Q 0 1 ds N exp[ βu 0 ]δ ( U 1 U 0 ΔU) Q 1 Q 1 Q 0 = Q 0 exp( βδu) Q 1 ( ΔU) = Q 0 exp( βδu) p 0 ( ΔU) Q 1 Q 0 ln p 1 ( ΔU) = β( ΔF ΔU) + ln p 0 ( ΔU)
Overlapping Distribution Method ln p 1 ΔU = β ΔF ΔU + ln p 0 ΔU f 0 ΔU ln p 0 ΔU 0.5βΔU f ( ΔU) ln p ( ΔU) + 0.5βΔU 1 1 Simulate system 0: compute f 0 Simulate system 1: compute f 1 βδf = f 1 ΔU f 0 ΔU
Chemical potential System 0: N-1, V, T, U + 1 ideal gas System 1: N, V, T, U Δ 1 0 βf = βf βf βµ βµ ex ex System 0: test particle energy System 1: real particle energy ( ΔU ) f ( ΔU ) = f1 0 ΔU = U 1 U 0 Moderate density Hight density
Umbrella sampling Start with thermodynamic perturbation % ds N exp βu 1 ΔβF = ln( Q 1 Q 0 ) = ln ' & ds N exp βu 0 & ds N exp( βu 0 )exp( βδu)) exp( βδf) = ( ' ds N exp( βu 0 ) + * exp( βδf) = exp( βδu) 0 ( * ) Can we use this for free energy difference between arbitrary systems?
T 0 T 1 P(E) T 2 T 3 T 4 T 5 E Overlap becomes very small
System 1 P(ΔU) System 0 E Overlap becomes very small ΔU
Bridging function Introduce function π(s N ) altering distribution. exp( βδf) = ' ) ( ds N π(s N )exp βu 1 ds N π(s N )exp βu 0 /π(s N ) /π(s N ) *, + = exp ( βu 1) / π π exp( βu 0 ) / π π exp βδf This approach is called umbrella sampling
System 1 P(ΔU) umbrella System 0 E ΔU
Tracing coexistence curves If we have a coexistence point on the phase diagram we can integrate allong the line while maintaining coexistence. P en T are equal along coexistence line dp P α phase β phase dµ α = dµ β dt T
Tracing coexistence curves dµ = dg = - SdT + VdP - S α dt + V α dp = - S β dt + V β dp dp dt = S β S α V β V α Clapyeron equation dp dt = ΔS ΔV = ΔH TΔV dp dt = Δ(U + PV ) TΔV dp = Δ(U + PV ) TΔV dt
Example: Carbon Phase Diagram