"plugins/amoeba/openmmapi/src/AmoebaBondForce.cpp" did not exist on "15811b7c56b65a5e94e4c7b212100b37b4de331f"
Commit a919f305 authored by Peter Eastman's avatar Peter Eastman
Browse files

Bug fix to using AmoebaVdwForce without a cutoff

parent 01269257
......@@ -38,6 +38,7 @@
real gTau = epsilon*tau7*r6*1.12f*tmp*tmp;
real termEnergy = epsilon*sigma7*tau7*((sigma7*1.12f*invRho)-2.0f);
real deltaE = -7.0f*(dTau*termEnergy+gTau);
#ifdef USE_CUTOFF
if (r > TAPER_CUTOFF) {
real x = r-TAPER_CUTOFF;
real taper = 1+x*x*x*(TAPER_C3+x*(TAPER_C4+x*TAPER_C5));
......@@ -45,6 +46,7 @@
deltaE = termEnergy*dtaper + deltaE*taper;
termEnergy *= taper;
}
#endif
tempEnergy += (includeInteraction ? termEnergy : 0);
dEdR -= (includeInteraction ? deltaE*invR : 0);
}
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