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
f5da3b69
Commit
f5da3b69
authored
Aug 24, 2017
by
peastman
Browse files
Bug fix to finding identical molecules
parent
76519691
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+8
-1
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+8
-1
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
f5da3b69
...
...
@@ -1083,9 +1083,16 @@ void CudaContext::findMoleculeGroups() {
for
(
int
i
=
0
;
i
<
(
int
)
forces
.
size
()
&&
identical
;
i
++
)
{
if
(
mol
.
groups
[
i
].
size
()
!=
mol2
.
groups
[
i
].
size
())
identical
=
false
;
for
(
int
k
=
0
;
k
<
(
int
)
mol
.
groups
[
i
].
size
()
&&
identical
;
k
++
)
for
(
int
k
=
0
;
k
<
(
int
)
mol
.
groups
[
i
].
size
()
&&
identical
;
k
++
)
{
if
(
!
forces
[
i
]
->
areGroupsIdentical
(
mol
.
groups
[
i
][
k
],
mol2
.
groups
[
i
][
k
]))
identical
=
false
;
vector
<
int
>
p1
,
p2
;
forces
[
i
]
->
getParticlesInGroup
(
mol
.
groups
[
i
][
k
],
p1
);
forces
[
i
]
->
getParticlesInGroup
(
mol2
.
groups
[
i
][
k
],
p2
);
for
(
int
m
=
0
;
m
<
p1
.
size
();
m
++
)
if
(
p1
[
m
]
!=
p2
[
m
]
-
atomOffset
)
identical
=
false
;
}
}
if
(
identical
)
{
moleculeInstances
[
j
].
push_back
(
molIndex
);
...
...
platforms/opencl/src/OpenCLContext.cpp
View file @
f5da3b69
...
...
@@ -978,9 +978,16 @@ void OpenCLContext::findMoleculeGroups() {
for
(
int
i
=
0
;
i
<
(
int
)
forces
.
size
()
&&
identical
;
i
++
)
{
if
(
mol
.
groups
[
i
].
size
()
!=
mol2
.
groups
[
i
].
size
())
identical
=
false
;
for
(
int
k
=
0
;
k
<
(
int
)
mol
.
groups
[
i
].
size
()
&&
identical
;
k
++
)
for
(
int
k
=
0
;
k
<
(
int
)
mol
.
groups
[
i
].
size
()
&&
identical
;
k
++
)
{
if
(
!
forces
[
i
]
->
areGroupsIdentical
(
mol
.
groups
[
i
][
k
],
mol2
.
groups
[
i
][
k
]))
identical
=
false
;
vector
<
int
>
p1
,
p2
;
forces
[
i
]
->
getParticlesInGroup
(
mol
.
groups
[
i
][
k
],
p1
);
forces
[
i
]
->
getParticlesInGroup
(
mol2
.
groups
[
i
][
k
],
p2
);
for
(
int
m
=
0
;
m
<
p1
.
size
();
m
++
)
if
(
p1
[
m
]
!=
p2
[
m
]
-
atomOffset
)
identical
=
false
;
}
}
if
(
identical
)
{
moleculeInstances
[
j
].
push_back
(
molIndex
);
...
...
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