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 Name Constant Fluctuating (Imposed) (Measured) NVT Canonical N,V,T P NPT Isobaric-isothermal N,P,T V µ VT Grand-canonical µ ,V,T N 5
NVT Liquids Equation of State of Liquid Carbon 6 Imposed
… if force is difficult to calculate … NPT e.g. carbon force field Liquids Equation of State of Liquid Carbon Imposed 7
NPT Non-Isotropic Systems e.g. Solids Structure and Transformation of Carbon Nanotube Arrays 8
µ VT Adsorption Adsorption in Carbon Nanostructues 9 Schwegler et al.
Lecture 2 Statistical Thermodynamics Partition function 1 [ ] ( ) N N Q dr exp U r = ∫ − β NVT 3 N N ! Λ Ensemble average 1 1 [ ] ( ) ( ) N N N A dr A r exp U r = ∫ − β 3 N NVT Q N ! Λ NVT Probability to find a particular configuration 1 1 ( N ) N ( N N ) ( N ) ( N ) N r dr' r' r exp U r' exp U r ⎡ ⎤ ⎡ ⎤ = ∫ δ − − β ∝ − β 3 N ⎣ ⎦ ⎣ ⎦ Q N ! Λ NVT Free energy ( ) F ln Q β = − 10 NVT
Lecture 2 Ensemble average 1 1 [ ] ( ) ( ) N N N A dr A r exp U r = ∫ − β 3 N NVT Q N ! Λ NVT ( ) ( ) N N N dr A r P r ∫ ( ) ( ) N N N dr A r P r = ∫ = ( ) N N dr P r ∫ [ ] ( ) ( ) ( ) [ ( ) ] N N N N N N dr A r C exp U r dr A r exp U r ∫ − β − β ∫ = = [ ] [ ] ( ) ( ) N N N N dr C exp U r dr exp U r ∫ − β ∫ − β Generate configuration using MC: ( ) ( ) N N MC N dr A r P r ∫ 1 M ( ) { } N A A r N N N N N ∑ ! r , r , r , r , r = = i ( ) M N MC N 1 2 3 4 M dr P r ∫ i 1 = [ ] ( ) ( ) N N MC N dr A r C exp U r Weighted Distribution ∫ − β with = [ ] ( ) N MC N dr C exp U r ∫ − β [ ] ( ) ( ) MC N MC N P r C exp U r [ ] = − β ( ) ( ) N N N dr A r exp U r ∫ − β = [ ] ( ) N N dr exp U r ∫ − β
Lecture 2 Monte Carlo: Detailed balance o n K o ( n ) K n ( o ) → = → K o ( n ) N o ( ) ( o n ) acc( o n ) → = × α → × → K n ( o ) N n ( ) ( n o ) acc( n o ) → = × α → × → acc( n → o ) = N ( n ) × α ( n → o ) acc( o → n ) N ( o ) × α ( o → n ) = N ( n ) N ( o )
Lecture 2 NVT -ensemble N n ( ) exp U n ( ) ⎡ ⎤ ∝ − β ⎣ ⎦ acc( o n ) N n ( ) → = acc( n o ) N o ( ) → acc( o n ) → exp U n U o ( ) ( ) ⎡ ⎤ ⎡ ⎤ = − β − ⎣ ⎦ ⎣ ⎦ acc( n o ) → 13
NPT ensemble We control the • Temperature (T) • Pressure (P) • Number of particles (N) 14
Intermezzo Scaled coordinates Partition function 1 [ ] ( ) N N Q dr exp U r = ∫ − β NVT 3 N N ! Λ Scaled coordinates s r i L / = The energy depends on i the real coordinates This gives for the partition function 3 N L N ( N ) Q ds exp U s ; L ⎡ ⎤ = − β ∫ NVT 3 N ⎣ ⎦ N ! Λ N V N ( N ) ds exp U s ; L ⎡ ⎤ = − β ∫ 3 N ⎣ ⎦ N ! Λ 15
The NPT ensemble Here they are V 0 : total volume an ideal gas M : total number of particles N in volume V M-N in volume V 0 -V Here they interact V 0 is fixed V varies from 0 to V 0 What is the statistical thermodynamics of this ensemble?
Fixed V The NPT ensemble: partition function N V ( ) N N Q ds exp U s ; L ⎡ ⎤ = ∫ − β NVT ⎣ ⎦ 3 N N ! Λ M − N ( ) V 0 − V V N ! # ( ) ds M − N exp − β U 0 s M − N ; L Q MV 0 , NV , T = ∫ Λ 3 N N ! Λ 3( M − N ) M − N " $ ( ) ! ! # ( ) ds N exp − β U s N ; L ∫ × " $ M − N ( ) V 0 − V V N $ & ( ) ds N exp − β U s N ; L Q MV 0 , NV , T = ∫ Λ 3( M − N ) M − N Λ 3 N N ! % ' ( ) ! 17
M − N ( ) V 0 − V V N $ & ( ) ds N exp − β U s N ; L Q MV 0 , NV , T = ∫ Λ 3( M − N ) M − N Λ 3 N N ! % ' ( ) ! To get the Partition Function of this system, we have to integrate over all possible volumes : M − N ( ) V 0 − V V N $ & ( ) ds N exp − β U s N ; L Q MV 0 , N , T = d V ∫ ∫ Λ 3( M − N ) M − N Λ 3 N N ! % ' ( ) ! Now let us take the following limits: M M → ∞⎫ constant ρ = → ⎬ V V → ∞ ⎭ 0 As the particles are an ideal gas in the big reservoir we have: P ρ = β 18
M − N ( ) V 0 − V V N $ & ( ) ds N exp − β U s N ; L Q MV 0 , N , T = d V ∫ ∫ Λ 3 N N ! Λ 3( M − N ) M − N % ' ( ) ! We have M N M N − − M N M N V V V 1 V V V exp M N V V ( ) − ( ) − ( ) ⎡ ⎤ − = − ≈ − − ⎣ ⎦ 0 0 0 0 0 M N − M N M N V V V − exp [ V ] V − exp [ PV ] ( ) − ≈ − ρ = − β 0 0 0 To make the partition function dimensionless This gives: (see Frenkel/Smit for more info) P β N N ( N ) Q d V exp PV V ds exp U s ; L [ ] ⎡ ⎤ = Λ ∫ − β ∫ − β NPT ⎣ ⎦ 3 N N ! 19
NPT Ensemble Partition function: P β N N ( N ) Q d V exp PV V ds exp U s ; L [ ] ⎡ ⎤ = Λ ∫ − β ∫ − β NPT ⎣ ⎦ 3 N N ! Probability to find a particular configuration: ( N ) N ( N ) N V , s V exp PV exp U s ; L [ ] ⎡ ⎤ ∝ − β − β NPT ⎣ ⎦ De Detailed balance Sample a particular configuration: • change of volume • change of reduced coordinates Acceptance rules ?? 20
Detailed balance o n K o ( n ) K n ( o ) → = → K o ( n ) N o ( ) ( o n ) acc( o n ) → = × α → × → K n ( o ) N n ( ) ( n o ) acc( n o ) → = × α → × → acc( o n ) N n ( ) ( n o ) N n ( ) → × α → = = acc( n o ) N o ( ) ( o n ) N o ( ) → × α → 21
NPT -ensemble ( N ) N ( N ) N V , s V exp PV exp U s ; L [ ] ⎡ ⎤ ∝ − β − β NPT ⎣ ⎦ acc( o n ) N n ( ) → = acc( n o ) N o ( ) → Suppose we change the position of a randomly selected particle N ( N ) V exp [ PV ] exp U s ; L ⎡ ⎤ − β − β acc( o n ) → n ⎣ ⎦ = acc( n o ) N ( N ) V exp PV exp U s ; L → [ ] ⎡ ⎤ − β − β o ⎣ ⎦ ( N ) exp U s ; L ⎡ ⎤ − β n ⎣ ⎦ { } exp U n U o ( ) ( ) ⎡ ⎤ = = − β − ⎣ ⎦ ( N ) exp U s ; L ⎡ ⎤ − β o ⎣ ⎦ 22
NPT -ensemble ( N ) N ( N ) N V , s V exp PV exp U s ; L [ ] ⎡ ⎤ ∝ − β − β NPT ⎣ ⎦ acc( o n ) N n ( ) → = acc( n o ) N o ( ) → Suppose we change the volume of the system N ( N ) V exp [ PV ] exp U s ; L ⎡ ⎤ − β − β acc( o n ) → n n n ⎣ ⎦ = acc( n o ) N ( N ) V exp PV exp U s ; L → [ ] ⎡ ⎤ − β − β o o o ⎣ ⎦ N V ⎛ ⎞ { } n exp P V V exp U n U 0 ( ) ( ) ( ) = ⎡ − β − ⎤ − β ⎡ − ⎤ ⎜ ⎟ ⎣ ⎦ ⎣ ⎦ n o V ⎝ ⎠ o 23
Algorithm: NPT • Randomly change the position of a particle • Randomly change the volume 24
25
26
27
NPT simulations Equation of State of Lennard Jones System 28
Measured and Imposed Pressure • Imposed pressure P • Measured pressure <P> from virial # & ds N e − β U ( s N ) ∂ F dVV N e − β PV ∫ ∫ − % ( # & ∂ V P = − < ∂ F $ ' N , T ( > N , T = % ds N e − β U ( s N ) dVV N e − β PV $ ∂ V ' ∫ ∫ * , ( ) p ( V ) = exp − β F ( V ) + PV + - Q NPT ∫ * , ( ) Q NPT = β P dV exp − β F ( V ) + PV + - 29
# & ds N e − β U ( s N ) ∂ F ∫ dVV N e − β PV ∫ − % ( # & P = − < ∂ F $ ∂ V ' N , T ( > N , T = % ds N e − β U ( s N ) dVV N e − β PV $ ∂ V ' ∫ ∫ # & β P dV ∂ F * , ( ) ∫ ( ) + PV P = − exp − β F V % ( + - Q ( NPT ) $ ∂ V ' N , T * , ( ) ∂ exp − β F V [ ] dV exp − β PV β P + - ∫ P = Q ( NPT ) ∂ V β 30
Measured and Imposed Pressure b b b • Partial integration [ ] fdg fg gdf ∫ = − ∫ a a a " $ ( ) ( ) + PV exp − β F V % = 0 • For V=0 and V= ∞ # • Therefore, ! # ( ) ∂ exp − β F V [ ] dV exp − β PV β P " $ ∫ P = Q ( NPT ) ∂ V β β P ! # ( ) ∫ ( ) + PV P = dVP exp − β F V = P Q ( NPT ) = " $ 31
Grand-canonical ensemble What are the equilibrium conditions? 32
Grand-canonical ensemble We impose: – Temperature (T) – Chemical potential ( µ ) – Volume (V) – But NOT 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
Recommend
More recommend