From b9029ada7785f2efe3e70833cb0bd99f317f186e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Jun 2017 00:07:59 -0400 Subject: [PATCH] fix bug in incorrect use of O coordinate instead of M coordinate in pppm/tip4p --- src/KSPACE/pppm_tip4p.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 259def7c9a..1ffa47584e 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -332,9 +332,9 @@ void PPPMTIP4P::fieldforce_ad() const double qfactor = qqrd2e * scale; - s1 = x[i][0]*hx_inv; - s2 = x[i][1]*hy_inv; - s3 = x[i][2]*hz_inv; + s1 = xi[0]*hx_inv; + s2 = xi[1]*hy_inv; + s3 = xi[2]*hz_inv; sf = sf_coeff[0]*sin(2*MY_PI*s1); sf += sf_coeff[1]*sin(4*MY_PI*s1); sf *= 2.0*q[i]*q[i];