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
d5b80604
Commit
d5b80604
authored
Apr 09, 2013
by
Peter Eastman
Browse files
RPMDIntegrator throws an exception if the System includes virtual sites
parent
703842be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
+5
-1
No files found.
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
View file @
d5b80604
...
@@ -54,8 +54,12 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
...
@@ -54,8 +54,12 @@ RPMDIntegrator::RPMDIntegrator(int numCopies, double temperature, double frictio
void
RPMDIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
void
RPMDIntegrator
::
initialize
(
ContextImpl
&
contextRef
)
{
if
(
owner
!=
NULL
&&
&
contextRef
.
getOwner
()
!=
owner
)
if
(
owner
!=
NULL
&&
&
contextRef
.
getOwner
()
!=
owner
)
throw
OpenMMException
(
"This Integrator is already bound to a context"
);
throw
OpenMMException
(
"This Integrator is already bound to a context"
);
if
(
contextRef
.
getSystem
().
getNumConstraints
()
>
0
)
const
System
&
system
=
contextRef
.
getSystem
();
if
(
system
.
getNumConstraints
()
>
0
)
throw
OpenMMException
(
"RPMDIntegrator cannot be used with Systems that include constraints"
);
throw
OpenMMException
(
"RPMDIntegrator cannot be used with Systems that include constraints"
);
for
(
int
i
=
0
;
i
<
system
.
getNumParticles
();
i
++
)
if
(
system
.
isVirtualSite
(
i
))
throw
OpenMMException
(
"RPMDIntegrator cannot be used with Systems that include virtual sites"
);
context
=
&
contextRef
;
context
=
&
contextRef
;
owner
=
&
contextRef
.
getOwner
();
owner
=
&
contextRef
.
getOwner
();
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateRPMDStepKernel
::
Name
(),
contextRef
);
kernel
=
context
->
getPlatform
().
createKernel
(
IntegrateRPMDStepKernel
::
Name
(),
contextRef
);
...
...
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