"openmmapi/src/CustomCVForce.cpp" did not exist on "66bc28f5e91da32744ba076eb2666a7d9164abe6"
Commit 5cb31cfa authored by peastman's avatar peastman
Browse files

Bug fix to switching function when not computing energy

parent e4653fb7
......@@ -252,7 +252,9 @@ void CpuCustomNonbondedForce::calculateOneIxn(int ii, int jj, ThreadData& data,
// accumulate forces
double dEdR = (includeForce ? data.forceExpression.evaluate()/r : 0.0);
double energy = (includeEnergy ? data.energyExpression.evaluate() : 0.0);
double energy = 0.0;
if (includeEnergy || (useSwitch && r > switchingDistance))
energy = data.energyExpression.evaluate();
double switchValue = 1.0;
if (useSwitch) {
if (r > switchingDistance) {
......
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