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
8fb1f4dc
Commit
8fb1f4dc
authored
Nov 18, 2014
by
peastman
Browse files
DrudeForce did not implement getBondedParticles()
parent
285a12db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
plugins/drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
.../drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
+1
-0
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
+13
-2
No files found.
plugins/drude/openmmapi/include/openmm/internal/DrudeForceImpl.h
View file @
8fb1f4dc
...
...
@@ -64,6 +64,7 @@ public:
}
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
std
::
vector
<
std
::
pair
<
int
,
int
>
>
getBondedParticles
()
const
;
private:
const
DrudeForce
&
owner
;
Kernel
kernel
;
...
...
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
View file @
8fb1f4dc
...
...
@@ -146,8 +146,8 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor
return
0.0
;
}
std
::
vector
<
std
::
string
>
DrudeForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
vector
<
string
>
DrudeForceImpl
::
getKernelNames
()
{
vector
<
string
>
names
;
names
.
push_back
(
CalcDrudeForceKernel
::
Name
());
return
names
;
}
...
...
@@ -155,3 +155,14 @@ std::vector<std::string> DrudeForceImpl::getKernelNames() {
void
DrudeForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcDrudeForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
}
vector
<
pair
<
int
,
int
>
>
DrudeForceImpl
::
getBondedParticles
()
const
{
int
numParticles
=
owner
.
getNumParticles
();
vector
<
pair
<
int
,
int
>
>
bonds
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
i
++
)
{
int
p2
,
p3
,
p4
;
double
charge
,
polarizability
,
aniso12
,
aniso34
;
owner
.
getParticleParameters
(
i
,
bonds
[
i
].
first
,
bonds
[
i
].
second
,
p2
,
p3
,
p4
,
charge
,
polarizability
,
aniso12
,
aniso34
);
}
return
bonds
;
}
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