Periodic Boundary Conditions
   HOME

TheInfoList



OR:

Periodic boundary conditions (PBCs) are a set of
boundary condition In mathematics, in the field of differential equations, a boundary value problem is a differential equation together with a set of additional constraints, called the boundary conditions. A solution to a boundary value problem is a solution to th ...
s which are often chosen for approximating a large (infinite) system by using a small part called a ''unit cell''. PBCs are often used in
computer simulation Computer simulation is the process of mathematical modelling, performed on a computer, which is designed to predict the behaviour of, or the outcome of, a real-world or physical system. The reliability of some mathematical models can be dete ...
s and
mathematical model A mathematical model is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used in the natural sciences (such as physics, ...
s. The
topology In mathematics, topology (from the Greek language, Greek words , and ) is concerned with the properties of a mathematical object, geometric object that are preserved under Continuous function, continuous Deformation theory, deformations, such ...
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 In geometry, a torus (plural tori, colloquially donut or doughnut) is a surface of revolution generated by revolving a circle in three-dimensional space about an axis that is coplanar with the circle. If the axis of revolution does not tou ...
(
compactification Compactification may refer to: * Compactification (mathematics), making a topological space compact * Compactification (physics), the "curling up" of extra dimensions in string theory See also * Compaction (disambiguation) Compaction may refer t ...
). The large systems approximated by PBCs consist of an infinite number of unit cells. In computer simulations, one of these is the original simulation box, and others are copies called ''images''. During the simulation, only the properties of the original simulation box need to be recorded and propagated. The ''minimum-image convention'' is a common form of PBC particle bookkeeping in which each individual particle in the simulation interacts with the closest image of the remaining particles in the system. One example of periodic boundary conditions can be defined according to smooth real functions \phi: \mathbb^n \to \mathbb by : \frac \phi(a_1,x_2,...,x_n) = \frac \phi(b_1,x_2,...,x_n), : \frac \phi(x_1,a_2,...,x_n) = \frac \phi(x_1,b_2,...,x_n), : ... , : \frac \phi(x_1,x_2,...,a_n) = \frac \phi(x_1,x_2,...,b_n) for all m = 0, 1, 2, ... and for constants a_i and b_i. In
molecular dynamics Molecular dynamics (MD) is a computer simulation method for analyzing the physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamic "evolution" of the ...
simulations and
Monte Carlo molecular modeling Monte Carlo molecular modelling is the application of Monte Carlo methods to molecular problems. These problems can also be modelled by the molecular dynamics method. The difference is that this approach relies on equilibrium statistical mechanics ...
, PBCs are usually applied to calculate properties of bulk gasses, liquids, crystals or mixtures. A common application uses PBC to simulate solvated
macromolecule A macromolecule is a very large molecule important to biophysical processes, such as a protein or nucleic acid. It is composed of thousands of covalently bonded atoms. Many macromolecules are polymers of smaller molecules called monomers. The ...
s in a bath of explicit solvent.
Born–von Karman boundary condition Born–von Karman boundary conditions are periodic boundary conditions which impose the restriction that a wave function must be periodic on a certain Bravais lattice. Named after Max Born and Theodore von Kármán, this condition is often appli ...
s are periodic boundary conditions for a special system. In electromagnetics, PBC can be applied for different mesh types to analyze the electromagnetic properties of periodical structures.


Requirements and artifacts

Three-dimensional PBCs are useful for approximating the behavior of macro-scale systems of gases, liquids, and solids. Three-dimensional PBCs can also be used to simulate planar surfaces, in which case two-dimensional PBCs are often more suitable. Two-dimensional PBCs for planar surfaces are also called ''slab boundary conditions''; in this case, PBCs are used for two Cartesian coordinates (e.g., x and y), and the third coordinate (z) extends to infinity. PBCs can be used in conjunction with
Ewald summation Ewald summation, named after Paul Peter Ewald, is a method for computing long-range interactions (e.g. electrostatic interactions) in periodic systems. It was first developed as the method for calculating electrostatic energies of ionic crystals, an ...
methods (e.g., the particle mesh Ewald method) to calculate
electrostatic Electrostatics is a branch of physics that studies electric charges at rest (static electricity). Since classical times, it has been known that some materials, such as amber, attract lightweight particles after rubbing. The Greek word for amber ...
forces in the system. However, PBCs also introduce correlational artifacts that do not respect the translational invariance of the system, and requires constraints on the composition and size of the simulation box. In simulations of solid systems, the
strain Strain may refer to: Science and technology * Strain (biology), variants of plants, viruses or bacteria; or an inbred animal used for experimental purposes * Strain (chemistry), a chemical stress of a molecule * Strain (injury), an injury to a mu ...
field arising from any inhomogeneity in the system will be artificially truncated and modified by the periodic boundary. Similarly, the wavelength of sound or shock waves and
phonon In physics, a phonon is a collective excitation in a periodic, Elasticity (physics), elastic arrangement of atoms or molecules in condensed matter physics, condensed matter, specifically in solids and some liquids. A type of quasiparticle, a phon ...
s in the system is limited by the box size. In simulations containing ionic (Coulomb) interactions, the net
electrostatic charge Electric charge is the physical property of matter that causes charged matter to experience a force when placed in an electromagnetic field. Electric charge can be ''positive'' or ''negative'' (commonly carried by protons and electrons respectiv ...
of the system must be zero to avoid summing to an infinite charge when PBCs are applied. In some applications it is appropriate to obtain neutrality by adding
ion An ion () is an atom or molecule with a net electrical charge. The charge of an electron is considered to be negative by convention and this charge is equal and opposite to the charge of a proton, which is considered to be positive by conve ...
s such as
sodium Sodium is a chemical element with the symbol Na (from Latin ''natrium'') and atomic number 11. It is a soft, silvery-white, highly reactive metal. Sodium is an alkali metal, being in group 1 of the periodic table. Its only stable iso ...
or
chloride The chloride ion is the anion (negatively charged ion) Cl−. It is formed when the element chlorine (a halogen) gains an electron or when a compound such as hydrogen chloride is dissolved in water or other polar solvents. Chloride salts ...
(as
counterion 160px, Polystyrene sulfonate, a cation-exchange resin, is typically supplied with as the counterion.">cation-exchange_resin.html" ;"title="Polystyrene sulfonate, a cation-exchange resin">Polystyrene sulfonate, a cation-exchange resin, is typical ...
s) in appropriate numbers if the molecules of interest are charged. Sometimes ions are even added to a system in which the molecules of interest are neutral, to approximate the
ionic strength The ionic strength of a solution is a measure of the concentration of ions in that solution. Ionic compounds, when dissolved in water, dissociate into ions. The total electrolyte concentration in solution will affect important properties such as ...
of the solution in which the molecules naturally appear. 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 Pyroelectricity (from the two Greek words ''pyr'' meaning fire, and electricity) is a property of certain crystals which are naturally electrically polarized and as a result contain large electric fields. Pyroelectricity can be described as the a ...
in polar crystals. The size of the simulation box must also be large enough to prevent periodic artifacts from occurring due to the unphysical topology of the simulation. In a box that is too small, a macromolecule may interact with its own image in a neighboring box, which is functionally equivalent to a molecule's "head" interacting with its own "tail". This produces highly unphysical dynamics in most macromolecules, although the magnitude of the consequences and thus the appropriate box size relative to the size of the macromolecules depends on the intended length of the simulation, the desired accuracy, and the anticipated dynamics. For example, simulations of
protein folding Protein folding is the physical process by which a protein chain is translated to its native three-dimensional structure, typically a "folded" conformation by which the protein becomes biologically functional. Via an expeditious and reproduci ...
that begin from the
native state In biochemistry, the native state of a protein or nucleic acid is its properly folded and/or assembled form, which is operative and functional. The native state of a biomolecule may possess all four levels of biomolecular structure, with the s ...
may undergo smaller fluctuations, and therefore may not require as large a box, as simulations that begin from a
random coil In polymer chemistry, a random coil is a conformation of polymers where the monomer subunits are oriented randomly while still being bonded to adjacent units. It is not one specific shape, but a statistical distribution of shapes for all the ch ...
conformation. However, the effects of
solvation shell A solvation shell or solvation sheath is the solvent interface of any chemical compound or biomolecule that constitutes the solute. When the solvent is water it is called a hydration shell or hydration sphere. The number of solvent molecules sur ...
s on the observed dynamics – in simulation or in experiment – are not well understood. 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.


Practical implementation: continuity and the minimum image convention

An object which has passed through one face of the simulation box should re-enter through the opposite face—or its image should do it. 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)? The decision has no effect on the course of the simulation, but if the user is interested in mean displacements, diffusion lengths, etc., the second option is preferable.


(A) Restrict particle coordinates to the simulation box

To implement a PBC algorithm, at least two steps are needed. Restricting the coordinates is a simple operation which can be described with the following code, where x_size is the length of the box in one direction (assuming an orthogonal unit cell centered on the origin) and x is the position of the particle in the same direction: if (periodic_x) then if (x < -x_size * 0.5) x = x + x_size if (x >= x_size * 0.5) x = x - x_size end if Distance and vector between objects should obey the minimum image criterion. This can be implemented according to the following code (in the case of a one-dimensional system where dx is the distance direction vector from object i to object j): if (periodic_x) then dx = x(j) - x(i) if (dx > x_size * 0.5) dx = dx - x_size if (dx <= -x_size * 0.5) dx = dx + x_size end if For three-dimensional PBCs, both operations should be repeated in all 3 dimensions. These operations can be written in a much more compact form for orthorhombic cells if the origin is shifted to a corner of the box. Then we have, in one dimension, for positions and distances respectively: ! After x(i) update without regard to PBC: x(i) = x(i) - floor(x(i) / x_size) * x_size ! For a box with the origin at the lower left vertex ! Works for x's lying in any image. dx = x(j) - x(i) dx = dx - nint(dx / x_size) * x_size


(B) Do not restrict the particle coordinates

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: x_rsize = 1.0 / x_size; // compute only when box size is set or changed dx = x - x dx -= x_size * nearbyint(dx * x_rsize); The fastest way of carrying out this operation depends on the processor architecture. If the sign of dx is not relevant, the method dx = fabs(dx); dx -= static_cast(dx * x_rsize + 0.5) * x_size; was found to be fastest on x86-64 processors in 2013. For non-orthorhombic cells the situation is more complicated.Minimum image convention in non-cubic simulation cells
/ref> 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 Ewald summation, named after Paul Peter Ewald, is a method for computing long-range interactions (e.g. electrostatic interactions) in periodic systems. It was first developed as the method for calculating electrostatic energies of ionic crystals, an ...
.


Unit cell geometries

PBC requires the unit cell to be a shape that will tile perfectly into a three-dimensional crystal. Thus, a spherical or elliptical droplet cannot be used. A
cube In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex. Viewed from a corner it is a hexagon and its net is usually depicted as a cross. The cube is the only r ...
or
rectangular prism In geometry, a cuboid is a hexahedron, a six-faced solid. Its faces are quadrilaterals. Cuboid means "like a cube", in the sense that by adjusting the length of the edges or the angles between edges and faces a cuboid can be transformed into a cub ...
is the most intuitive and common choice, but can be computationally expensive due to unnecessary amounts of
solvent A solvent (s) (from the Latin '' solvō'', "loosen, untie, solve") is a substance that dissolves a solute, resulting in a solution. A solvent is usually a liquid but can also be a solid, a gas, or a supercritical fluid. Water is a solvent for ...
molecules in the corners, distant from the central macromolecules. A common alternative that requires less volume is the
truncated octahedron In geometry, the truncated octahedron is the Archimedean solid that arises from a regular octahedron by removing six pyramids, one at each of the octahedron's vertices. The truncated octahedron has 14 faces (8 regular hexagon, hexagons and 6 Squa ...
.


General dimension

For simulations in 2D and 3D space, cubic periodic boundary condition is most commonly used since it is simplest in coding. 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. In general dimension, unit cell can be viewed as the Wigner-Seitz cell of certain lattice packing. For example, the hypercubic periodic boundary condition corresponds to the hypercubic lattice packing. It is then preferred to choose a unit cell which corresponds to the dense packing of that dimension. In 4D this is
D4 lattice In four-dimensional Euclidean geometry, the 16-cell honeycomb is one of the three regular space-filling tessellations (or honeycombs), represented by Schläfli symbol , and constructed by a 4-dimensional packing of 16-cell facets, three around ev ...
; and
E8 lattice In mathematics, the E lattice is a special lattice in R. It can be characterized as the unique positive-definite, even, unimodular lattice of rank 8. The name derives from the fact that it is the root lattice of the E root system. The normIn t ...
in 8-dimension. The implementation of these high dimensional periodic boundary conditions is equivalent to
error correction code In computing, telecommunication, information theory, and coding theory, an error correction code, sometimes error correcting code, (ECC) is used for controlling errors in data over unreliable or noisy communication channels. The central idea is ...
approaches in
information theory Information theory is the scientific study of the quantification (science), quantification, computer data storage, storage, and telecommunication, communication of information. The field was originally established by the works of Harry Nyquist a ...
.


Conserved properties

Under periodic boundary conditions, the linear
momentum In Newtonian mechanics, momentum (more specifically linear momentum or translational momentum) is the product of the mass and velocity of an object. It is a vector quantity, possessing a magnitude and a direction. If is an object's mass an ...
of the system is conserved, but
Angular momentum In physics, angular momentum (rarely, moment of momentum or rotational momentum) is the rotational analog of linear momentum. It is an important physical quantity because it is a conserved quantity—the total angular momentum of a closed syst ...
is not. Conventional explanation of this fact is based on
Noether's theorem Noether's theorem or Noether's first theorem states that every differentiable symmetry of the action of a physical system with conservative forces has a corresponding conservation law. The theorem was proven by mathematician Emmy Noether in ...
, which states that conservation of angular momentum follows from rotational invariance of
Lagrangian Lagrangian may refer to: Mathematics * Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier ** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
. 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. Lagrangian of the particle is constant and therefore rotationally invariant, while angular momentum of the particle is not conserved. This contradiction is caused by the fact that Noether's theorem is usually formulated for closed systems. The periodic cell exchanges mass momentum, angular momentum, and energy with the neighboring cells. When applied to the
microcanonical ensemble In statistical mechanics, the microcanonical ensemble is a statistical ensemble that represents the possible states of a mechanical system whose total energy is exactly specified. The system is assumed to be isolated in the sense that it canno ...
(constant particle number, volume, and energy, abbreviated NVE), using PBC rather than reflecting walls slightly alters the sampling of the simulation due to the conservation of total linear momentum and the position of the center of mass; this ensemble has been termed the "
molecular dynamics Molecular dynamics (MD) is a computer simulation method for analyzing the physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamic "evolution" of the ...
ensemble" or the NVEPG ensemble. These additional conserved quantities introduce minor artifacts related to the statistical mechanical definition of
temperature Temperature is a physical quantity that expresses quantitatively the perceptions of hotness and coldness. Temperature is measured with a thermometer. Thermometers are calibrated in various temperature scales that historically have relied o ...
, the departure of the velocity distributions from a
Boltzmann distribution In statistical mechanics and mathematics, a Boltzmann distribution (also called Gibbs distribution Translated by J.B. Sykes and M.J. Kearsley. See section 28) is a probability distribution or probability measure that gives the probability t ...
, and violations of equipartition for systems containing particles with heterogeneous
mass Mass is an intrinsic property of a body. It was traditionally believed to be related to the quantity of matter in a physical body, until the discovery of the atom and particle physics. It was found that different atoms and different elementar ...
es. The simplest of these effects is that a system of ''N'' particles will behave, in the molecular dynamics ensemble, as a system of ''N-1'' particles. These artifacts have quantifiable consequences for small toy systems containing only perfectly hard particles; they have not been studied in depth for standard biomolecular simulations, but given the size of such systems, the effects will be largely negligible.


See also

* Helical boundary conditions *
Molecular modeling Molecular modelling encompasses all methods, theoretical and computational, used to model or mimic the behaviour of molecules. The methods are used in the fields of computational chemistry, drug design, computational biology and materials scien ...
* Software for molecular mechanics modeling


Notes


References

* See esp. pp15–20. *{{cite book , last=Schlick , first=T. , authorlink=Tamar Schlick , year=2002 , title=Molecular Modeling and Simulation: An Interdisciplinary Guide , series=Interdisciplinary Applied Mathematics , volume=21 , publisher=Springer , location=New York , isbn=0-387-95404-X See esp. pp272–6. Molecular dynamics Boundary conditions