Monte Carlo Methods. Ensembles (Chapter 5) Biased Sampling (Chapter 14) Practical Aspects

Similar documents
Introduction Statistical Thermodynamics. Monday, January 6, 14

2. Thermodynamics. Introduction. Understanding Molecular Simulation

Understanding Molecular Simulation 2009 Monte Carlo and Molecular Dynamics in different ensembles. Srikanth Sastry

A Brief Introduction to Statistical Mechanics

Monte Carlo Methods in Statistical Mechanics

Monte Carlo Molecular Simulation with Isobaric-Isothermal and Gibbs-NPT Ensembles. Thesis by Shouhong Du

Point Defects in Hard-Sphere Crystals

Advanced sampling. fluids of strongly orientation-dependent interactions (e.g., dipoles, hydrogen bonds)

Exam TFY4230 Statistical Physics kl Wednesday 01. June 2016

Thermodynamics at Small Scales. Signe Kjelstrup, Sondre Kvalvåg Schnell, Jean-Marc Simon, Thijs Vlugt, Dick Bedeaux

Nanoscale simulation lectures Statistical Mechanics

Hydrogels in charged solvents

CHEM-UA 652: Thermodynamics and Kinetics

Molecular Modeling of Matter

Lecture 2+3: Simulations of Soft Matter. 1. Why Lecture 1 was irrelevant 2. Coarse graining 3. Phase equilibria 4. Applications

Free energy calculations and the potential of mean force

