From f5cf453d61448a6ce96b27728508079e7714b730 Mon Sep 17 00:00:00 2001 From: Sebastian Kloth Date: Wed, 31 Jan 2024 11:32:29 +0100 Subject: [PATCH] Fixed isf for 2d case --- src/mdevaluate/correlation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mdevaluate/correlation.py b/src/mdevaluate/correlation.py index eeb042e..e833b41 100644 --- a/src/mdevaluate/correlation.py +++ b/src/mdevaluate/correlation.py @@ -219,13 +219,13 @@ def isf( return np.sinc(distance * q / np.pi).mean() elif axis == "xy" or axis == "yx": distance = (displacements[:, [0, 1]]**2).sum(axis=1) ** 0.5 - return np.real(jn(0, distance * q / np.pi)).mean() + return np.real(jn(0, distance * q)).mean() elif axis == "xz" or axis == "zx": distance = (displacements[:, [0, 2]]**2).sum(axis=1) ** 0.5 - return np.real(jn(0, distance * q / np.pi)).mean() + return np.real(jn(0, distance * q)).mean() elif axis == "yz" or axis == "zy": distance = (displacements[:, [1, 2]]**2).sum(axis=1) ** 0.5 - return np.real(jn(0, distance * q / np.pi)).mean() + return np.real(jn(0, distance * q)).mean() elif axis == "x": distance = np.abs(displacements[:, 0]) return np.mean(np.cos(np.abs(q * distance)))