In spatial updating grand canonical Monte Carlo, particle transfers are implemented by examining the local environment around a point in space. In the present work, these algorithms are extended to very high densities by allowing the volume to fluctuate, thus forming a great grand canonical ensemble. Since fluctuations are unbounded, a constraint must be imposed. The constrained ensemble may be viewed as a superposition of either constant-pressure or grand canonical ensembles. Each simulation of the constrained ensemble requires a set of weights that must be determined iteratively. The outcome of a single simulation is the density of states in terms of all its independent variables. Since all extensive variables fluctuate, it is also possible to estimate absolute free energies and entropies from a single simulation. The method is tested on a system of hard spheres and the transition from the fluid to a face-centered cubic crystal is located with high precision.
In spatial updating grand canonical Monte Carlo algorithms,1,2 the elementary steps, insertions and removals, are deduced by examining the local environment around a point that is either selected at random or according to a predefined sequence. Spatial updating is more efficient than standard grand canonical updating3 and is ideal for parallel implementation via domain decomposition.2 A topic of considerable theoretical and practical importance is simulation of phase transitions involving very dense, nearly-incompressible phases, i.e., fluid-solid phase transitions. In protein crystallization, for instance, it is believed that fluid-fluid demixing is metastable against fluid-solid separation.4 Grand canonical simulations of dense phases are difficult because particle transfers have low acceptance probabilities.
Consider spatial updating grand canonical Monte Carlo for a fluid of hard spheres of diameter . The volume, , is divided into rhombic dodecahedra [the Wigner–Seitz cell of the face-centered cubic (fcc) lattice] of volume . Consider a configuration of particles at positions . A point, , is generated with uniform probability within the dodecahedron. Then, spatial updating is implemented by analyzing the local environment at point in cell where . If , particle insertion is attempted and the position of the particle is obtained at random within a sphere of diameter . Otherwise, there is one particle, , for which and . In such a case, an attempt is made to remove particle . For the hard sphere fluid, the transition from state to state is accepted according to where corresponds to insertion, (−) to removal, and is the volume of a sphere. The activity, , of the particles is defined as where is the chemical potential, is the inverse temperature,5 is the thermal De Broglie wavelength, and is Boltzmann’s constant.
The results of the grand canonical simulations, shown in Fig. 1, are in excellent agreement with the prediction of the Carnahan and Starling equation.6 In addition, the data extend to densities, , much higher than possible with standard grand canonical algorithms. For reduced densities , the hard-sphere fluid undergoes a first-order phase transition to an fcc crystal.7 The pressure and densities of the two coexisting phases are7 , , and . The solid phase is an expanded fcc crystal in which the equilibrium distance between neighboring particles is slightly greater than . In the simulations shown in Fig. 1, the distance between the centers of neighboring dodecahedra is ; thus, the stable solid phase will never be probed.
Reduced activity, , vs reduced density, , for a system of hard-spheres of diameter , obtained from spatial updating grand canonical simulations. The simulation volume is divided into rhombic dodecahedra of volume . (●): (256 cells); (○): (864 cells). The solid line is the Carnahan and Starling (Ref. 6) result. Statistical errors do not exceed the symbol sizes.
Reduced activity, , vs reduced density, , for a system of hard-spheres of diameter , obtained from spatial updating grand canonical simulations. The simulation volume is divided into rhombic dodecahedra of volume . (●): (256 cells); (○): (864 cells). The solid line is the Carnahan and Starling (Ref. 6) result. Statistical errors do not exceed the symbol sizes.
Suppose that the volume is also allowed to vary in a grand canonical system. In so doing, one forms the so-called great grand canonical ensemble8 with partition function, , defined as
In Eq. (1), is the pressure, is the energy, and is the degeneracy or the density of states or the microcanonical partition function.9 In view of the connection of with entropy, , it can be trivially shown that . Thus, the corresponding thermodynamic potential is zero. Moreover, the fluctuations of , , and , are unbounded and Monte Carlo simulations of a system with partition function given by Eq. (1) cannot be implemented.
In order to bound the range of fluctuations, a constraint or a restriction must be placed on the previous system. For example, it may be specified that varies within a lower and an upper bound, and respectively. Alternatively, upper and lower bounds may be imposed on the system volume and/or the energy. The choice of the constraint is not unique and other possibilities, such as placing high free energy barriers, also exist. The resulting system corresponds to a restricted or a constrained great grand canonical ensemble in which all intensive variables are fixed and all extensive variables fluctuate within specified bounds.
Even with the imposition of a constraint, it is still not obvious as to how this ensemble can be constructed and simulated since only two of the three intensive variables , , and , can be specified independently. Suppose that and are specified and a constraint is imposed on , i.e., . The partition function of particles at and , , is defined as
where
is the canonical partition function of a system of particles at volume and temperature . These isobaric systems must be weighted with a Boltzmann type of factor and summed to yield the desired ensemble. Assuming that the Boltzmann factor is of the type , the partition function, , of the constrained ensemble is
The set of plays the role of -dependent weights that must somehow be specified and “” signifies the presence of a constraint. It is easily checked that the assignment
i.e., the Gibbs function for particles at and will result in uniform sampling of all within . is the -dependent value of the chemical potential.
Alternatively, one may view the restricted great grand canonical ensemble as a series of grand canonical systems at the same chemical potential, , and temperature, , but at different volumes, i.e.,
with
In Eq. (6), are -dependent weights and is the grand partition of an open system at volume , and temperature . The assignment
i.e., the pressure, , of an open system at and will again result in uniform sampling.
Consider simulations of a system with partition function given by Eq. (4). Inspection of Eq. (4) indicates that three types of moves are possible: particle displacements, volume changes, and particle transfers (i.e., insertions and removals). Displacements and volume changes are accepted with ordinary criteria.10 Using spatial updating, the transfer step is accepted according to
where corresponds to insertion and (−) to removal. In Eq. (9), is the energy difference between state with particles and state with particles, , and is the volume of a sphere. Transitions that violate the constraint in Eq. (4) are rejected. The implementation of the previous simulation scheme requires specification of the temperature, , the pressure, , the type of the constraint, and a set of free energies, . The outcome of the simulation is the joint probability of , , and , , defined as
and obtained as a histogram of observations. If , it follows from Eq. (10) that within the range permitted by the constraint. From Eq. (10) it also follows that measurement of yields the density of states in terms of all its independent variables.
A suitable set of free energies, , can be found iteratively. An initial guess is made, a short simulation is executed, is determined from the measured histogram , and are estimated from Eqs. (3) and (2), and finally a refined estimate for is obtained from Eq. (5). The process is then repeated using the refined estimates for at each iteration until the resulting histograms are nearly flat. Once satisfactory estimates for have been obtained, a long simulation is executed to collect good-quality statistics and obtain .
Once has been determined, one can calculate microcanonical, canonical, grand canonical, and isobaric averages using histogram reweighting.11 For example, for particles at and , the canonical partition function, , is first found from Eq. (3) and the canonical average for the energy from
A single simulation does not explore the whole range of , , and , and it thus yields relative probabilities . Since the value of in Eq. (10) cannot be estimated, and all other partition functions obtained from contain the same arbitrary multiplicative constant. The corresponding free energies thus contain the same additive constant. However, since , , and fluctuate, the variation of the partition functions with respect to those variables can be calculated, allowing for determination of absolute free energies and entropies.12 For example, for particles at and , and may be found from via
by approximating the derivatives with difference type of equations. Likewise, the chemical potential of particles at and , is found from via
The previous method was used to find for hard sphere particles by imposing the restriction . The volume was divided into 256 dodecahedra and each simulation was executed in sweeps. One sweep comprises 256 elementary steps, each consisting of an attempted particle transfer, a volume change, and a particle displacement. Initial values were assigned to and then refined as explained previously. Once a suitable set of was determined, a long simulation of sweeps was executed to collect statistics: see Fig. 2 for a test case. For simulations at different values of , the set of was estimated by histogram reweighting11 of the data of the previous simulations.
Distribution of reduced volume, , for a hard sphere system at and .
The results for the hard sphere model, shown in Fig. 3, are in very good agreement with the results of the Carnahan and Starling6 equation. For , the range of fluctuations in was reduced to speed up the calculations . The circles correspond to results for hard spheres at fixed . The value of was determined by approximating the derivative in Eq. (13) with a centered finite difference equation. Other types of approximations gave nearly identical results. The crosses in Fig. 3 correspond to particles at fixed and and were estimated from Eq. (12).
Reduced activity, , vs reduced pressure, , for the hard sphere system obtained from great grand canonical Monte Carlo simulations. The circles, (○), correspond to particles at constant pressure. The crosses, , correspond to particles at constant volume. In the inset, the squares, (◼), are results for the Hoover and Ree model. The solid line is the Carnahan and Starling (Ref. 6) result. Statistical errors do not exceed the symbol sizes.
Reduced activity, , vs reduced pressure, , for the hard sphere system obtained from great grand canonical Monte Carlo simulations. The circles, (○), correspond to particles at constant pressure. The crosses, , correspond to particles at constant volume. In the inset, the squares, (◼), are results for the Hoover and Ree model. The solid line is the Carnahan and Starling (Ref. 6) result. Statistical errors do not exceed the symbol sizes.
A simple way to locate the fluid-solid transition for the hard sphere model is to simulate the solid phase independently and compare the values of and of the fluid with those of the solid. In order to prevent the fluid from solidifying at high densities, an additional constraint was placed on the minimum allowed volume. In this way, the curve of the fluid can be extended to high densities , for which the fluid may be metastable against the solid. Assuming that the solid phase is of the fcc type without vacancies, the properties of the solid may be estimated from a modification of the cell model of Hoover and Ree.7 In this model, the simulation volume is divided into dodecahedra. Each dodecahedron may be either empty or occupied by one particle. This model was simulated using the same procedure as the hard sphere fluid and the value of that corresponds to full occupancy (i.e., ) was determined as a function of : see the inset of Fig. 3. The point at which the two curves intersect defines coexistence. For , the coexisting properties are: , , , and .
The present algorithm allows for determination of the density of states, , in terms of all its independent variables. In addition, since , , and fluctuate, the variation of the partition functions with respect to those variables may be estimated, allowing for calculation of absolute free energies. The technique described here executes a nearly uniform random walk in , , and . In other techniques of the same type, i.e., flat-histogram13,14 or tempering15,16 techniques, one (or more) of the variables is kept fixed and thus only free energy differences can be calculated. If absolute free energies are desired, a series of simulations toward a state of known free energy (e.g., ideal gas) must be employed.
Shell et al.17 have proposed a technique that also implements a uniform random walk in , , and . The difference between the present method and that of Shell et al. is the nature of the particle transfer step. In this work, the combination of spatial updating with volume dilations and contractions allows the simulation to explore very high densities and results in enhanced statistical performance. If the instantaneous value of the volume of a given configuration of particles is greater (less) than the average, then it will rapidly fill with (become depleted of) particles. In the context of fluid-solid and solid-solid transitions, the lattice or phase switch Monte Carlo method of Wilding and Bruce18 is currently the only method that leads to direct determination of phase equilibria of this type.
The approximation of derivatives with difference equations appears frequently in statistical mechanics. For example, the calculation of via test particle insertions19 is based on this type of approximation. Although there are no inconsistencies in the data shown in Fig. 3, sufficient care must be exercised if precise results are required. In the approximation of a derivative with a centered finite difference, the error of the estimate scales linearly with the square of the spacing of the discrete points. Hence, a linear fit of the estimate versus the square of the spacing will result in a better prediction of the derivative.
The primary factor that determines the length of a simulation is the number of entries in the histogram of , , and , . Each entry must the visited a sufficient number of times to allow for a precise determination of and a consistent calculation of the required derivatives without noise. In this work, it was assumed that the stable solid structure is of the fcc type without vacancies or lattice defects. Future work comprises investigations of the relative stability of other lattice types, such as the hexagonal closed-packed structure, as well as consideration of the effects of vacancies, lattice defects, and impurities. The present technique is ideal in simulations of second-order phase transitions because a single simulation may yield the required information to implement a complete finite-size scaling analysis.20