Franz J. Vesely > MolSim Tutorial > MC advanced  
 
 





 
< >
Vesely MolSim Tutorial







2.2 Monte Carlo in other ensembles



Subsections

NPT Monte Carlo

Samples the phase space of a constant-P, constant-T ensemble with the appropriate phase space probability. In addition to the particle moves performed at constant $V,T$, changes of the volume $V$ are attempted and accepted/rejected according to a detailed balance scheme similar to the original NVT-Metropolis procedure. A simple LJ simulation of the NPT type is sketched here:

For given $T$ and $P$, let the instantaneous volume be $V$ and the particle positions $\vec{r}_{i}$, $i=1 \dots N$.
  • Choose a particle $i$ and perform a trial move $\vec{r}_{i} \rightarrow \vec{r'}_{i}$ in the usual manner. Compute the energy difference between the trial configuration and the given one: $\Delta U= U(\vec{r'}_{i})+U(\vec{r}_{i})$, where $U(\vec{r}_{i}) = \sum_{j \neq i} U_{ij}$ etc.

    Accept or reject the trial configuration with probability
    $ P_{acc}^{move}=\min\{1, \exp^{- \beta \Delta U }\} $

  • Repeat this basic MC step for a number of particles; usually all $N$ particles are treated in sequence.

  • Now perform a trial volume change $V \rightarrow V' = V+ \Delta V$; all particle coordinates are (implicitely) scaled by $f = (V'/V)^{1/3}$, which entails a change in energy of $\Delta U$.

    Compute the enthalpy change $\Delta H = \Delta U + P \Delta V$. The relative probability of the trial state as compared to the current one is then
    $ w=(V'/V)^{N} \, \exp\{-\Delta H \} $
    or
    $ w=\exp{- \beta (\Delta H - kT N \ln (V'/V))} $

    In the spirit of Metropolis' asymmetric rule, we accept/reject the new volume according to

    $ P_{acc}^{breathe}=min \left\{ 1, \exp \left[-\beta \left( \Delta H -kT \ln (V'/V) \right) \right] \right\} $

  • This ends the MC cycle.
As usual, the maximum particle step and the maximum volume change are adjusted to achieve an acceptance ratio near $0.5$.


Note 1: If you are lucky, the model pair potential may be written in the scalable form $u(r_{ij}) = f^{m} u(s_{ij})$ where $s_{ij}$ is a scaled distance, and $f$ is the scaling factor. In such cases the total potential energy after a volume change need not be recalculated from scratch; rather, we have $U'_{pot}=f^{m} \sum_{i<j}u(s_{ij})=f^{m} U_{pot}$. As an example, take the $r^{-12}$ term in the Lennard-Jones potential. When scaling all distances from $r_{ij}$ to $f r_{ij}$, where $f \equiv (V'/V)^{1/3}$, we have

$ U'_{rep}=4 \epsilon \sum_{j>i} f^{-12} r_{ij}^{-12} = 4 \epsilon f^{-12} \sum_{j>i} r_{ij}^{-12} = f^{-12} U_{rep} $



Note 2: A sample program for NPT MC (and for many other simulation techniques), may be found on the web page of Allen and Tildesley's textbook, www.ccl.net/cca/software/SOURCES/FORTRAN/allen-tildesley-book

Note 3: A JAVA applet for NPT MC (and for many other simulation techniques), may be found here: http://www.homepages.ed.ac.uk/s0095122/Applet1-page.htm


Gibbs ensemble MC

Phase separations are best studies with this method. Two separate boxes are used, and in addition to particle moves and volume changes a transfer of particles between the boxes is permitted. To achieve constant and equal temperature, pressure, and chemical potential in both boxes the following procedure (due to Panagiotopoulos) is used:

Let $V_{1,2}$ be the box volumes, with a constant $V=V_{1}+V_{2}$. The particle numbers are $N_{1,2}$, again with a constant total of $N=N_{1}+N_{2}$.
  • Choose a particle $i$ in one of the boxes and perform a trial move $\vec{r}_{i} \rightarrow \vec{r'}_{i}$ in the usual manner. Compute the energy difference between the trial configuration and the given one: $\Delta U= U(\vec{r'}_{i})+U(\vec{r}_{i})$, where $U(\vec{r}_{i}) = \sum_{j \neq i} U_{ij}$ etc.

    Accept or reject the trial configuration with probability

    $ P_{acc}^{move}=min\{1, \exp^{- \beta \Delta U }\} $

  • Repeat this basic MC step for a number of particles; usually all $N$ particles in both boxes are treated in sequence.

  • Now perform a trial volume change $V_{1} \rightarrow V_{1}' = V_{1}+ \Delta V$; since the total volume is conserved the volume $V_{2}$ must change by $-\Delta V$. In each box $m=1,2$ all particle coordinates are (implicitely) scaled by $f = (V'_{m}/V_{m})^{1/3}$, which entails a change in energy of $\Delta U_{m}$.

    Similar to NPT, the relative probability of the trial state is related to the quantity

    $ w=\exp \left\{ \Delta U_{1}+\Delta U_{2} - kT N_{1} \ln (V_{1}'/V_{1})- kT N_{2} \ln (V_{2}'/V_{2}) \right\}/kT $

    Note that the contributions to $P \Delta V$ from each box cancel each other (since $\Delta V_{1}=-\Delta V_{2}$).

    Accept/reject the volume exchange according to
    $ P_{acc}^{vol-exc}=min\{1, \exp^{-\beta \Delta H} \} $

  • Now follows the particle transfer step:

    Choose one of the boxes $m=1,2$ with equal probabilites. Choose any of the particles in box $m$, remove it, and place it at an arbitrary position in the other box, $m'$. The total Gibbs potential then changes according to

    $ \Delta G = \Delta U_{1}+\Delta U_{2} +kT \ln{\left( \frac{\textstyle V_{m} (N_{m'}+1)}{\textstyle N_{m}V_{m'}}\right) } $

    Note that the contributions from the chemical potential cancel since $\Delta N_{1}=-\Delta N_{2}$.

    Accept/reject the particle transfer according to

    $ P_{acc}^{trans}=min\{1, \exp^{-\beta \Delta G} \} $

[to be extended...]


Extended Gibbs ensemble MC

At higher densities the Gibbs ensemble MC method is plagued by a low acceptance probability of particle insertion. To overcome this problem, several authors suggested to combine the GEMC method with a kind of "scaled particle", or "extended ensemble" strategy. In the following we will describe the procedure developed by Strnad and Nezbeda (1999).

The basic idea of the extended ensemble is that in addition to the states where a box contains $N$ or $N+1$ particles, there may be a total of $k$ states in which one particle is incompletely coupled to the system, having a smaller size, or potential coupling parameter $\sigma_{i}, i=1...k$. For a complete definition of the extended ensemble, weights have to be assigned, in an arbitrary manner, to the intermediate box states. In the original work of Strnad and Nezbeda there was only one intermediate state ($k=1$), and the corresponding weight was set to $w_{1}=1$.

Generally, if all weights $w_{i}, i=1...k$ are taken to be equal, they cancel from the pertinent formulae. To keep things simple, we will therefore assume equal weights. For the same reason we will take all trial probabilities $p_{i,i \pm 1}=1/2$. Note, however, that the efficiency of the method may be much enhanced by using non-uniform weights $w_{i}$.

Instead of transferring a particle from box $m$ to $m'$ in a single step, we now subject it to a shrinking process through the $k$ intermediate sizes before it is transferred to $m'$.

Strnad and Nezbeda suggested two possible implementations of their method, denoted as EGE1 and EGE2:

EGE1: Particle $i$ in box $m$ is first shrunk to its smallest size $k$, then transferred to box $m'$, to be re-inflated there. Let the energy difference in box $m$ between the states $i+1$ and $i$ of the scaled particle be $\Delta U_{m,i,i+1} \equiv U_{m,i+1}-U_{m,i}$ etc. The acceptance probability of a decoupling/coupling step is then

$ P_{acc}^{scale}=\min\{ 1, \exp{(-\beta \Delta U_{m,i,i+1})}\} $

As soon as $i=k$, the transfer from $m$ to $m'$ is accepted with probability

$ P_{acc}^{trans}=\min\{ 1, \exp{\left(-\beta \left(U_{m',k}-U_{m,k}\right) \right)}\} $

where $U_{m',k}$ is the energy in box $m'$ upon insertion of a scaled particle in state $k$.

We expect that the latter acceptance probability, which is so small in the basic Gibbs ensemble MC, will be larger since only a minuscule new particle is inserted in $m'$.

EGE2: A particle in box $m$ is shrunk simultaneously with an inflation of another particle in box $m'$.

In a sample computation, Strnad and Nezbeda report that EGE2 shows no higher efficiency than EGE1.

[to be completed... March 02]

Lit.: Strnad and Nezbeda, Mol.Simul. 22 (1999) 183


vesely may-06

< >