Fixed van Hove calculation in plane

This commit is contained in:
Sebastian Kloth 2024-02-06 09:38:38 +01:00
parent 8ea7da5d2f
commit befaef2dfa

View File

@ -278,11 +278,11 @@ def van_hove_self(
if axis == "all": if axis == "all":
delta_r = (vectors**2).sum(axis=1) ** 0.5 delta_r = (vectors**2).sum(axis=1) ** 0.5
elif axis == "xy" or axis == "yx": elif axis == "xy" or axis == "yx":
return (vectors[:, [0, 1]]**2).sum(axis=1) ** 0.5 delta_r = (vectors[:, [0, 1]]**2).sum(axis=1) ** 0.5
elif axis == "xz" or axis == "zx": elif axis == "xz" or axis == "zx":
return (vectors[:, [0, 2]]**2).sum(axis=1) ** 0.5 delta_r = (vectors[:, [0, 2]]**2).sum(axis=1) ** 0.5
elif axis == "yz" or axis == "zy": elif axis == "yz" or axis == "zy":
return (vectors[:, [1, 2]]**2).sum(axis=1) ** 0.5 delta_r = (vectors[:, [1, 2]]**2).sum(axis=1) ** 0.5
elif axis == "x": elif axis == "x":
delta_r = np.abs(vectors[:, 0]) delta_r = np.abs(vectors[:, 0])
elif axis == "y": elif axis == "y":