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
94a151b1
Commit
94a151b1
authored
Jun 01, 2010
by
Peter Eastman
Browse files
Fixed a problem with numerical precision that sometimes prevented SHAKE clusters being recognized
parent
9e83ef09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
+1
-1
No files found.
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
View file @
94a151b1
...
@@ -50,7 +50,7 @@ struct OpenCLIntegrationUtilities::ShakeCluster {
...
@@ -50,7 +50,7 @@ struct OpenCLIntegrationUtilities::ShakeCluster {
ShakeCluster
(
int
centralID
,
double
invMass
)
:
centralID
(
centralID
),
centralInvMass
(
invMass
),
size
(
0
),
valid
(
true
)
{
ShakeCluster
(
int
centralID
,
double
invMass
)
:
centralID
(
centralID
),
centralInvMass
(
invMass
),
size
(
0
),
valid
(
true
)
{
}
}
void
addAtom
(
int
id
,
double
dist
,
double
invMass
)
{
void
addAtom
(
int
id
,
double
dist
,
double
invMass
)
{
if
(
size
==
3
||
(
size
>
0
&&
dist
!=
distance
)
||
(
size
>
0
&&
invMass
!=
peripheralInvMass
))
if
(
size
==
3
||
(
size
>
0
&&
abs
(
dist
-
distance
)
/
distance
>
1e-8
)
||
(
size
>
0
&&
abs
(
invMass
-
peripheralInvMass
)
/
peripheralInvMass
>
1e-8
)
)
valid
=
false
;
valid
=
false
;
else
{
else
{
peripheralID
[
size
++
]
=
id
;
peripheralID
[
size
++
]
=
id
;
...
...
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