Periodic boundary conditions

Periodic boundary conditions in 2D
Unit cell with water molecules, used to simulate flowing water

Periodic boundary conditions (PBCs) are a set of boundary conditions 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 simulations and mathematical models. 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). 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 by

for all m = 0, 1, 2, ... and for constants and .

In molecular dynamics simulations and Monte Carlo molecular modeling, PBCs are usually applied to calculate properties of bulk gasses, liquids, crystals or mixtures.[1] A common application uses PBC to simulate solvated macromolecules in a bath of explicit solvent. Born–von Karman boundary conditions 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.[2]

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 methods (e.g., the particle mesh Ewald method) to calculate electrostatic forces in the system. 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.

In simulations of solid systems, the strain 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 phonons in the system is limited by the box size.

In simulations containing ionic (Coulomb) interactions, the net electrostatic charge 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 ions such as sodium or chloride (as counterions) 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 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 in polar crystals. Another consequence of applying PBCs to a simulated system such as a liquid or a solid is that this hypothetical system has no contact with its “surroundings”, due to it being infinite in all directions. Therefore, long-range energy contributions such as the electrostatic potential, and by extension the energies of charged particles like electrons, are not automatically aligned to experimental energy scales. Mathematically, this energy level ambiguity corresponds to the sum of the electrostatic energy being dependent on a surface term that needs to be set by the user of the method.[4]

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 that begin from the native state may undergo smaller fluctuations, and therefore may not require as large a box, as simulations that begin from a random coil conformation. However, the effects of solvation shells 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.[5]

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[j] - x[i];
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<int>(dx * x_rsize +  0.5) * x_size;

was found to be fastest on x86-64 processors in 2013.[6]

