From 4047db209c7e9c8e1b9c34e04313252a370d2f32 Mon Sep 17 00:00:00 2001 From: robrobo Date: Fri, 11 Jul 2025 20:59:30 +0200 Subject: [PATCH] using pbc_diff now in tetrahedral_order parameter calculation, since reference positions will not be periodic images in the default use case --- src/mdevaluate/distribution.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mdevaluate/distribution.py b/src/mdevaluate/distribution.py index 847d005..3bce0f7 100644 --- a/src/mdevaluate/distribution.py +++ b/src/mdevaluate/distribution.py @@ -182,10 +182,10 @@ def tetrahedral_order( ) # Connection vectors - neighbors_1 -= atoms - neighbors_2 -= atoms - neighbors_3 -= atoms - neighbors_4 -= atoms + neighbors_1 = pbc_diff(neighbors_1, atoms, box=atoms.box) + neighbors_2 = pbc_diff(neighbors_2, atoms, box=atoms.box) + neighbors_3 = pbc_diff(neighbors_3, atoms, box=atoms.box) + neighbors_4 = pbc_diff(neighbors_4, atoms, box=atoms.box) # Normed Connection vectors neighbors_1 /= np.linalg.norm(neighbors_1, axis=-1).reshape(-1, 1)