Commit b0c5b0c1 authored by Jason Swails's avatar Jason Swails
Browse files

Fix long-range vdW correction for real systems.

parent f4d5ab3d
......@@ -259,7 +259,7 @@ double NonbondedForceImpl::calcDispersionCorrection(const System& system, const
if (useSwitch)
sum3 += count*epsilon*(evalIntegral(cutoff, switchDist, cutoff, sigma)-evalIntegral(switchDist, switchDist, cutoff, sigma));
}
int numParticles = system.getNumParticles();
double numParticles = (double) system.getNumParticles();
int numInteractions = (numParticles*(numParticles+1))/2;
sum1 /= numInteractions;
sum2 /= numInteractions;
......
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