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
9f8348cb
Commit
9f8348cb
authored
Aug 18, 2014
by
peastman
Browse files
Merge pull request #588 from peastman/master
Fixed bug in getInducedDipoles()
parents
d446dc26
d68ecd0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
+3
-2
No files found.
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
View file @
9f8348cb
...
@@ -1744,17 +1744,18 @@ void CudaCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& context,
...
@@ -1744,17 +1744,18 @@ void CudaCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& context,
ensureMultipolesValid
(
context
);
ensureMultipolesValid
(
context
);
int
numParticles
=
cu
.
getNumAtoms
();
int
numParticles
=
cu
.
getNumAtoms
();
dipoles
.
resize
(
numParticles
);
dipoles
.
resize
(
numParticles
);
const
vector
<
int
>&
order
=
cu
.
getAtomIndex
();
if
(
cu
.
getUseDoublePrecision
())
{
if
(
cu
.
getUseDoublePrecision
())
{
vector
<
double
>
d
;
vector
<
double
>
d
;
inducedDipole
->
download
(
d
);
inducedDipole
->
download
(
d
);
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
dipoles
[
i
]
=
Vec3
(
d
[
3
*
i
],
d
[
3
*
i
+
1
],
d
[
3
*
i
+
2
]);
dipoles
[
order
[
i
]
]
=
Vec3
(
d
[
3
*
i
],
d
[
3
*
i
+
1
],
d
[
3
*
i
+
2
]);
}
}
else
{
else
{
vector
<
float
>
d
;
vector
<
float
>
d
;
inducedDipole
->
download
(
d
);
inducedDipole
->
download
(
d
);
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
dipoles
[
i
]
=
Vec3
(
d
[
3
*
i
],
d
[
3
*
i
+
1
],
d
[
3
*
i
+
2
]);
dipoles
[
order
[
i
]
]
=
Vec3
(
d
[
3
*
i
],
d
[
3
*
i
+
1
],
d
[
3
*
i
+
2
]);
}
}
}
}
...
...
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