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
e4e94dbc
"platforms/cuda2/tests/TestCudaNonbondedForce.cpp" did not exist on "3976ad913bfaba17feb8b51072ecae0932255601"
Commit
e4e94dbc
authored
May 14, 2018
by
peastman
Browse files
Modeller handles insertion codes
parent
46ee62d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
wrappers/python/simtk/openmm/app/modeller.py
wrappers/python/simtk/openmm/app/modeller.py
+10
-10
No files found.
wrappers/python/simtk/openmm/app/modeller.py
View file @
e4e94dbc
...
...
@@ -109,7 +109,7 @@ class Modeller(object):
for
chain
in
self
.
topology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
for
atom
in
residue
.
atoms
():
newAtom
=
newTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
@@ -123,7 +123,7 @@ class Modeller(object):
for
chain
in
addTopology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
for
atom
in
residue
.
atoms
():
newAtom
=
newTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
@@ -168,7 +168,7 @@ class Modeller(object):
newChain
=
newTopology
.
addChain
(
chain
.
id
)
needNewChain
=
False
;
if
needNewResidue
:
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
needNewResidue
=
False
;
newAtom
=
newTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
@@ -210,7 +210,7 @@ class Modeller(object):
for
chain
in
self
.
topology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
if
residue
.
name
==
"HOH"
:
# Copy the oxygen and hydrogens
oatom
=
[
atom
for
atom
in
residue
.
atoms
()
if
atom
.
element
==
elem
.
oxygen
]
...
...
@@ -395,7 +395,7 @@ class Modeller(object):
for
chain
in
self
.
topology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
for
atom
in
residue
.
atoms
():
newAtom
=
newTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
@@ -691,7 +691,7 @@ class Modeller(object):
for
chain
in
self
.
topology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
isNTerminal
=
(
residue
==
chain
.
_residues
[
0
])
isCTerminal
=
(
residue
==
chain
.
_residues
[
-
1
])
if
residue
.
name
in
Modeller
.
_residueHydrogens
:
...
...
@@ -977,7 +977,7 @@ class Modeller(object):
for
chain
in
self
.
topology
.
chains
():
newChain
=
newTopology
.
addChain
(
chain
.
id
)
for
residue
in
chain
.
residues
():
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
)
newResidue
=
newTopology
.
addResidue
(
residue
.
name
,
newChain
,
residue
.
id
,
residue
.
insertionCode
)
# Look for a matching template.
...
...
@@ -999,7 +999,7 @@ class Modeller(object):
# extra points.
template
=
None
residueNoEP
=
Residue
(
residue
.
name
,
residue
.
index
,
residue
.
chain
,
residue
.
id
)
residueNoEP
=
Residue
(
residue
.
name
,
residue
.
index
,
residue
.
chain
,
residue
.
id
,
residue
.
insertionCode
)
residueNoEP
.
_atoms
=
[
atom
for
atom
in
residue
.
atoms
()
if
atom
.
element
is
not
None
]
if
signature
in
forcefield
.
_templateSignatures
:
for
t
in
forcefield
.
_templateSignatures
[
signature
]:
...
...
@@ -1310,7 +1310,7 @@ class Modeller(object):
# Remove the same number of residues from each leaf.
skipFromLeaf
[
lipidLeaf
[
residue
]]
-=
1
else
:
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
lipidChain
,
residue
.
id
)
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
lipidChain
,
residue
.
id
,
residue
.
insertionCode
)
for
atom
in
residue
.
atoms
():
newAtom
=
membraneTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
@@ -1322,7 +1322,7 @@ class Modeller(object):
solventChain
=
membraneTopology
.
addChain
()
for
(
residue
,
pos
)
in
addedWater
:
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
solventChain
,
residue
.
id
)
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
solventChain
,
residue
.
id
,
residue
.
insertionCode
)
for
atom
in
residue
.
atoms
():
newAtom
=
membraneTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
...
...
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