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
0b0b213c
Commit
0b0b213c
authored
Nov 18, 2014
by
peastman
Browse files
Merge pull request #737 from peastman/master
DrudeForce did not implement getBondedParticles()
parents
2846622e
8fb1f4dc
Changes
2
Hide 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 @
0b0b213c
...
@@ -64,6 +64,7 @@ public:
...
@@ -64,6 +64,7 @@ public:
}
}
std
::
vector
<
std
::
string
>
getKernelNames
();
std
::
vector
<
std
::
string
>
getKernelNames
();
void
updateParametersInContext
(
ContextImpl
&
context
);
void
updateParametersInContext
(
ContextImpl
&
context
);
std
::
vector
<
std
::
pair
<
int
,
int
>
>
getBondedParticles
()
const
;
private:
private:
const
DrudeForce
&
owner
;
const
DrudeForce
&
owner
;
Kernel
kernel
;
Kernel
kernel
;
...
...
plugins/drude/openmmapi/src/DrudeForceImpl.cpp
View file @
0b0b213c
...
@@ -146,8 +146,8 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor
...
@@ -146,8 +146,8 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor
return
0.0
;
return
0.0
;
}
}
std
::
vector
<
std
::
string
>
DrudeForceImpl
::
getKernelNames
()
{
vector
<
string
>
DrudeForceImpl
::
getKernelNames
()
{
std
::
vector
<
std
::
string
>
names
;
vector
<
string
>
names
;
names
.
push_back
(
CalcDrudeForceKernel
::
Name
());
names
.
push_back
(
CalcDrudeForceKernel
::
Name
());
return
names
;
return
names
;
}
}
...
@@ -155,3 +155,14 @@ std::vector<std::string> DrudeForceImpl::getKernelNames() {
...
@@ -155,3 +155,14 @@ std::vector<std::string> DrudeForceImpl::getKernelNames() {
void
DrudeForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
void
DrudeForceImpl
::
updateParametersInContext
(
ContextImpl
&
context
)
{
kernel
.
getAs
<
CalcDrudeForceKernel
>
().
copyParametersToContext
(
context
,
owner
);
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