For non-orthorhombic cells the situation is more complicated.[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.

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 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. A common alternative that requires less volume is the truncated octahedron.

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.[8] 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; and E8 lattice in 8-dimension. The implementation of these high dimensional periodic boundary conditions is equivalent to error correction code approaches in information theory.[9]

Conserved properties

Under periodic boundary conditions, the linear momentum of the system is conserved, but Angular momentum is not. 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.[10] 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 (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 ensemble"[11] or the NVEPG ensemble.[12] These additional conserved quantities introduce minor artifacts related to the statistical mechanical definition of temperature, the departure of the velocity distributions from a Boltzmann distribution, and violations of equipartition for systems containing particles with heterogeneous masses. 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.[12]

See also

Notes

  1. ^ Frenkel, Daan; Smit, Berend (2002). Understanding molecular simulation : from algorithms to applications (2nd ed.). San Diego. ISBN 978-0-08-051998-2. OCLC 173686073.{{cite book}}: CS1 maint: location missing publisher (link)
  2. ^ Mai, W.; Li, P.; Bao, H.; Li, X.; Jiang, L.; Hu, J.; Werner, D. H. (April 2019). "Prism-Based DGTD With a Simplified Periodic Boundary Condition to Analyze FSS With D2n Symmetry in a Rectangular Array Under Normal Incidence". IEEE Antennas and Wireless Propagation Letters. 18 (4): 771–775. Bibcode:2019IAWPL..18..771M. doi:10.1109/LAWP.2019.2902340. ISSN 1536-1225. S2CID 106411612.
  3. ^ Cheatham, T. E.; Miller, J. H.; Fox, T.; Darden, P. A.; Kollman, P. A. (1995). "Molecular Dynamics Simulations on Solvated Biomolecular Systems: The Particle Mesh Ewald Method Leads to Stable Trajectories of DNA, RNA, and Proteins". Journal of the American Chemical Society. 117 (14): 4193–4194. doi:10.1021/ja00119a045.
  4. ^ Kleinman, Leonard (1981). "Comment on the average potential of a Wigner solid". Physical Review B. 24 (12): 7412–7414. Bibcode:1981PhRvB..24.7412K. doi:10.1103/PhysRevB.24.7412. ISSN 0163-1829.
  5. ^ de Souza, O. N.; Ornstein, R. L. (1997). "Effect of periodic box size on aqueous molecular dynamics simulation of a DNA dodecamer with particle-mesh Ewald method". Biophys J. 72 (6): 2395–2397. Bibcode:1997BpJ....72.2395D. doi:10.1016/s0006-3495(97)78884-2. PMC 1184438. PMID 9168016.
  6. ^ Deiters, Ulrich K. (2013). "Efficient coding of the minimum image convention". Z. Phys. Chem. 227 (2–3): 345–352. doi:10.1524/zpch.2013.0311. S2CID 100761423.
  7. ^ Minimum image convention in non-cubic simulation cells
  8. ^ Berthier, Ludovic; Charbonneau, Patrick; Kundu, Joyjit (31 August 2020). "Finite Dimensional Vestige of Spinodal Criticality above the Dynamical Glass Transition". Physical Review Letters. 125 (10): 108001. arXiv:1912.11510. Bibcode:2020PhRvL.125j8001B. doi:10.1103/PhysRevLett.125.108001. PMID 32955295. S2CID 221562320.
  9. ^ Conway, J.; Sloane, N. (March 1982). "Fast quantizing and decoding and algorithms for lattice quantizers and codes". IEEE Transactions on Information Theory. 28 (2): 227–232. CiteSeerX 10.1.1.392.249. doi:10.1109/TIT.1982.1056484.
  10. ^ Kuzkin, V. A. (2015). "On angular momentum balance in particle systems with periodic boundary conditions". ZAMM. 95 (11): 1290–1295. arXiv:1312.7008. Bibcode:2015ZaMM...95.1290K. doi:10.1002/zamm.201400045. S2CID 54880840.
  11. ^ Erpenbeck, J. J.; Wood, W. W. (1977). Berne, B. J. (ed.). Statistical Mechanics, Part B: Time-dependent Processes. Modern Theoretical Chemistry. Vol. 6. New York: Plenum. pp. 1–40. ISBN 0-306-33506-9.
  12. ^ a b Shirts, R. B.; Burt, S. R.; Johnson, A. M. (2006). "Periodic boundary condition induced breakdown of the equipartition principle and other kinetic effects of finite sample size in classical hard-sphere molecular dynamics simulation". J Chem Phys. 125 (16): 164102. Bibcode:2006JChPh.125p4102S. doi:10.1063/1.2359432. PMID 17092058.

References

  • Rapaport, D. C. (2004). The Art of Molecular Dynamics Simulation (2nd ed.). Cambridge University Press. ISBN 0-521-82568-7. See esp. pp15–20.
  • Schlick, T. (2002). Molecular Modeling and Simulation: An Interdisciplinary Guide. Interdisciplinary Applied Mathematics. Vol. 21. New York: Springer. ISBN 0-387-95404-X. See esp. pp272–6.

Read other articles:

Aleksei Ionov Ionov berseragam Dynamo Moscow pada tahun 2013Informasi pribadiNama lengkap Aleksei Sergeyevich IonovTanggal lahir 18 Februari 1989 (umur 35)Tempat lahir Kingisepp, RusiaTinggi 1,77 m (5 ft 9+1⁄2 in)Posisi bermain GelandangInformasi klubKlub saat ini Dynamo MoscowNomor 99Karier junior–2007 Zenit St. PetersburgKarier senior*Tahun Tim Tampil (Gol)2007–2011 Zenit St. Petersburg 57 (8)2012–2013 Kuban Krasnodar 37 (3)2013 Anzhi Makhachkala 6 (0)2013�...

 

Spanish historian and writer This article is an orphan, as no other articles link to it. Please introduce links to this page from related articles; try the Find link tool for suggestions. (February 2024) Manuel García GargalloBorn (1973-06-24) 24 June 1973 (age 50)Barcelona, Catalonia, SpainOccupationWriter, researcher, historianLanguageSpanish, CatalanNationalitySpanishGenreHistory of sport, classical music Manuel García Gargallo (Barcelona, 24 June 1973) is a Spanish researcher and w...

 

العلاقات البحرينية التشيكية البحرين التشيك   البحرين   التشيك تعديل مصدري - تعديل   العلاقات البحرينية التشيكية هي العلاقات الثنائية التي تجمع بين البحرين والتشيك.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وجه المقارن...

قرية نيو هارتفورد   الإحداثيات 43°04′09″N 75°17′18″W / 43.0692°N 75.2883°W / 43.0692; -75.2883   [1] تقسيم إداري  البلد الولايات المتحدة[2]  التقسيم الأعلى مقاطعة أونيدا  خصائص جغرافية  المساحة 1.603841 كيلومتر مربع1.597401 كيلومتر مربع (1 أبريل 2010)  ارتفاع 165 متر  ...

 

Sultan Terengganuسلطان ترڠݢانوLambang Kebawah Duli Yang Maha Mulia Sultan TerengganuSedang berkuasaAl-Wathiqu Billah Sultan Mizan Zainal Abidin ibni Almarhum Sultan Mahmud Al-Muktafi Billah Shahsejak 15 Mei 1998Pertabalan 4 Maret 1999 PerincianSapaan resmiPadukaPewarisTengku Muhammad IsmailPenguasa pertamaZainal Abidin IPembentukan1725; 298 tahun lalu (1725)KediamanIstana Syarqiyyah, Kuala Terengganu Sultan Terengganu adalah gelar kepala konstitusional dari negara bagian...

 

Cet article est une ébauche concernant une localité catalane. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Ne doit pas être confondu avec Calella de Palafrugell. Calella Héraldique La plage de Calella Administration Pays Espagne Statut Commune Communauté autonome Catalogne Province Province de Barcelone Comarque Maresme Maire Mandat Marc Buch (Junts) 2023-2027 Code postal 08370 Démographie Gentilé cale...

В Википедии есть статьи о других людях с именем Карл I. Карл Великийлат. Carolus Magnus нем. Karl der Große фр. Charlemagne Монета Карла Великого, изображающая его в традиционной римской одежде. Карл, будучи в Риме, был вынужден дважды надевать тогу. Надпись: KAROLVS IMP AVG Король франков 24 �...

 

United States Marine Corps general Loretta E. ReynoldsReynolds in July 2018Nickname(s)LoriAllegianceUnited StatesService/branchUnited States Marine CorpsYears of service1986–2021RankLieutenant GeneralCommands heldMarine Corps Forces Strategic CommandMarine Corps Cyberspace CommandMarine Corps Recruit Depot Parris Island9th Communication BattalionBattles/warsIraq WarWar in AfghanistanAwardsDefense Superior Service MedalLegion of MeritBronze Star Medal Loretta Eleanor Lori Reynolds[1...

 

This article uses bare URLs, which are uninformative and vulnerable to link rot. Please consider converting them to full citations to ensure the article remains verifiable and maintains a consistent citation style. Several templates and tools are available to assist in formatting, such as reFill (documentation) and Citation bot (documentation). (August 2022) (Learn how and when to remove this message) Town and district capital in Kelantan Darul Naim, MalaysiaPasir Mas Pase MahTown and distric...

American football player (1943–2019) For the English boxer, see Roy Hilton (boxer). Roy HiltonNo. 85, 78Born:(1943-03-23)March 23, 1943Hazlehurst, Mississippi, U.S.Died:January 6, 2019(2019-01-06) (aged 75)Towson, Maryland, U.S.Career informationPosition(s)Defensive endHeight6 ft 6 in (198 cm)Weight240 lb (110 kg)CollegeJackson StateAFL draft1965, Round: 8, Pick: 59Drafted byHouston OilersNFL draft1965, Round: 15, Pick: 210Drafted byBaltimore Col...

 

Folio 14 recto del Vergilius romanus, del V secolo, che contiene un ritratto di Virgilio. La capitale libraria, detta anche actuaria, è una scrittura calligrafica maiuscola dell'antica Roma. Indice 1 Descrizione 2 Note 3 Voci correlate 4 Altri progetti 5 Collegamenti esterni Descrizione La capitale libraria è un adattamento della scrittura epigrafica romana nella sua forma consueta. È simile alla capitale quadrata e documentaria ma con forme meno rigide, avendo più influenza sulla scrittu...

 

National park in São Tomé and Príncipe For the protected area on Príncipe island, see Parque Natural Obô do Príncipe. Parque Natural Obô de São ToméPico São ToméLocation in São Tomé and PríncipeCoordinates0°13′N 6°34′E / 0.217°N 6.567°E / 0.217; 6.567Area195 km2 (75 sq mi)Created2006 The Obô Natural Park of São Tomé (Portuguese: Parque Natural Obô de São Tomé) is a natural park of São Tomé and Príncipe, covering 195 km...

Pujangga dan kesatria pra-islam Antarah ibn Shaddad adalah sang pahlawan dalam romansa Arab yang populer. Sastra epos Arab meliputi epos puisi dan epos fantasi dalam kesusastraan Arab. Hampir semua masyarakat membudayakan folklor yang mencakup kisah-kisah kepahlawanan. Meskipun banyak yang berupa legenda, ada juga yang didasarkan pada peristiwa nyata dan tokoh-tokoh sejarah. Epos puisi Taghribat Bani Hilal adalah epos Arab yang menceritakan perjalanan Banu Hilal dari Mesir ke Tunisia dan pena...

 

Cet article est une ébauche concernant une localité indonésienne. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. DenpasarGéographiePays  IndonésieProvince province de Bali (capitale)Superficie 127,78 km2Subdivisions Denpasar Barat (d)Denpasar Selatan (d)Denpasar Timur (d)Denpasar Utara (d)Altitude 4 m, 34 mCoordonnées 8° 39′ 00″ S, 115° 13′ 00″ EDémographiePop...

 

Earthquake in Iran 2006 Borujerd earthquakeTehranUTC time2006-03-31 01:17:00ISC event10614039USGS-ANSSComCatLocal dateMarch 31, 2006 (2006-03-31)Local time04:47Magnitude6.1 Mw [1]Depth7.0 km (4.3 mi)Epicenter33°34′N 48°44′E / 33.56°N 48.73°E / 33.56; 48.73 [1]TypeStrike-slip[2]Areas affectedIranTotal damage$42.262 million / moderate [2][3]Max. intensityMMI VIII (Severe)[4&#...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يوليو 2020) كنيسة مريم العذراء معلومات أساسيّة الانتماء الديني كنيسة الأرمن الأرثوذكس، أبرشية بيرويا المدينة حلب،  سوريا نوع العمارة كنيسة الطراز المعماري عمارة أر�...

 

Livonia pada tahun 1534 Livonia Swedia, di antara Estonia Swedia dan Courland (1600an) Livonia pada tahun 1820 Livonia[a] atau dalam catatan awal Livland,[1] adalah wilayah historis di pantai timur Laut Baltik. Tempat ini dinamai dari orang Livonia, yang tinggal di pantai Latvia saat ini. Pada akhir abad ke-13, namanya meluas kepada sebagian besar Estonia dan Latvia saat ini, ditaklukan oleh Saudara Pedang Livonia selama Perang Salib Livonia (1193–1290). Livonia abad perteng...

 

هذه المقالة بحاجة لصندوق معلومات. فضلًا ساعد في تحسين هذه المقالة بإضافة صندوق معلومات مخصص إليها. سقاية حسب الله الشابندر هي إحدى سقايات بغداد المخصصة للنفع العام، في فترة الدولة العثمانية، ولم يعرف تاريخ تأسيسها. الا ان المؤرخ التركي أوليا جلبي ذكر هذه السقاية اثناء رحل�...

American vocal quartet Four TopsThe Four Tops in 1968. (L-to-R) Levi Stubbs, Renaldo Obie Benson, Abdul Duke Fakir, and Lawrence PaytonBackground informationAlso known asthe Four Tops, the Four Aims, the TopsOriginDetroit, Michigan, U.S.GenresSoulR&BpopDiscographyFour Tops discographyYears active1953–presentLabelsChessRed TopRiversideColumbiaMotownABC-DunhillCasablancaAristaMembersAbdul Duke FakirRonnie McNeirLawrence Payton Jr. Alexander MorrisPast membersLevi StubbsRenaldo Obie Benson...

 

Park and historic house museum in London Osterley HouseTypeCountry houseLocationJersey Road, Isleworth, UKCoordinates51°29′21.75″N 00°21′07.14″W / 51.4893750°N 0.3519833°W / 51.4893750; -0.3519833Built1570sBuilt forSir Thomas GreshamRebuilt1761–1765Current useHistoric house museumArchitectRobert Adam (1760s)OwnerNational Trust Listed Building – Grade IOfficial nameOsterley HouseDesignated21 May 1973Reference no.1080308 Location of Osterley House in...