From e044ccbbb34076a4b8bafd33de5878ee57ff1668 Mon Sep 17 00:00:00 2001 From: Shern Tee Date: Wed, 17 May 2023 16:41:21 +1000 Subject: [PATCH] Bugfix fix_efield.cpp for atom-style energy --- src/fix_efield.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index d1765ed536..7880655973 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -395,7 +395,7 @@ void FixEfield::post_force(int vflag) } f[i][2] += fz; fsum[3] += fz; - if (estyle == ATOM) fsum[0] += efield[0][3]; + if (estyle == ATOM) fsum[0] += efield[i][3]; } }