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
e7a47007
Commit
e7a47007
authored
Oct 12, 2019
by
joaorodrigues
Browse files
Lipid res. numbs. are now incremental, not read from patch PDB
parent
4d4e349b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
wrappers/python/simtk/openmm/app/modeller.py
wrappers/python/simtk/openmm/app/modeller.py
+5
-1
No files found.
wrappers/python/simtk/openmm/app/modeller.py
View file @
e7a47007
...
@@ -1400,18 +1400,22 @@ class Modeller(object):
...
@@ -1400,18 +1400,22 @@ class Modeller(object):
newAtoms
=
{}
newAtoms
=
{}
lipidChain
=
membraneTopology
.
addChain
()
lipidChain
=
membraneTopology
.
addChain
()
lipidResNum
=
1
# renumber lipid residues to handle large patches
for
(
nearest
,
residue
,
pos
)
in
addedLipids
:
for
(
nearest
,
residue
,
pos
)
in
addedLipids
:
if
skipFromLeaf
[
lipidLeaf
[
residue
]]
>
0
:
if
skipFromLeaf
[
lipidLeaf
[
residue
]]
>
0
:
# Remove the same number of residues from each leaf.
# Remove the same number of residues from each leaf.
skipFromLeaf
[
lipidLeaf
[
residue
]]
-=
1
skipFromLeaf
[
lipidLeaf
[
residue
]]
-=
1
else
:
else
:
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
lipidChain
,
residue
.
id
,
residue
.
insertionCode
)
newResidue
=
membraneTopology
.
addResidue
(
residue
.
name
,
lipidChain
,
lipidResNum
,
residue
.
insertionCode
)
lipidResNum
+=
1
for
atom
in
residue
.
atoms
():
for
atom
in
residue
.
atoms
():
newAtom
=
membraneTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtom
=
membraneTopology
.
addAtom
(
atom
.
name
,
atom
.
element
,
newResidue
,
atom
.
id
)
newAtoms
[
atom
]
=
newAtom
newAtoms
[
atom
]
=
newAtom
membranePos
+=
pos
membranePos
+=
pos
for
bond
in
resBonds
[
residue
]:
for
bond
in
resBonds
[
residue
]:
membraneTopology
.
addBond
(
newAtoms
[
bond
[
0
]],
newAtoms
[
bond
[
1
]],
bond
.
type
,
bond
.
order
)
membraneTopology
.
addBond
(
newAtoms
[
bond
[
0
]],
newAtoms
[
bond
[
1
]],
bond
.
type
,
bond
.
order
)
del
lipidLeaf
del
lipidLeaf
del
addedLipids
del
addedLipids
...
...
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