Periodic boundary conditions: when is Eij$ \ne$Eji?



Mihaly Mezei

Department of Physiology and Biophysics
Mount Sinai School of Medicine, CUNY,
New York, NY 10029, USA.

Periodic boundary conditions have been proven to be extremely useful in the simulation of fluid phase systems. They can, however, give rise to an interesting artifact under some rare circumstances, as described in this note.

The question posed in the title actually has two possible answers. The first answer refers to the finite precision of the floating-point representation of real numbers used in present-day computers. This finite precision makes the result of all computations dependent on the order of operations, albeit generally to a small degree.

The second answer is more interesting. In general, a rectangular cell is defined by

- Lk/2 < xk$\displaystyle \le$Lk/2, k = 1, 2, 3 (1)

Applying the periodic boundary conditions under the minimum image convention to the interaction of particle i with particle j requires the selection of the image of j nearest to i. In the special (and rare) case when | xik - xkj| = Lk/2, due to the difference between ``<'' and ``$ \le$'' in Eq.(1), the translation giving the image of j nearest to i will not be the negative of the translation giving the image of i nearest to j.

When can this be a problem? Since potentials in general depend on the absolute value of interatomic distances, the energy of atomic fluids are not affected since this discrepancy in the images does not affect |$ \bf r^{i}_{}$ - $ \bf r^{j}_{}$|, but it does change the corresponding force component. When molecular systems are simulated using group based cutoff, the energy between molecules (or groups/residues) i and j will differ nontrivially since the different translation of the molecule will result in a different set of interatomic distances.

Even in this case, the argument can be made that the switch from one translation to the other is occurring anyway when molecule j actually crosses the boundary of the box around i, so it is of little importance. However, in a Monte Carlo simulation where the self-tests suggested in [1] are periodically executed, it can show up as a discrepancy between the energy calculated freshly from the coordinates and the energy ``carried'' during the calculation. In fact, the observation about this artifact started as a lengthy debugging effort when, after several hundred million steps of simulating lipid bilayers with the MMC program [2] a discrepancy popped up between the carried and recalculated energy of one of the lipid molecules. This event thus serves as a demonstration of the facts that (a) the artifact discussed here can occur, but (b) very rarely.

Bibliography

1
 M. Mezei, A comment on debugging Monte Carlo programs, INFORMATION QUARTERLY for COMPUTER SIMULATION of CONDENSED PHASES, No 23, (1986).

2
 M. Mezei, MMC Monte Carlo program for the simulation and analysis of molecular assemblies, URL: http://inka.mssm.edu/$ \sim$mezei/mmc


Newsletter Index