Unverified Commit 1f2697a1 authored by Andy Simmonett's avatar Andy Simmonett
Browse files

Fix uninitialized variable when Coulomb terms are missing

parent 6fb038b9
...@@ -1628,8 +1628,8 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon ...@@ -1628,8 +1628,8 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
bool useCutoff = (nonbondedMethod != NoCutoff); bool useCutoff = (nonbondedMethod != NoCutoff);
bool usePeriodic = (nonbondedMethod != NoCutoff && nonbondedMethod != CutoffNonPeriodic); bool usePeriodic = (nonbondedMethod != NoCutoff && nonbondedMethod != CutoffNonPeriodic);
doLJPME = (nonbondedMethod == LJPME && hasLJ); doLJPME = (nonbondedMethod == LJPME && hasLJ);
if (hasCoulomb) usePosqCharges = hasCoulomb ? cu.requestPosqCharges() : false;
usePosqCharges = cu.requestPosqCharges();
map<string, string> defines; map<string, string> defines;
defines["HAS_COULOMB"] = (hasCoulomb ? "1" : "0"); defines["HAS_COULOMB"] = (hasCoulomb ? "1" : "0");
defines["HAS_LENNARD_JONES"] = (hasLJ ? "1" : "0"); defines["HAS_LENNARD_JONES"] = (hasLJ ? "1" : "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