Fixed bug in vectors()

This commit is contained in:
Sebastian Kloth 2023-11-12 17:37:15 +01:00
parent 2904d1e4d8
commit a4c365c4a1

View File

@ -514,7 +514,7 @@ def vectors(coordinates, atoms_a, atoms_b, normed=False):
coords_b = coords_b.mean(axis=0) coords_b = coords_b.mean(axis=0)
vec = pbc_diff(coords_a, coords_b, box=box) vec = pbc_diff(coords_a, coords_b, box=box)
if normed: if normed:
vec / np.linalg.norm(vec, axis=-1).reshape(-1, 1) vec /= np.linalg.norm(vec, axis=-1).reshape(-1, 1)
vec.reference = coords_a vec.reference = coords_a
return vec return vec