Unverified Commit 895fcd4c authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Avoid incorrectly adding plasma correction (#5117)

parent 58378cce
......@@ -909,7 +909,7 @@ double CommonCalcNonbondedForceKernel::execute(ContextImpl& context, bool includ
// The Ewald self energy was computed in the kernel.
energy = 0.0;
if (pmeGrid1.isInitialized() || cosSinSums.isInitialized()) {
if ((pmeGrid1.isInitialized() || cosSinSums.isInitialized()) && includeReciprocal) {
// Invoke a kernel to compute the correction for the neutralizing plasma.
Vec3 a, b, c;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment