Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Efficient implementation of periodic boundary conditions through integer calculations



Eugene Paulechka, Dzmitry V. Shakhno, Aleh V. Shakhno


Determination of the shortest distances between particles is one of the most time-consuming parts of molecular simulation. In this work, we demonstrate that the use of signed-integer storage of coordinates in a scaled box allows one to skip multiple conditional statements in realization of the periodic boundary conditions, which, in turn, increases the performance. Performance of the improved procedure was tested in the NVT Monte Carlo simulations for liquid krypton and water.
Journal of Computational Chemistry


molecular simulation, integer arithmetic, periodic boundary conditions


Paulechka, E. , Shakhno, D. and Shakhno, A. (2018), Efficient implementation of periodic boundary conditions through integer calculations, Journal of Computational Chemistry, [online],, (Accessed July 19, 2024)


If you have any questions about this publication or are having problems accessing it, please contact

Created December 18, 2018, Updated October 14, 2021