i=1 n i, the canonical probabilities of the micro-states [ βǫ i=1 e βǫn 1 n 1 =0 +Nk B T Nǫ 1 + e ǫ/(k BT), (IV.75) E = F + TS =

( ) Lectures on Hydrodynamics ( ) =Λ Λ = T x T R TR. Jean-Yve. We can always diagonalize point by point. by a Lorentz transformation

PHYS 352 Homework 2 Solutions

3.320 Lecture 18 (4/12/05)

On the Calculation of the Chemical Potential. Using the Particle Deletion Scheme

Monte Carlo (MC) Simulation Methods. Elisa Fadda

Free Energy Estimation in Simulations

Copyright 2001 University of Cambridge. Not to be quoted or copied without permission.

Lecture 14: Advanced Conformational Sampling

Computer simulation methods (1) Dr. Vania Calandrini

Computer simulation methods (2) Dr. Vania Calandrini

Pressure Dependent Study of the Solid-Solid Phase Change in 38-Atom Lennard-Jones Cluster

CE 530 Molecular Simulation

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Constant Pressure Langevin Dynamics: Theory and Application to the Study of Phase Behaviour in Core-Softened Systems.

The Partition Function Statistical Thermodynamics. NC State University

Supplemental Material for Temperature-sensitive colloidal phase behavior induced by critical Casimir forces

Part II Statistical Physics

Parallel Tempering Algorithm in Monte Carlo Simulation

Intermolecular Forces and Monte-Carlo Integration 열역학특수연구

Multiple time step Monte Carlo

(# = %(& )(* +,(- Closed system, well-defined energy (or e.g. E± E/2): Microcanonical ensemble

Brief Review of Statistical Mechanics

Monte Carlo Simulations in Statistical Physics

fiziks Institute for NET/JRF, GATE, IIT-JAM, JEST, TIFR and GRE in PHYSICAL SCIENCES

ChE 210B: Advanced Topics in Equilibrium Statistical Mechanics

Statistical Mechanics in a Nutshell

Chemical Potential of Benzene Fluid from Monte Carlo Simulation with Anisotropic United Atom Model

Scientific Computing II

Molecular Dynamics at Constant Pressure: Allowing the System to Control Volume Fluctuations via a Shell Particle

Recitation: 10 11/06/03

Multicanonical parallel tempering

Thermodynamics of Three-phase Equilibrium in Lennard Jones System with a Simplified Equation of State

ChE 503 A. Z. Panagiotopoulos 1

Thus, the volume element remains the same as required. With this transformation, the amiltonian becomes = p i m i + U(r 1 ; :::; r N ) = and the canon

Phase Equilibria and Molecular Solutions Jan G. Korvink and Evgenii Rudnyi IMTEK Albert Ludwig University Freiburg, Germany

1 Fluctuations of the number of particles in a Bose-Einstein condensate

Temperature and Pressure Controls

Calculation of the chemical potential in the Gibbs ensemble

The Second Virial Coefficient & van der Waals Equation

CE 530 Molecular Simulation


VII.B Canonical Formulation

An Extended van der Waals Equation of State Based on Molecular Dynamics Simulation

Melting line of the Lennard-Jones system, infinite size, and full potential

Methods of Computer Simulation. Molecular Dynamics and Monte Carlo

Basics of Statistical Mechanics

Statistical Thermodynamics and Monte-Carlo Evgenii B. Rudnyi and Jan G. Korvink IMTEK Albert Ludwig University Freiburg, Germany

Self-referential Monte Carlo method for calculating the free energy of crystalline solids

TSTC Lectures: Theoretical & Computational Chemistry

ABSTRACT. Sarvin Moghaddam, Doctor of Philosophy, 2003

424 Index. Eigenvalue in quantum mechanics, 174 eigenvector in quantum mechanics, 174 Einstein equation, 334, 342, 393

although Boltzmann used W instead of Ω for the number of available states.

Phase transitions for particles in R 3

ChE 524 A. Z. Panagiotopoulos 1

Contents. 1 Introduction and guide for this text 1. 2 Equilibrium and entropy 6. 3 Energy and how the microscopic world works 21

Molecular Simulation Background

Gases and the Virial Expansion

Introduction to molecular dynamics

summary of statistical physics

THE DETAILED BALANCE ENERGY-SCALED DISPLACEMENT MONTE CARLO ALGORITHM

What is Classical Molecular Dynamics?

Molecular Interactions F14NMI. Lecture 4: worked answers to practice questions

Equilibrium Molecular Thermodynamics from Kirkwood Sampling

5. Systems in contact with a thermal bath

Introduction to Simulation - Lectures 17, 18. Molecular Dynamics. Nicolas Hadjiconstantinou

Gibbs ensemble simulation of phase equilibrium in the hard core two-yukawa fluid model for the Lennard-Jones fluid

Equilibrium Molecular Thermodynamics from Kirkwood Sampling

Chemical Potential, Helmholtz Free Energy and Entropy of Argon with Kinetic Monte Carlo Simulation

Modeling the Free Energy Landscape for Janus Particle Self-Assembly in the Gas Phase. Andy Long Kridsanaphong Limtragool

Metropolis Monte Carlo simulation of the Ising Model

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Elastic constants and the effect of strain on monovacancy concentration in fcc hard-sphere crystals

A Monte Carlo method for chemical potential determination in single and multiple occupancy crystals

MOLECULAR DYNAMIC SIMULATION OF WATER VAPOR INTERACTION WITH VARIOUS TYPES OF PORES USING HYBRID COMPUTING STRUCTURES

where (E) is the partition function of the uniform ensemble. Recalling that we have (E) = E (E) (E) i = ij x (E) j E = ij ln (E) E = k ij ~ S E = kt i

Classical Monte-Carlo simulations

Computing free energy: Replica exchange

763620SS STATISTICAL PHYSICS Solutions 5 Autumn 2012

Chapter 2 Experimental sources of intermolecular potentials


Binary Hard-Sphere Mixtures Within Spherical Pores

Physics 127b: Statistical Mechanics. Lecture 2: Dense Gas and the Liquid State. Mayer Cluster Expansion

Introduction to Computer Simulations of Soft Matter Methodologies and Applications Boulder July, 19-20, 2012

Transcription:

Monte Carlo Methods Ensembles (Chapter 5) Biased Sampling (Chapter 14) Practical Aspects

Lecture 1 2

Lecture 1&2 3

Lecture 1&3 4

Different Ensembles Ensemble ame Constant (Imposed) VT Canonical,V,T P PT Isobaric-isothermal,P,T V µvt Grand-canonical µ,v,t Fluctuating (Measured) 5

VT Liquids Equation of State of Liquid Carbon Imposed 6

if force PT is difficult to calculate e.g. carbon force field Liquids Equation of State of Liquid Carbon Imposed 7

PT on-isotropic Systems e.g. Solids Structure and Transformation of Carbon anotube Arrays 8

µvt Adsorption Adsorption in Carbon anostructues Schwegler et al. 9

Partition function Q VT Statistical Thermodynamics 1 = Λ! dr exp β 3 Ensemble average 1 1 A = VT Q Λ! VT [ U( r )] ( ) [ ( )] r exp U r dr A β 3 Probability to find a particular configuration ( ) 1 1 r dr' ( r' r ) exp ( r' ) exp ( = δ βu βu r ) 3 Q Λ! VT Lecture 2 Free energy βf = ln ( ) Q VT 10

Ensemble average Lecture 2 A VT 1 = Q Λ VT = dr = dr 1 dr A( r ) exp[ βu ( r )] 3! ( ) ( dr A( r ) P( r ) r P r ) = dr P( r ) ( r ) C exp[ U ( r )] dr A = C exp[ βu ( r )] dr A A dr Generate configuration using MC: {,r,r,r,r } P MC ( ) [ ( )] MC r = C exp βu r β ( r ) exp[ βu ( r )] exp[ βu ( r )] M 1 r1 2 3 4! A = A( ri ) M M i= 1 Weighted Distribution with = = = dr dr dr A dr MC ( r ) P ( r ) MC P ( r ) A dr A dr MC ( r ) C exp[ βu ( r )] MC C exp[ βu ( r )] ( r ) exp[ βu ( r )] exp[ βu ( r )]

Monte Carlo: Detailed balance Lecture 2 o n Ko ( n) = Kn ( o) Ko ( n) = o ( ) α( o n) acc( o n) Kn ( o) = n ( ) α( n o) acc( n o) acc(o n) acc(n o) (n) α(n o) = (o) α(o n) = (n) (o)

Lecture 2 VT-ensemble n () exp acc( o n) ( n) = acc( n o) ( o) ( ) βu n acc( o n) acc( n o) = exp β U n ( ) U( o) 13

PT ensemble We control the Temperature (T) Pressure (P) umber of particles () 14

Scaled coordinates Intermezzo Partition function Q VT 1 = Λ! Scaled coordinates dr exp β 3 si = ri / L [ U( r )] This gives for the partition function 3 L QVT = ds exp βu 3 Λ! s ; L V = ds exp βu 3 Λ! s ; ( ) ( L) The energy depends on the real coordinates 15

The PT ensemble Here they are an ideal gas V 0 : total volume M : total number of particles in volume V Here they interact M- in volume V 0 -V V 0 is fixed V varies from 0 to V 0 What is the statistical thermodynamics of this ensemble?

The PT ensemble: Fixed V partition function V QVT = ds exp βu s ; L 3 Λ! Q MV0,V,T = Q MV0,V,T = ( V 0 V ) M 3(M ) Λ M ( )! ( V 0 V ) M 3(M ) Λ M ( )! ( )! " ( ) ds M exp βu 0 s M ; L V Λ 3! ds ds V # $ Λ 3! exp! " βu s ; L exp$ % βu s ; L ( ) ( ) & ' 17 # $

Q MV0,V,T = ( V 0 V ) M 3(M ) Λ M ( )! V Λ 3! ds exp$ % βu s ; L ( ) To get the Partition Function of this system, we have to integrate over all possible volumes: ( ) M Q = dv V 0 V V MV0,,T 3(M ) Λ ( M )! Λ 3! ow let us take the following limits: ds & ' exp$ % βu s ; L ( ) M M ρ = constant V0 V As the particles are an ideal gas in the big reservoir we have: & ' ρ = βp 18

( ) M Q = dv V 0 V V MV0,,T 3(M ) Λ ( M )! Λ 3! We have ds exp$ % βu s ; L ( ) & ' M M V V = V 1 V V V exp M V V ( ) M ( ) M ( ) 0 0 0 0 0 M M M 0 0 0 ( V V) V exp[ ρv] = V exp[ βpv] This gives: To make the partition function dimensionless (see Frenkel/Smit for more info) β P QPT = dvexp PV V ds exp U s ; L 3! Λ [ ] ( β β ) 19

Partition function: PT Ensemble β P QPT = dvexp PV V ds exp U s ; L 3! Λ [ ] ( β β ) Probability to find a particular configuration: (, s ) exp[ β ] exp β ( s ; ) PT V V PV U L Sample a particular configuration: change of volume change of reduced coordinates Acceptance rules?? Detailed balance 20

Detailed balance o n Ko ( n) = Kn ( o) Ko ( n) = o ( ) α( o n) acc( o n) Kn ( o) = n ( ) α( n o) acc( n o) acc( o n) ( n) α( n o) ( n) = = acc( n o) ( o) α( o n) ( o) 21

acc( o n) ( n) = acc( n o) ( o) PT-ensemble (, s ) exp[ ] exp ( s ; ) PT V V βpv βu L Suppose we change the position of a randomly selected particle acc( o n) V exp PV exp U s ; L = acc( n o) [ ] ( V exp βpv exp βu s ) o ; L ( exp βu s ) n ; L = = exp β U n U o ( exp βu s ) o ; L 22 [ ] ( β β ) n { ( ) ( ) }

acc( o n) ( n) = acc( n o) ( o) PT-ensemble (, s ) exp[ ] exp ( s ; ) PT V V βpv βu L Suppose we change the volume of the system acc( o n) Vn exp PVn exp U s ; L n = acc( n o) [ ] ( V exp exp s ; ) o βpv o βu L o [ ] ( β β ) V n = exp βpv ( ) exp ( ) ( 0) n Vo U n U V o 23 { β }

Algorithm: PT Randomly change the position of a particle Randomly change the volume 24

25

26

27

PT simulations Equation of State of Lennard Jones System 28

Measured and Imposed Pressure Imposed pressure P Measured pressure <P> from virial P = < F dvv e βpv ds e βu (s ) # F % # & $ V % ( >,T = $ V ' dvv e βpv ds e βu (s ) exp*+ β ( F(V )+ PV ), - p(v ) = Q PT = βp Q PT dv exp*+ β ( F(V )+ PV ), - & ( ',T 29

# P = < F & % ( >,T = $ V ' P = P = βp Q(PT ) βp Q(PT ) # dv F & % ( $ V ' dv dvv e βpv ds e βu (s ) # F % $ V dvv e βpv ds e βu (s ),T exp[ βpv ] β exp* + β F V ( ) + PV ( ) exp*+ βf V, - V ( ), - & ( ',T 30

Measured and Imposed Pressure Partial integration For V=0 and V= b a fdg = [ ] b fg a exp" # β F V b a gdf ( ( ) + PV ) $ % = 0 Therefore, P = P = βp Q(PT ) βp Q(PT ) = dv exp[ βpv ] β dvp exp! " β F V ( ) exp!" βf V # $ V ( ( ) + PV ) # $ = P 31

Grand-canonical ensemble What are the equilibrium conditions? 32

Grand-canonical ensemble We impose: Temperature (T) Chemical potential (µ) Volume (V) But OT pressure 33

The ensemble of the total system Here they are an ideal gas Here they interact What is the statistical thermodynamics of this ensemble? 34

The ensemble: partition function V QVT = ds exp βu s ; L 3 Λ! Q MV0,V,T = ( V 0 V ) M 3(M ) Λ M ( )! ( ) M V0 V V MV V T M ( ) ( )! " ( ) ds M V exp βu 0 s M ; L ds V # $ Λ 3! exp! " βu s ; L ( ) Q 0,, = ds exp βu s ; L 3 3 Λ M! Λ! ( ) 35 # $

Q = ( V 0 V ) M V MV0 ds exp$ βu ( s ; L) &,V,T 3(M ) Λ ( M )! Λ 3! % ' To get the Partition Function of this system, we have to sum over all possible number of particles Q = ( V 0 V ) =M M V MV0 ds exp$ βu ( s ; L) &,,T 3(M ) Λ ( M )! Λ 3! % ' =0 ow let us take the following limits: M M ρ = constant V0 V As the particles are an ideal gas in the big reservoir we have: ( 3 ) µ = ktln Λ ρ B = exp( ) βµ V Qµ VT = ds exp βu s ; L 3 Λ! = 0 ( ) 36

Partition function: µvt Ensemble = ( ) exp βµ V Qµ VT = ds exp βu s ; L 3 = 0 Λ! Probability to find a particular configuration: ( ) ( ) ( exp βµ V, ) µ VT V s exp βu s ; L 3 Λ! Sample a particular configuration: Change of the number of particles Change of reduced coordinates Acceptance rules?? Detailed balance ( ) 37

Detailed balance o n Ko ( n) = Kn ( o) Ko ( n) = o ( ) α( o n) acc( o n) Kn ( o) = n ( ) α( n o) acc( n o) acc( o n) ( n) α( n o) ( n) = = acc( n o) ( o) α( o n) ( o) 38

acc( o n) ( n) = acc( n o) ( o) µvt-ensemble ( ) ( exp βµ V, ) µ VT V s exp βu s ; L 3 Λ! Suppose we change the position of a randomly selected particle exp ( ) acc( o n) 3 Λ! acc( n o) = exp βµ V βµ V ( ) Λ 3! ( ) n L exp βu s ; ( ) o L exp βu s ; { β U( n) U( ) } = exp 0 ( ) 39

acc( o n) ( n) = acc( n o) ( o) µvt-ensemble ( ) ( exp βµ V, ) µ VT V s exp βu s ; L 3 Λ! Suppose we change the number of particles of the system ( βµ ( + )) 3 + 3 Λ ( + ) exp( βµ ) V ( ) + 1 exp 1 V exp βu s ; acc( o n) 1! = acc( n o) ( exp βu s ; L ) 3 o Λ! exp( βµ ) V = exp[ βδu ] 3 Λ + 1 ( ) ( +1 L ) n 40

41

42

Application: equation of state of Lennard-Jones 43

Application: adsorption in zeolites 44

Summary Ensemble Constant (Imposed) Fluctuating (Measured) Function VT,V,T P βf=-lnq(,v,t) PT,P,T V βg=-lnq(,p,t) µvt µ,v,t βω=-lnq(µ,v,t)=-βpv 45

Practical Points Boundaries CPU saving methods Reduced units Long ranged forces

Boundary effects In small systems, boundary effects are always large. 1000 atoms in a simple cubic crystal 488 boundary atoms. 1000000 atoms in a simple cubic crystal still 6% boundary atoms.

Periodic boundary conditions

ener(x,en) energies)

Energy evaluation costs! The most time-consuming part of any simulation is the evaluation of all the interactions between the molecules. In general: (-1)/2 = O( 2 ) But often, intermolecular forces have a short range: Therefore, we do not have to consider interactions with far- away atoms.

Saving CPU Cell list Verlet List Han sur Lesse

Application: Lennard Jones u LJ u r *# σ & ( r) = 4ε $ % r ' ( +, " # $ ( ) = u LJ potential The Lennard-Jones potential 12 # σ $ % r ( r) r r c 0 r > r c 6 & ' ( The truncated Lennard-Jones potential The truncated and shifted Lennard-Jones potential -./ ( ) = u LJ u r # $ % ( r) u LJ ( r ) c r r c 0 r > r c

ener(x,en) energies)

