The topology of two-dimensional PBC is equal to that of a world map of some video games; the geometry of the unit cell satisfies perfect two-dimensional tiling, and when an object passes through one side of the unit cell, it re-appears on the opposite side with the same velocity.
In topological terms, the space made by two-dimensional PBCs can be thought of as being mapped onto a torus (compactification).
However, PBCs also introduce correlational artifacts that do not respect the translational invariance of the system,[3] and requires constraints on the composition and size of the simulation box.
Similarly, the wavelength of sound or shock waves and phonons in the system is limited by the box size.
In some applications it is appropriate to obtain neutrality by adding ions such as sodium or chloride (as counterions) in appropriate numbers if the molecules of interest are charged.
Maintenance of the minimum-image convention also generally requires that a spherical cutoff radius for nonbonded forces be at most half the length of one side of a cubic box.
Even in electrostatically neutral systems, a net dipole moment of the unit cell can introduce a spurious bulk-surface energy, equivalent to pyroelectricity in polar crystals.
A common recommendation based on simulations of DNA is to require at least 1 nm of solvent around the molecules of interest in every dimension.
Evidently, a strategic decision must be made: Do we (A) “fold back” particles into the simulation box when they leave it, or do we (B) let them go on (but compute interactions with the nearest images)?
Then we have, in one dimension, for positions and distances respectively: Assuming an orthorhombic simulation box with the origin at the lower left forward corner, the minimum image convention for the calculation of effective particle distances can be calculated with the “nearest integer” function as shown above, here as C/C++ code: The fastest way of carrying out this operation depends on the processor architecture.
[7] In simulations of ionic systems more complicated operations may be needed to handle the long-range Coulomb interactions spanning several box images, for instance Ewald summation.
A cube or rectangular prism is the most intuitive and common choice, but can be computationally expensive due to unnecessary amounts of solvent molecules in the corners, distant from the central macromolecules.
In computer simulation of high dimensional systems, however, the hypercubic periodic boundary condition can be less efficient because corners occupy most part of the space.
The implementation of these high dimensional periodic boundary conditions is equivalent to error correction code approaches in information theory.
Conventional explanation of this fact is based on Noether's theorem, which states that conservation of angular momentum follows from rotational invariance of Lagrangian.
However, this approach was shown to not be consistent: it fails to explain the absence of conservation of angular momentum of a single particle moving in a periodic cell.