From 9cbdd2b4641ae81b981335e46b9a2f90b1426e26 Mon Sep 17 00:00:00 2001 From: Sebastian Kloth Date: Tue, 26 Sep 2023 16:23:14 +0200 Subject: [PATCH] Fixed vectors to take box of each frame --- mdevaluate/coordinates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdevaluate/coordinates.py b/mdevaluate/coordinates.py index fb99b93..c976e2d 100755 --- a/mdevaluate/coordinates.py +++ b/mdevaluate/coordinates.py @@ -551,7 +551,7 @@ def pore_coordinates(coordinates, origin, sym_axis="z"): @map_coordinates -def vectors(coordinates, atoms_a, atoms_b, normed=False, box=None): +def vectors(coordinates, atoms_a, atoms_b, normed=False): """ Compute the vectors between the atoms of two subsets. @@ -580,6 +580,7 @@ def vectors(coordinates, atoms_a, atoms_b, normed=False, box=None): coords[6] - (coords[7] + coords[8])/2, ]) """ + box = coordinates.box coords_a = coordinates[atoms_a] if len(coords_a.shape) > 2: coords_a = coords_a.mean(axis=0)