Monte Carlo method II

Similar documents
Thermodynamics and statistical mechanics in materials modelling II

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

Statistical mechanics handout 4

Supplementary Notes for Chapter 9 Mixture Thermodynamics

Lecture 7: Boltzmann distribution & Thermodynamics of mixing

MOLECULAR DYNAMICS ,..., What is it? 2 = i i

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Markov Chain Monte Carlo Lecture 6

CE 530 Molecular Simulation

Lecture 4. Macrostates and Microstates (Ch. 2 )

STATISTICAL MECHANICAL ENSEMBLES 1 MICROSCOPIC AND MACROSCOPIC VARIABLES PHASE SPACE ENSEMBLES. CHE 524 A. Panagiotopoulos 1

Numerical Heat and Mass Transfer

STATISTICAL MECHANICS

Temperature. Chapter Heat Engine

Markov Chain Monte Carlo (MCMC), Gibbs Sampling, Metropolis Algorithms, and Simulated Annealing Bioinformatics Course Supplement

Q e E i /k B. i i i i

Open Systems: Chemical Potential and Partial Molar Quantities Chemical Potential

University of Washington Department of Chemistry Chemistry 453 Winter Quarter 2015

10.34 Fall 2015 Metropolis Monte Carlo Algorithm

Snce h( q^; q) = hq ~ and h( p^ ; p) = hp, one can wrte ~ h hq hp = hq ~hp ~ (7) the uncertanty relaton for an arbtrary state. The states that mnmze t

Grand canonical Monte Carlo simulations of bulk electrolytes and calcium channels

10.40 Appendix Connection to Thermodynamics and Derivation of Boltzmann Distribution

Lecture 3: Boltzmann distribution

Second Order Analysis

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

Why BP Works STAT 232B

( ) ( ) ( ) ( ) STOCHASTIC SIMULATION FOR BLOCKED DATA. Monte Carlo simulation Rejection sampling Importance sampling Markov chain Monte Carlo

Introduction to Statistical Methods

Solution Thermodynamics

A Robust Method for Calculating the Correlation Coefficient

Lecture 14: Forces and Stresses

Gaussian Mixture Models

Lecture 12: Discrete Laplacian

Property calculation I

Physics 5153 Classical Mechanics. Principle of Virtual Work-1

Physics 607 Exam 1. ( ) = 1, Γ( z +1) = zγ( z) x n e x2 dx = 1. e x2

Lecture. Polymer Thermodynamics 0331 L Chemical Potential

x = , so that calculated

Rate of Absorption and Stimulated Emission

where the sums are over the partcle labels. In general H = p2 2m + V s(r ) V j = V nt (jr, r j j) (5) where V s s the sngle-partcle potental and V nt

Chapter 13: Multiple Regression

The Feynman path integral

NUMERICAL DIFFERENTIATION

...Thermodynamics. If Clausius Clapeyron fails. l T (v 2 v 1 ) = 0/0 Second order phase transition ( S, v = 0)

6. Stochastic processes (2)

Thermodynamics Second Law Entropy

6. Stochastic processes (2)

Limited Dependent Variables

Probabilistic Graphical Models

Physics 181. Particle Systems

Note on EM-training of IBM-model 1

Hidden Markov Models & The Multivariate Gaussian (10/26/04)

= z 20 z n. (k 20) + 4 z k = 4

Uncertainty in measurements of power and energy on power networks

Feature Selection: Part 1

Density matrix. c α (t)φ α (q)

A quote of the week (or camel of the week): There is no expedience to which a man will not go to avoid the labor of thinking. Thomas A.

Lecture 10 Support Vector Machines II

LINEAR REGRESSION ANALYSIS. MODULE IX Lecture Multicollinearity

Osmotic pressure and protein binding

Lecture Note 3. Eshelby s Inclusion II

Integrals and Invariants of Euler-Lagrange Equations

Review of Classical Thermodynamics

Lecture 4. Instructor: Haipeng Luo

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Energy, Entropy, and Availability Balances Phase Equilibria. Nonideal Thermodynamic Property Models. Selecting an Appropriate Model

Prof. Dr. I. Nasser Phys 630, T Aug-15 One_dimensional_Ising_Model

Gouy-Chapman model (1910) The double layer is not as compact as in Helmholtz rigid layer.

Problem Points Score Total 100

Monte Carlo methods for magnetic systems

and Statistical Mechanics Material Properties

