From 21dcc7641b139e7f59fc5fd3b88a4f678f86e19e Mon Sep 17 00:00:00 2001 From: Sebastian Kloth Date: Mon, 18 Dec 2023 17:02:22 +0100 Subject: [PATCH] Adjusted van_hove_self to better work with shifted_correlation --- src/mdevaluate/correlation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mdevaluate/correlation.py b/src/mdevaluate/correlation.py index 862f43d..c6a2cbd 100644 --- a/src/mdevaluate/correlation.py +++ b/src/mdevaluate/correlation.py @@ -264,8 +264,8 @@ def van_hove_self( else: raise ValueError('Parameter axis has to be ether "all", "x", "y", or "z"!') hist = np.histogram(delta_r, bins, range=(bins[0], bins[-1]))[0] - r = (bins[1:] + bins[:-1]) / 2 - return r, hist / len(start_frame) + hist = hist / (bins[1:] - bins[:-1]) + return hist / len(start_frame) def van_hove_distinct(