Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
// PairDistance: the distance between two points in a cubic periodic box of
// side Box, each coordinate difference taken by the minimum image
// convention. HYPOT adds the squares without overflowing on the way.
USE md.MinimumImage
FUNCTION PairDistance(A : LIST OF FLOAT, B : LIST OF FLOAT, Box : FLOAT) RETURNS FLOAT
REQUIRE LENGTH(A) == 3 AND LENGTH(B) == 3 AND Box > 0.0
DECLARE Dx : FLOAT <- MinimumImage(A[0] - B[0], Box)
DECLARE Dy : FLOAT <- MinimumImage(A[1] - B[1], Box)
DECLARE Dz : FLOAT <- MinimumImage(A[2] - B[2], Box)
RETURN HYPOT(HYPOT(Dx, Dy), Dz)
ENDFUNCTION