Convergence of random processes

High resolution entropy stable scheme for shallow water equations

Poisson brackets and canonical transformations

Week 5: Neural Networks

Problem Set 9 Solutions

Electrical double layer: revisit based on boundary conditions

π e ax2 dx = x 2 e ax2 dx or x 3 e ax2 dx = 1 x 4 e ax2 dx = 3 π 8a 5/2 (a) We are considering the Maxwell velocity distribution function: 2πτ/m

Physics 240: Worksheet 30 Name:

Stanford University CS359G: Graph Partitioning and Expanders Handout 4 Luca Trevisan January 13, 2011

Lecture 3 Examples and Problems

NUMERICAL RESULTS QUALITY IN DEPENDENCE ON ABAQUS PLANE STRESS ELEMENTS TYPE IN BIG DISPLACEMENTS COMPRESSION TEST

Lecture 2 Grand Canonical Ensemble GCE

FREQUENCY DISTRIBUTIONS Page 1 of The idea of a frequency distribution for sets of observations will be introduced,

Lecture 20: Hypothesis testing

Generalized Linear Methods

Investigation of a New Monte Carlo Method for the Transitional Gas Flow

ESCI 341 Atmospheric Thermodynamics Lesson 10 The Physical Meaning of Entropy

Self-organising Systems 2 Simulated Annealing and Boltzmann Machines

Sampling Theory MODULE VII LECTURE - 23 VARYING PROBABILITY SAMPLING

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

CS 3750 Machine Learning Lecture 6. Monte Carlo methods. CS 3750 Advanced Machine Learning. Markov chain Monte Carlo

Polynomial Regression Models

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

Department of Statistics University of Toronto STA305H1S / 1004 HS Design and Analysis of Experiments Term Test - Winter Solution

CIE4801 Transportation and spatial modelling Trip distribution

Computation of Higher Order Moments from Two Multinomial Overdispersion Likelihood Models

Canonical transformations

Lecture Notes on Linear Regression

Transcription:

Course MP3 Lecture 5 14/11/2006 Monte Carlo method II How to put some real physcs nto the Monte Carlo method Dr James Ellott 5.1 Monte Carlo method revsted In lecture 4, we ntroduced the Monte Carlo (MC) method, whch s a probablstc smulaton technque for evolvng systems to thermodynamc equlbrum. We dscussed Metropols algorthm, n whch new states are accepted automatcally f ther energy s lower than prevous state, or wth Boltzmann probablty f ther energy s hgher. Metropols MC samples states accordng to ther thermal mportance naturally produces confguratons from the canoncal (NVT) thermodynamc ensemble. However, does not allow us to study stuatons n whch there are fluctuatons n partcle number or changes n total system volume. 1

5.2 MC n dfferent thermodynamc ensembles In ths lecture, we wll dscuss ways of usng MC to sample from dfferent thermodynamc ensembles, whch are dentfed by ther conserved quanttes. Isobarc-sothermal (NpT) Fxed number of partcles, pressure and temperature. E.g., a perfectly elastc balloon flled wth gas. Grand canoncal or Gbbs (µvt) Varable number of partcles, fxed volume and temperature. E.g., onc solutons n osmotc contact across a permeable membrane. 5.3 Free energy calculatons usng MC We wll see how MC can be used to calculate free energes usng thermodynamc ntegraton or smulatons n the grand canoncal ensemble. Free energes are dffcult to calculate by computer smulaton (and also n real experments!) because they nvolve entropy, and cannot smply be obtaned by averagng over functons of the phase space co-ordnates of the system (as can energy, temperature, etc.). Instead, they depend on the avalable volume of accessble phase space, and are called thermal quanttes (as opposed to mechancal quanttes). The calculaton of thermal quanttes s very mportant, as t allows us to study the phase behavour of a substance as a functon of temperature and pressure. 2

5.4 Confguratonal bas MC Fnally, we wll look at how to study stuatons n whch the acceptance rato of tral moves s very low. For example, a polymerc system where most moves are forbdden by the constrants of chan topology and excluded volume. These problems can be tackled by basng the generaton of tral conformatons so that the acceptance rate s greatly enhanced (even to such an extent that each move s guaranteed to be accepted). Ths s allowed (.e we wll stll produce a well-defned thermodynamc equlbrum state) provded the acceptance rule s modfed n such a way that the bas s removed. 5.5 Revson of Metropols MC Let s start by revsng the Metropols MC method. We recall that we start wth an ntal random confguraton, and apply perturbatons whch take us on a random walk through regons of phase space whch have an mportant contrbuton to the ensemble averages (recall the analogy of the Nle from lecture 4). The acceptance rules governng the transtons to new states are chosen such that these confguratons occur wth a frequency whch s proportonal to ther Boltzmann probablty. 1 p = Z ( ) exp βe 3

