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
c0207411
Commit
c0207411
authored
Jul 10, 2013
by
peastman
Browse files
Merge pull request #48 from peastman/master
Fixed an atom ordering bug in AmoebaMultipoleForce
parents
3279efe5
e4beb290
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+2
-1
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
+11
-0
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
c0207411
...
@@ -747,7 +747,8 @@ void CudaContext::findMoleculeGroups() {
...
@@ -747,7 +747,8 @@ void CudaContext::findMoleculeGroups() {
for
(
int
j
=
0
;
j
<
forces
[
i
]
->
getNumParticleGroups
();
j
++
)
{
for
(
int
j
=
0
;
j
<
forces
[
i
]
->
getNumParticleGroups
();
j
++
)
{
vector
<
int
>
particles
;
vector
<
int
>
particles
;
forces
[
i
]
->
getParticlesInGroup
(
j
,
particles
);
forces
[
i
]
->
getParticlesInGroup
(
j
,
particles
);
molecules
[
atomMolecule
[
particles
[
0
]]].
groups
[
i
].
push_back
(
j
);
if
(
particles
.
size
()
>
0
)
molecules
[
atomMolecule
[
particles
[
0
]]].
groups
[
i
].
push_back
(
j
);
}
}
}
}
...
...
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
View file @
c0207411
...
@@ -778,6 +778,17 @@ public:
...
@@ -778,6 +778,17 @@ public:
}
}
return
true
;
return
true
;
}
}
int
getNumParticleGroups
()
{
return
7
*
force
.
getNumMultipoles
();
}
void
getParticlesInGroup
(
int
index
,
vector
<
int
>&
particles
)
{
int
particle
=
index
/
7
;
int
type
=
index
-
7
*
particle
;
force
.
getCovalentMap
(
particle
,
AmoebaMultipoleForce
::
CovalentType
(
type
),
particles
);
}
bool
areGroupsIdentical
(
int
group1
,
int
group2
)
{
return
((
group1
%
7
)
==
(
group2
%
7
));
}
private:
private:
const
AmoebaMultipoleForce
&
force
;
const
AmoebaMultipoleForce
&
force
;
};
};
...
...
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