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
ff7f1035
Commit
ff7f1035
authored
Oct 19, 2012
by
Peter Eastman
Browse files
The test for identical exceptions between nonbonded forces is order insensitive
parent
1de2e2a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
platforms/cuda/src/CudaNonbondedUtilities.cpp
platforms/cuda/src/CudaNonbondedUtilities.cpp
+7
-5
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
+3
-1
No files found.
platforms/cuda/src/CudaNonbondedUtilities.cpp
View file @
ff7f1035
...
...
@@ -108,8 +108,10 @@ void CudaNonbondedUtilities::requestExclusions(const vector<vector<int> >& exclu
for
(
int
i
=
0
;
i
<
(
int
)
exclusionList
.
size
()
&&
sameExclusions
;
i
++
)
{
if
(
exclusionList
[
i
].
size
()
!=
atomExclusions
[
i
].
size
())
sameExclusions
=
false
;
set
<
int
>
expectedExclusions
;
expectedExclusions
.
insert
(
atomExclusions
[
i
].
begin
(),
atomExclusions
[
i
].
end
());
for
(
int
j
=
0
;
j
<
(
int
)
exclusionList
[
i
].
size
();
j
++
)
if
(
exclusionList
[
i
][
j
]
!=
atom
Exclusions
[
i
][
j
]
)
if
(
expectedExclusions
.
find
(
exclusionList
[
i
][
j
]
)
==
expected
Exclusions
.
end
()
)
sameExclusions
=
false
;
}
if
(
!
sameExclusions
)
...
...
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
View file @
ff7f1035
...
...
@@ -133,8 +133,10 @@ void OpenCLNonbondedUtilities::requestExclusions(const vector<vector<int> >& exc
for
(
int
i
=
0
;
i
<
(
int
)
exclusionList
.
size
()
&&
sameExclusions
;
i
++
)
{
if
(
exclusionList
[
i
].
size
()
!=
atomExclusions
[
i
].
size
())
sameExclusions
=
false
;
set
<
int
>
expectedExclusions
;
expectedExclusions
.
insert
(
atomExclusions
[
i
].
begin
(),
atomExclusions
[
i
].
end
());
for
(
int
j
=
0
;
j
<
(
int
)
exclusionList
[
i
].
size
();
j
++
)
if
(
exclusionList
[
i
][
j
]
!=
atom
Exclusions
[
i
][
j
]
)
if
(
expectedExclusions
.
find
(
exclusionList
[
i
][
j
]
)
==
expected
Exclusions
.
end
()
)
sameExclusions
=
false
;
}
if
(
!
sameExclusions
)
...
...
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