5.6 General approach for MC smulaton The procedure used for Metropols MC can be generalsed to sample confguratons from any thermodynamc ensemble by followng a general recpe: 1. Lst the conserved quanttes of the requred ensemble 2. Impose the condton of detaled balance: p σ P(σ ν) = p ν P(ν σ) where the lower case p are occupaton probabltes and the captal P are transton probabltes [Remember that each transton probablty can be decomposed nto the product of a selecton probablty and an acceptance probablty] 4. Determne probabltes of generatng a partcular confguraton 5. Derve condton whch needs to be fulflled by acceptance rules 5.7.1 Isobarc-sothermal MC Let s now do an example and sample confguratons from the NpT ensemble. Not only are these the most common expermental condtons, but also constant NpT MC can be used to calculate the equaton of state for systems n whch the partcles nteract va arbtrary potental energy functons. They can also be used to smulate systems n the vcnty of a frst order phase transton. Ths s not possble wth standard NVT MC because the densty s constraned by the fnte sze of the smulaton box. Usng NpT MC, the system relaxes to the state of lowest Gbbs free energy. 4

5.7.2 Isobarc-sothermal MC A rgorous dervaton of the scheme for NpT MC can be found n Frenkel 5.4, but dea s to take the volume of the smulaton box V as an addtonal degree of freedom. So, as well as makng tral moves n the system confguraton, we also make tral moves n V that consst of addng or subtractng some small amount of volume. Note the shft n the c.o.m. of the partcle postons. V V ' = V + δ V δ = U[ 1,1] max 5.7.3 Isobarc-sothermal MC The trck s to ntroduce the volume changng moves n such a way that the symmetry of the underlyng Markov chan s not dsturbed. We can do ths by choosng the acceptance probablty of a random volume changng move V V to be: H [ { β H} ] mn 1,exp = E N N V ' ( s, V ') E( s, V ) + p( V ' V ) Nk T ln V You can thnk of ths procedure as formng an equlbrum wth a macroscopc reservor at pressure p. B 5

5.7.4 Isobarc-sothermal MC The frequency wth whch tral moves n the volume should be attempted s much less than that of the sngle partcle moves, because they requre us to recompute all the ntermolecular nteractons. The general rule s to try one volume move every N partcle moves. However, to guarantee the symmetry of the underlyng Markov chan, ths move should be attempted wth probablty 1/N after every partcle move. Ths ensures that the system s mcroscopcally reversble, and generates a Boltzmann dstrbuton of states n the NpT ensemble. Some methods make moves n lnv rather than V. 5.8 Calculatng free energes Although NVT and NpT MC enable us to smulate realstc expermental condtons, they do not permt drect calculaton of thermal quanttes such as entropy or Gbbs free energy. Ths s precsely because the smulatons are so good at samplng only thermally mportant regons of phase space (as the thermal quanttes depend on the volume of phase space whch s accessble to the system). We can get around ths ether drectly, by calculatng absolute free energes n the full grand canoncal ensemble, or ndrectly, by calculatng free energy changes between dfferent equlbrum states. 6

5.9 Thermodynamc ntegraton An ndrect method whch s very smlar to the way n whch free energes are calculated n real experments. Lke our smulatons, these measure dervatves of the free energy such as pressure or energy: F p = V NT ( F ) β E = Frenkel 7.2 β Bnder 5.6 So, F between two states can be calculated by ntegratng the nternal energy along a reversble path n V and T. An example s calculatng free energy of a lqud usng an equaton of state and the deal gas as a reference state. VN 5.10.1 Grand canoncal MC However, f we want to obtan absolute free energes drectly or we don t have a sutable reference state, then we can do MC n the grand canoncal or Gbbs ensemble. You mght thnk that ths would be µpt ensemble, but ths s not a vald thermodynamc ensemble because we must have at least one extensve conserved quantty or the model may evaporate or dverge wthout lmt. Actually, t s the µvt ensemble whch corresponds to the Gbbs dstrbuton (whch you derved n examples sheet 1). In µvt MC, there are three types of move: Partcle dsplacement Partcle creaton Partcle annhlaton 7

