"src/vscode:/vscode.git/clone" did not exist on "a2ecfee973c2a49f4ba7ed1de3b4006cda0a838d"
Unverified Commit a6a05ee6 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed error in CustomNonbondedForce on CPU (#3840)

parent e2a5b168
...@@ -172,7 +172,7 @@ void CpuCustomNonbondedForceFvec<FVEC, BLOCK_SIZE>::calculateBlockIxnImpl(Thread ...@@ -172,7 +172,7 @@ void CpuCustomNonbondedForceFvec<FVEC, BLOCK_SIZE>::calculateBlockIxnImpl(Thread
r.store(data.rvec.data()); r.store(data.rvec.data());
FVEC dEdR(data.forceVecExpression.evaluate()); FVEC dEdR(data.forceVecExpression.evaluate());
FVEC energy; FVEC energy;
if (includeEnergy) if (includeEnergy || useSwitch)
energy = FVEC(data.energyVecExpression.evaluate()); energy = FVEC(data.energyVecExpression.evaluate());
if (useSwitch) { if (useSwitch) {
const auto t = blendZero((r-switchingDistance)*invSwitchingInterval, r>switchingDistance); const auto t = blendZero((r-switchingDistance)*invSwitchingInterval, 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