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
9e1145ac
Commit
9e1145ac
authored
Sep 21, 2015
by
peastman
Browse files
Fixed CustomExternalForce::usesPeriodicBoundaryConditions()
parent
2dee12e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
openmmapi/include/openmm/CustomExternalForce.h
openmmapi/include/openmm/CustomExternalForce.h
+1
-3
openmmapi/src/CustomExternalForce.cpp
openmmapi/src/CustomExternalForce.cpp
+4
-0
platforms/reference/tests/TestReferenceCustomExternalForce.cpp
...orms/reference/tests/TestReferenceCustomExternalForce.cpp
+2
-0
No files found.
openmmapi/include/openmm/CustomExternalForce.h
View file @
9e1145ac
...
...
@@ -214,9 +214,7 @@ public:
*
* @returns false
*/
bool
usesPeriodicBoundaryConditions
()
const
{
return
false
;
}
bool
usesPeriodicBoundaryConditions
()
const
;
protected:
ForceImpl
*
createImpl
()
const
;
private:
...
...
openmmapi/src/CustomExternalForce.cpp
View file @
9e1145ac
...
...
@@ -119,3 +119,7 @@ ForceImpl* CustomExternalForce::createImpl() const {
void
CustomExternalForce
::
updateParametersInContext
(
Context
&
context
)
{
dynamic_cast
<
CustomExternalForceImpl
&>
(
getImplInContext
(
context
)).
updateParametersInContext
(
getContextImpl
(
context
));
}
bool
CustomExternalForce
::
usesPeriodicBoundaryConditions
()
const
{
return
(
energyExpression
.
find
(
"periodicdistance"
)
!=
string
::
npos
);
}
platforms/reference/tests/TestReferenceCustomExternalForce.cpp
View file @
9e1145ac
...
...
@@ -119,6 +119,8 @@ void testPeriodic() {
params
[
2
]
=
z0
;
force
->
addParticle
(
0
,
params
);
system
.
addForce
(
force
);
ASSERT
(
force
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
VerletIntegrator
integrator
(
0.01
);
Context
context
(
system
,
integrator
,
platform
);
vector
<
Vec3
>
positions
(
1
);
...
...
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