5.10.2 Grand canoncal MC Can thnk of the µvt MC as allowng the system to come to dffusve equlbrum wth a reservor of deal gas n whch the partcles do not nteract. Frenkel 5.6 Blue partcles n smulaton box nteract as normal, but transparent ones n the reservor can overlap. Both types carry the same chemcal potental µ. When a partcle moves from the reservor to the smulaton box, the only change n energy s that due to the nteracton potental. In practce, the partcle s nserted randomly nto the smulaton box. 5.10.3 Grand canoncal MC Partcle creatons are accepted wth probablty: V a( N N + 1) = mn 1, exp ) 3 λt ( N + 1) { β( µ E( N + 1) + E( N )} Partcle annhlatons are accepted wth probablty: 3 NλT a( N N 1) = mn 1, exp ) V { β( µ E( N 1) + E( N )} where λ T s the thermal wavelength (see lecture 2). The rato of creatons or annhlatons to dsplacement moves s roughly the same, as both nvolve a smlar amount of computatonal effort. Ensure reversblty! 8

5.10.4 Grand canoncal MC The free energy can then be calculated drectly from: F / N = µ p V / N The quanttes <p> and <N> are average values of pressure and number of partcles whch are measured from the smulaton over many dfferent confguratons. However, there are some techncal dffcultes wth carryng out µvt MC whch centre around the problem n creatng or annhlatng partcles n dense systems. There are varous methods to crcumvent ths problem whch nvolve the concept of confguratonal bas MC. 5.11.1 Confguratonal bas MC Frenkel 13.2.1 Bnder 6.7 There are many stuatons n whch the acceptance probabltes of tral moves n MC smulatons drop to almost zero, resultng n a very neffcent smulaton. In these crcumstances, we would lke to bas the generaton of tral moves such that they stand a greater probablty of beng accepted. It turns out we can do ths wthout affectng the equlbrum dstrbuton provded we change our acceptance probabltes Remember that we are only concerned about the rato of our transton probabltes, so we are free to ntroduce an arbtrary basng factor wthout volatng detaled balance. 9

5.11.2 Confguratonal bas MC To llustrate how the procedure works, consder a selfavodng polymer chan on a lattce wth coordnaton k (e.g. k = 4 for a smple cubc lattce n 2D). 1. Insert frst atom at random on the lattce and compute ts energy 2. The next segment has k possble drectons, so select a partcular drecton (label t n) wth probablty p (n) = exp{ βe (n)}/ w ( ) w ( n) = exp{ βe (j)} p ( n) n 3. Repeat step 2 untl the entre chan of length l s generated, and compute the Rosenbluth factor W of the new confguraton: W ( n) = l = 1 w ( n) k j= 1 5.11.4 Confguratonal bas MC To restore the symmetry of the Markov chan, we need to adjust our standard MC algorthm as follows: 1. Generate ntal confguraton usng the based scheme and compute ts Rosenbluth factor W 0 2. Generate a new confguraton usng the based scheme and compute ts Rosenbluth factor W(n) 3. Accept the tral move wth probablty: mn [ 1, W ( n) / W (0)] 4. Go back to step 2 and terate to equlbrum So, confguratons are selected accordng to ther Rosenbluth factor rather than ther energy. It s qute straghtforward to generalse ths method to off-lattce smulatons. 10

5.11.5 Confguratonal bas MC The confguratonal bas approach can be used to smulate entre macromolecules f an approprate force feld s used to compute the Rosenbluth factors. The pont s that we bas the generaton of tral conformatons towards states whch are favourable n energy (.e. are reasonably lkely to satsfy our force feld constrants) so that we don t spend all our tme generatng rdculously unphyscal chans. We then get rd of the effects of basng by adjustng our acceptance probabltes. Note that t s possble to make ths algorthm much more effcent, but the detals are beyond the scope of ths course. 5.12 Summary We started off by revewng Metropols MC. We then dscussed how to carry out MC smulatons n varous dfferent thermodynamcs ensembles other than the NVT. Of these, only the grand canoncal or µvt ensemble can be used to calculate free energes drectly. An alternatve s to calculate free energy dfferences usng thermodynamc ntegraton. Fnally, we outlned the Rosenbluth scheme for carryng out confguraton bas MC, whch enables us to deal wth smulatons where our states are hghly constraned. 11