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
130f9e95
Commit
130f9e95
authored
Dec 28, 2015
by
Rafal P. Wiewiora
Browse files
standardResidues
parent
368f4dff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+7
-3
No files found.
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
130f9e95
...
...
@@ -73,6 +73,10 @@ class PDBFile(object):
metalElements
=
[
'Al'
,
'As'
,
'Ba'
,
'Ca'
,
'Cd'
,
'Ce'
,
'Co'
,
'Cs'
,
'Cu'
,
'Dy'
,
'Fe'
,
'Gd'
,
'Hg'
,
'Ho'
,
'In'
,
'Ir'
,
'K'
,
'Li'
,
'Mg'
,
'Mn'
,
'Mo'
,
'Na'
,
'Ni'
,
'Pb'
,
'Pd'
,
'Pt'
,
'Rb'
,
'Rh'
,
'Sm'
,
'Sr'
,
'Te'
,
'Tl'
,
'V'
,
'W'
,
'Yb'
,
'Zn'
]
standardResidues
=
[
'ALA'
,
'ASN'
,
'CYS'
,
'GLU'
,
'HIS'
,
'LEU'
,
'MET'
,
'PRO'
,
'THR'
,
'TYR'
,
'ARG'
,
'ASP'
,
'GLN'
,
'GLY'
,
'ILE'
,
'LYS'
,
'PHE'
,
'SER'
,
'TRP'
,
'VAL'
,
'A'
,
'G'
,
'C'
,
'U'
,
'I'
,
'DA'
,
'DG'
,
'DC'
,
'DT'
,
'DI'
,
'HOH'
]
top
=
Topology
()
## The Topology read from the PDB file
self
.
topology
=
top
...
...
@@ -155,7 +159,7 @@ class PDBFile(object):
self
.
topology
.
createDisulfideBonds
(
self
.
positions
)
self
.
_numpyPositions
=
None
# Add bonds based on CONECT records. Bonds between metals of element specified in metalElements and standard
r
esidues are not added.
# Add bonds based on CONECT records. Bonds between metals of element
s
specified in metalElements and
residues in
standard
R
esidues are not added.
connectBonds
=
[]
for
connect
in
pdb
.
models
[
-
1
].
connects
:
...
...
@@ -165,9 +169,9 @@ class PDBFile(object):
if
atomByNumber
[
i
].
element
is
not
None
and
atomByNumber
[
j
].
element
is
not
None
:
if
atomByNumber
[
i
].
element
.
symbol
not
in
metalElements
and
atomByNumber
[
j
].
element
.
symbol
not
in
metalElements
:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
elif
atomByNumber
[
i
].
element
.
symbol
in
metalElements
and
atomByNumber
[
j
].
residue
.
name
not
in
top
.
_
standard
Bond
s
:
elif
atomByNumber
[
i
].
element
.
symbol
in
metalElements
and
atomByNumber
[
j
].
residue
.
name
not
in
standard
Residue
s
:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
elif
atomByNumber
[
j
].
element
.
symbol
in
metalElements
and
atomByNumber
[
i
].
residue
.
name
not
in
top
.
_
standard
Bond
s
:
elif
atomByNumber
[
j
].
element
.
symbol
in
metalElements
and
atomByNumber
[
i
].
residue
.
name
not
in
standard
Residue
s
:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
else
:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
...
...
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