**2022: SklogWiki celebrates 15 years on-line**

# Grand canonical Monte Carlo

**Grand-canonical ensemble Monte Carlo** (GCEMC or GCMC) is a very versatile and powerful Monte Carlo technique that explicitly accounts for density fluctuations at fixed volume and temperature. This is achieved by means of trial insertion and deletion of molecules. Although this feature has made it the preferred choice for the study of interfacial phenomena, in the last decade
grand-canonical ensemble simulations have also found widespread applications in the study of bulk properties. Such applications had been hitherto limited by the very low particle insertion and deletion probabilities, but the development of the configurational bias grand canonical technique has very much improved the situation.

## Theoretical basis[edit]

In the grand canonical ensemble, one first chooses randomly whether a trial particle insertion or deletion is attempted. If insertion is chosen, a particle is placed with uniform probability density inside the system. If deletion is chosen, then one deletes one out of particles randomly. The trial move is then accepted or rejected according to the usual Monte Carlo lottery. As usual, a trial move from an original state () to a new state () is accepted with probability

where is given by:

Here, is the probability density of attempting trial move from state to state (also known as underlying probability), while is the probability density of state .

As noted by Norman and Filinov ^{[1]}, evaluation of the proper acceptance rules requires very careful interpretation of the (classical) grand canonical probability density:

where is the total number of particles, is the chemical potential, and is the de Broglie thermal wavelength.

The sub-index *L* makes emphasis on a particular definition of microstate in which particles are assumed to be distinguishable. Thus, should be interpreted as the probability density of a classical state with labelled particles, having labelled particle 1 in position , labelled particle 2 in position and so on. Since labelling of the particles has no physical significance whatsoever, there are identical states which result from permutation of the labels (this explains the term in the denominator). Hence, the probability of the significant microstate of undistinguishable particles, i.e., one with particles at positions , , etc., irrespective of the labels, will be given by:

where the subindex stands for *unlabelled*, the coordinates in parenthesis indicate that the positions are not attributed to any particular choice of labelling and the sum runs over all possible particle label permutations.

Upon trial insertion of an extra particle, one obtains:

The probability density of attempting an insertion is . The factor accounts for the probability of attempting an insertion (from the choice of insertion or deletion). The factor results from placing the particle with uniform probability anywhere inside the simulation box. The reverse attempt (moving from state of particles to the original particle state) is chosen with probability:

where the factor results from random removal of one among particles. Therefore, the ratio of underlying probabilities is:

Substitution of Eq.(3) and Eq.(4) into Eq.(1) yields the acceptance probability for attempted insertions:

For the inverse deletion process, similar arguments yield:

Alternatively, one could derive the acceptance rules by considering the probability density of labelled states, Eq.(2) but taking into account that there are then labelled microstates leading to the original particle labelled state upon deletion (one for each possible label permutation of the deleted particle).

The same acceptance rules are obtained in reference books. Usually the problem of proper counting of states is circumvented by ignoring the labelling problem and assuming that the underlying probabilities for insertion and removal are equal.

## See also[edit]

## References[edit]

- ↑ G. E. Norman and V. S. Filinov "Investigations of phase transitions by a Monte-Carlo method", High Temperature
**7**pp. 216-222 (1969)

**Related reading**

- D. J. Adams "Chemical potential of hard-sphere fluids by Monte Carlo methods", Molecular Physics
**28**pp. 1241-1252 (1974) - D. J. Adams "Grand canonical ensemble Monte Carlo for a Lennard-Jones fluid", Molecular Physics
**29**pp. 307-311 (1975) - Attila Malasics, Dirk Gillespie, and Dezső Boda "Simulating prescribed particle densities in the grand canonical ensemble using iterative algorithms", Journal of Chemical Physics
**128**124102 (2008)