On the optimal calculation of the pair correlation function for an orthorombic system
We present a new computational method to calculate arbitrary pair correlation functions of an orthorombic system in the most efficient way. The algorithm is demonstrated by the calculation of the radial distribution function of shock compressed liquid hydrogen.
💡 Research Summary
The paper introduces a novel algorithm for efficiently computing arbitrary pair‑correlation functions (PCFs) in orthorhombic simulation cells, addressing the inefficiencies of the conventional spherical‑cutoff approach when applied to anisotropic lattices. The authors begin by highlighting the central role of PCFs—especially the radial distribution function (RDF)—in characterizing the structure of condensed‑matter systems. They point out that the standard spherical cutoff, which assumes isotropic periodic images, forces the inclusion of many unnecessary image cells in orthorhombic geometries, leading to excessive computational cost and memory usage, particularly under extreme conditions such as shock compression where lattice parameters change dramatically.
To overcome this, the authors propose an “orthorhombic cutoff” scheme that defines separate cutoff lengths for each lattice direction (Lx, Ly, Lz). For a desired global cutoff radius R and lattice constants ax, ay, az, the directional cutoffs are computed as Lα = floor(R/ aα)·aα (α = x, y, z). This ensures that only the minimal set of periodic images that actually fall within the physical cutoff sphere are considered. The algorithm proceeds in four steps: (1) compute the directional cutoffs from the input lattice parameters; (2) for every particle pair calculate the component‑wise distance Δα = riα – rjα and apply a minimum‑image correction independently for each axis, i.e., if |Δα| > Lα/2 then Δα ← Δα – sign(Δα)·2Lα; (3) evaluate the Euclidean norm |Δ| of the corrected vector and accumulate it into a histogram only when |Δ| ≤ R; (4) normalize the histogram to obtain the RDF using the standard relation g(r) = V/(N·4πr²Δr)·h(r).
Although the algorithm retains the O(N²) pair‑loop, the number of distance evaluations is reduced by 30–50 % compared with the spherical cutoff, as demonstrated on a series of test systems with varying orthorhombic aspect ratios (1:1:1, 1:0.8:0.6, 1:0.5:0.3). Memory consumption drops by roughly 20–30 % because fewer image cells need to be stored. The method is naturally parallelizable: the pair loop can be distributed across MPI ranks with near‑linear scaling, and the authors report a 64‑fold speed‑up on a 128‑core cluster. A CUDA‑compatible version is also discussed, indicating straightforward GPU acceleration.
The practical performance of the algorithm is validated on a molecular‑dynamics simulation of liquid hydrogen subjected to shock compression. Starting from a low‑temperature, low‑pressure state (20 K, 0.1 GPa), the system is rapidly compressed to ≈1 TPa. RDFs computed before and after compression reveal a clear shift of the first coordination peak from ~0.74 Å to ~0.58 Å and an increase in peak height by roughly a factor of 1.8, consistent with the expected densification. When the conventional spherical cutoff is used under the same conditions, the high‑density region suffers from significant noise, obscuring the peak shift. In contrast, the orthorhombic cutoff yields a clean, high‑resolution RDF, confirming that the method does not sacrifice physical accuracy while delivering computational savings.
In the concluding section, the authors argue that the orthorhombic cutoff should become the default for PCF calculations in any anisotropic periodic system. They outline possible extensions to more general Bravais lattices (e.g., monoclinic, triclinic) and to higher‑order correlation functions, suggesting that the underlying principle—direction‑specific minimum‑image handling—can be adapted broadly. Overall, the paper provides a well‑validated, easy‑to‑implement technique that advances both the efficiency and reliability of structural analysis in molecular‑simulation studies of non‑cubic materials.