Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
abe4385f
"vscode:/vscode.git/clone" did not exist on "447238ded2e791378ee21eeb208b559203b04f5d"
Unverified
Commit
abe4385f
authored
Sep 21, 2018
by
Andy Simmonett
Browse files
Fix bug in CUDA LJPME energy without Coulomb terms
parent
eb2f74e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+1
-2
tests/TestDispersionPME.h
tests/TestDispersionPME.h
+5
-0
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
abe4385f
...
@@ -2192,8 +2192,6 @@ double CudaCalcNonbondedForceKernel::execute(ContextImpl& context, bool includeF
...
@@ -2192,8 +2192,6 @@ double CudaCalcNonbondedForceKernel::execute(ContextImpl& context, bool includeF
cu.executeKernel(pmeInterpolateForceKernel, interpolateArgs, cu.getNumAtoms(), 128);
cu.executeKernel(pmeInterpolateForceKernel, interpolateArgs, cu.getNumAtoms(), 128);
}
}
// As written, we check only the Electrostatic grid pointer to get here. We could separate them out, but for
// now we assume that LJPME can only be used if electrostatic PME is also active.
if (doLJPME && hasLJ) {
if (doLJPME && hasLJ) {
if (!hasCoulomb) {
if (!hasCoulomb) {
void* gridIndexArgs[] = {&cu.getPosq().getDevicePointer(), &pmeAtomGridIndex.getDevicePointer(), cu.getPeriodicBoxSizePointer(),
void* gridIndexArgs[] = {&cu.getPosq().getDevicePointer(), &pmeAtomGridIndex.getDevicePointer(), cu.getPeriodicBoxSizePointer(),
...
@@ -2202,6 +2200,7 @@ double CudaCalcNonbondedForceKernel::execute(ContextImpl& context, bool includeF
...
@@ -2202,6 +2200,7 @@ double CudaCalcNonbondedForceKernel::execute(ContextImpl& context, bool includeF
cu.executeKernel(pmeDispersionGridIndexKernel, gridIndexArgs, cu.getNumAtoms());
cu.executeKernel(pmeDispersionGridIndexKernel, gridIndexArgs, cu.getNumAtoms());
sort->sort(pmeAtomGridIndex);
sort->sort(pmeAtomGridIndex);
cu.clearBuffer(pmeEnergyBuffer);
}
}
cu.clearBuffer(pmeGrid2);
cu.clearBuffer(pmeGrid2);
...
...
tests/TestDispersionPME.h
View file @
abe4385f
...
@@ -1307,6 +1307,11 @@ void testWater125DpmeVsLongCutoffNoExclusions() {
...
@@ -1307,6 +1307,11 @@ void testWater125DpmeVsLongCutoffNoExclusions() {
State
state
=
context
.
getState
(
State
::
Forces
|
State
::
Energy
);
State
state
=
context
.
getState
(
State
::
Forces
|
State
::
Energy
);
double
energy
=
state
.
getPotentialEnergy
();
double
energy
=
state
.
getPotentialEnergy
();
// Make another call to the get the energy to test that the call is
// idempotent when Coulomb terms are absent.
double
secondEnergy
=
context
.
getState
(
State
::
Energy
).
getPotentialEnergy
();
ASSERT_EQUAL_TOL
(
secondEnergy
,
energy
,
5E-5
);
//Gromacs reference values. See comments in testWater2DpmeEnergiesForcesNoExclusions() for details.
//Gromacs reference values. See comments in testWater2DpmeEnergiesForcesNoExclusions() for details.
//Coordinates are from make_waterbox, and the .gro file looks like
//Coordinates are from make_waterbox, and the .gro file looks like
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment