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
71ec749c
Commit
71ec749c
authored
Feb 02, 2012
by
Peter Eastman
Browse files
Take virtual sites into account when identifying molecules
parent
b593e034
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
openmmapi/src/ContextImpl.cpp
openmmapi/src/ContextImpl.cpp
+8
-1
No files found.
openmmapi/src/ContextImpl.cpp
View file @
71ec749c
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008 Stanford University and the Authors.
*
* Portions copyright (c) 2008
-2012
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -245,6 +245,13 @@ const vector<vector<int> >& ContextImpl::getMolecules() const {
vector
<
pair
<
int
,
int
>
>
forceBonds
=
forceImpls
[
i
]
->
getBondedParticles
();
bonds
.
insert
(
bonds
.
end
(),
forceBonds
.
begin
(),
forceBonds
.
end
());
}
for
(
int
i
=
0
;
i
<
system
.
getNumParticles
();
i
++
)
{
if
(
system
.
isVirtualSite
(
i
))
{
const
VirtualSite
&
site
=
system
.
getVirtualSite
(
i
);
for
(
int
j
=
0
;
j
<
site
.
getNumParticles
();
j
++
)
bonds
.
push_back
(
std
::
make_pair
(
i
,
site
.
getParticle
(
j
)));
}
}
// Make a list of every other particle to which each particle is connected
...
...
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