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
dd5e8e8b
Commit
dd5e8e8b
authored
Oct 08, 2015
by
Peter Eastman
Browse files
Added checks for nan coordinates in CUDA and OpenCL
parent
d1afc976
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+2
-0
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+2
-0
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
dd5e8e8b
...
@@ -1196,6 +1196,8 @@ void CudaContext::reorderAtomsImpl() {
...
@@ -1196,6 +1196,8 @@ void CudaContext::reorderAtomsImpl() {
molPos
[
i
].
x
*=
invNumAtoms
;
molPos
[
i
].
x
*=
invNumAtoms
;
molPos
[
i
].
y
*=
invNumAtoms
;
molPos
[
i
].
y
*=
invNumAtoms
;
molPos
[
i
].
z
*=
invNumAtoms
;
molPos
[
i
].
z
*=
invNumAtoms
;
if
(
molPos
[
i
].
x
!=
molPos
[
i
].
x
)
throw
OpenMMException
(
"Particle coordinate is nan"
);
}
}
if
(
nonbonded
->
getUsePeriodic
())
{
if
(
nonbonded
->
getUsePeriodic
())
{
// Move each molecule position into the same box.
// Move each molecule position into the same box.
...
...
platforms/opencl/src/OpenCLContext.cpp
View file @
dd5e8e8b
...
@@ -1112,6 +1112,8 @@ void OpenCLContext::reorderAtomsImpl() {
...
@@ -1112,6 +1112,8 @@ void OpenCLContext::reorderAtomsImpl() {
molPos
[
i
].
x
*=
invNumAtoms
;
molPos
[
i
].
x
*=
invNumAtoms
;
molPos
[
i
].
y
*=
invNumAtoms
;
molPos
[
i
].
y
*=
invNumAtoms
;
molPos
[
i
].
z
*=
invNumAtoms
;
molPos
[
i
].
z
*=
invNumAtoms
;
if
(
molPos
[
i
].
x
!=
molPos
[
i
].
x
)
throw
OpenMMException
(
"Particle coordinate is nan"
);
}
}
if
(
nonbonded
->
getUsePeriodic
())
{
if
(
nonbonded
->
getUsePeriodic
())
{
// Move each molecule position into the same box.
// Move each molecule position into the same box.
...
...
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