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
fb770948
Commit
fb770948
authored
Nov 29, 2012
by
Peter Eastman
Browse files
Fixed bugs in CUDA implementation of AmoebaWcaDispersionForce
parent
21d2b6b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
+10
-0
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+4
-0
No files found.
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
View file @
fb770948
...
...
@@ -1526,6 +1526,16 @@ double CudaCalcAmoebaMultipoleForceKernel::execute(ContextImpl& context, bool in
if
(
48.033324
*
sqrt
(
max
(
total1
,
total2
)
/
cu
.
getNumAtoms
())
<
inducedEpsilon
)
break
;
}
vector
<
double
>
d
;
labFrameDipoles
->
download
(
d
);
const
vector
<
int
>
order
=
cu
.
getAtomIndex
();
for
(
int
i
=
0
;
i
<
10
;
i
++
)
printf
(
"%d %d
\n
"
,
i
,
order
[
i
]);
vector
<
Vec3
>
dv
(
order
.
size
());
for
(
int
i
=
0
;
i
<
dv
.
size
();
i
++
)
dv
[
order
[
i
]]
=
Vec3
(
d
[
3
*
i
],
d
[
3
*
i
+
1
],
d
[
3
*
i
+
2
]);
for
(
int
i
=
0
;
i
<
10
;
i
++
)
printf
(
"c %d %g %g %g
\n
"
,
i
,
dv
[
i
][
0
],
dv
[
i
][
1
],
dv
[
i
][
2
]);
// Compute electrostatic force.
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
fb770948
...
...
@@ -1553,6 +1553,10 @@ RealOpenMM AmoebaReferenceMultipoleForce::calculateForceAndEnergy( const std::ve
setup( particlePositions, charges, dipoles, quadrupoles, tholes,
dampingFactors, polarity, axisTypes, multipoleAtomZs, multipoleAtomXs, multipoleAtomYs,
multipoleAtomCovalentInfo, particleData );
for (int i = 0; i < 10; i++)
printf("r %d %g %g %g\n", i, particleData[i].dipole[0], particleData[i].dipole[1], particleData[i].dipole[2]);
// for (int i = 0; i < 10; i++)
// printf("r %d %g %g %g\n", i, dipoles[3*i], dipoles[3*i+1], dipoles[3*i+2]);
std::vector<RealVec> torques;
initializeRealVecVector( torques );
...
...
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