Commit 77c00e41 authored by peastman's avatar peastman
Browse files

Fixed bugs related to CustomGBForce

parent a468fa3a
...@@ -1033,7 +1033,7 @@ void CpuCalcCustomGBForceKernel::initialize(const System& system, const CustomGB ...@@ -1033,7 +1033,7 @@ void CpuCalcCustomGBForceKernel::initialize(const System& system, const CustomGB
nonbondedMethod = CalcCustomGBForceKernel::NonbondedMethod(force.getNonbondedMethod()); nonbondedMethod = CalcCustomGBForceKernel::NonbondedMethod(force.getNonbondedMethod());
nonbondedCutoff = (RealOpenMM) force.getCutoffDistance(); nonbondedCutoff = (RealOpenMM) force.getCutoffDistance();
if (nonbondedMethod != NoCutoff) if (nonbondedMethod != NoCutoff)
data.requestNeighborList(nonbondedCutoff, 0.25*nonbondedCutoff, true, exclusions); data.requestNeighborList(nonbondedCutoff, 0.25*nonbondedCutoff, force.getNumExclusions() > 0, exclusions);
// Create custom functions for the tabulated functions. // Create custom functions for the tabulated functions.
......
...@@ -171,4 +171,6 @@ void CpuPlatform::PlatformData::requestNeighborList(double cutoffDistance, doubl ...@@ -171,4 +171,6 @@ void CpuPlatform::PlatformData::requestNeighborList(double cutoffDistance, doubl
anyExclusions = true; anyExclusions = true;
} }
} }
else if (!anyExclusions)
exclusions = exclusionList;
} }
...@@ -267,7 +267,7 @@ def _mbondi_radii(topology): ...@@ -267,7 +267,7 @@ def _mbondi_radii(topology):
bondeds = all_bonds[atom] bondeds = all_bonds[atom]
if bondeds[0].element in (E.carbon, E.nitrogen): if bondeds[0].element in (E.carbon, E.nitrogen):
radii[i] = 1.3 radii[i] = 1.3
elif bondeds[0].type.atomic_number in (E.oxygen, E.sulfur): elif bondeds[0].element in (E.oxygen, E.sulfur):
radii[i] = 0.8 radii[i] = 0.8
else: else:
radii[i] = 1.2 radii[i] = 1.2
......
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