Phase diagrams of Lennard Jones fluids

Long ranged interactions Long-ranged forces require special techniques. Coulomb interaction (1/r in 3D) Dipolar interaction (1/r 3 in 3D)...and, in a different context: Interactions through elastic stresses (1/r in 3D) Hydrodynamic interactions (1/r in 3D)

Reduced units Example: Particles with mass m and pair potential: Unit of length: Unit of energy: σ ε Unit of time:

Beyond standard MC on Boltzmann Sampling Lecture 2 Parallel tempering More to Come Tomorrow (Daan Frenkel)

Parallel tempering/replica Exchange Ergodicity problems can occur, especially in glassy systems: biomolecules, molecular glasses, gels, etc. The solution: go to high temperature High barriers in energy landscape: difficult to sample E low T Barriers effectively low: easy to sample E phase space high T phase space

Parallel tempering/replica Exchange Simulate two systems simultaneously system 1 system 2 temperature T 1 temperature T 2 e 1U 1 (r ) e 2U 2 (r ) total Boltzmann weight: e 1U 1 (r ) e 2U 2 (r )

Swap move Allow two systems to swap system 2 system 1 temperature T 1 temperature T 2 e 1U 2 (r ) e 2U 1 (r ) total Boltzmann weight: e 1U 2 (r ) e 2U 1 (r )

Acceptance rule The ratio of the new Boltzmann factor over the old one is (n) (o) = e( 2 1)[U 2 (r ) U 2 1(r )] The swap acceptance ratio is acc(1 2) = min 1,e ( 2 1)[U 2 (r ) U 1 (r )]

More replicas Consider M replica s in the VT ensemble at a different temperature. A swap between two systems of different temperatures (T i,t j ) is accepted if their potential energies are near. other parameters can be used: Hamiltonian exchange

Questions Lunch 63