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
17e2b783
Commit
17e2b783
authored
Jan 01, 2016
by
John Chodera (MSKCC)
Browse files
Bugfixes in Residue bond accessors and ForceField.createSystem()
parent
28be5895
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+1
-1
wrappers/python/simtk/openmm/app/topology.py
wrappers/python/simtk/openmm/app/topology.py
+3
-3
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
17e2b783
...
@@ -581,7 +581,7 @@ class ForceField(object):
...
@@ -581,7 +581,7 @@ class ForceField(object):
if
matches
is
None
:
if
matches
is
None
:
# No existing templates match. Try any registered residue template generators.
# No existing templates match. Try any registered residue template generators.
for
generator
in
self
.
_templateGenerators
:
for
generator
in
self
.
_templateGenerators
:
if
generator
(
forcefi
el
d
,
res
):
if
generator
(
s
el
f
,
res
):
# This generator has registered a new residue template that should match.
# This generator has registered a new residue template that should match.
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
if
matches
is
None
:
if
matches
is
None
:
...
...
wrappers/python/simtk/openmm/app/topology.py
View file @
17e2b783
...
@@ -373,17 +373,17 @@ class Residue(object):
...
@@ -373,17 +373,17 @@ class Residue(object):
def
bonds
(
self
):
def
bonds
(
self
):
"""Iterate over all Bonds involving any atom in this residue."""
"""Iterate over all Bonds involving any atom in this residue."""
bonds
=
[
bond
for
bond
in
residue
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
or
(
bond
[
1
]
in
self
.
_atoms
))
]
bonds
=
[
bond
for
bond
in
self
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
or
(
bond
[
1
]
in
self
.
_atoms
))
]
return
iter
(
bonds
)
return
iter
(
bonds
)
def
internal_bonds
(
self
):
def
internal_bonds
(
self
):
"""Iterate over all internal Bonds."""
"""Iterate over all internal Bonds."""
bonds
=
[
bond
for
bond
in
residue
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
and
(
bond
[
1
]
in
self
.
_atoms
))
]
bonds
=
[
bond
for
bond
in
self
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
and
(
bond
[
1
]
in
self
.
_atoms
))
]
return
iter
(
bonds
)
return
iter
(
bonds
)
def
external_bonds
(
self
):
def
external_bonds
(
self
):
"""Iterate over all Bonds to external atoms."""
"""Iterate over all Bonds to external atoms."""
bonds
=
[
bond
for
bond
in
residue
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
!=
(
bond
[
1
]
in
self
.
_atoms
))
]
bonds
=
[
bond
for
bond
in
self
.
chain
.
topology
.
bonds
()
if
((
bond
[
0
]
in
self
.
_atoms
)
!=
(
bond
[
1
]
in
self
.
_atoms
))
]
return
iter
(
bonds
)
return
iter
(
bonds
)
def
__len__
(
self
):
def
__len__
(
self
):
...
...
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