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
7db5140a
Commit
7db5140a
authored
Feb 24, 2020
by
peastman
Browse files
Improved identification of chain IDs in PDBx/mmCIF files
parent
3fdc297c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
wrappers/python/simtk/openmm/app/pdbxfile.py
wrappers/python/simtk/openmm/app/pdbxfile.py
+7
-0
No files found.
wrappers/python/simtk/openmm/app/pdbxfile.py
View file @
7db5140a
...
@@ -101,6 +101,13 @@ class PDBxFile(object):
...
@@ -101,6 +101,13 @@ class PDBxFile(object):
altChainIdCol
=
-
1
altChainIdCol
=
-
1
else
:
else
:
altChainIdCol
=
atomData
.
getAttributeIndex
(
'label_asym_id'
)
altChainIdCol
=
atomData
.
getAttributeIndex
(
'label_asym_id'
)
if
altChainIdCol
!=
-
1
:
# Figure out which column is best to use for chain IDs.
idSet
=
set
(
row
[
chainIdCol
]
for
row
in
atomData
.
getRowList
())
altIdSet
=
set
(
row
[
altChainIdCol
]
for
row
in
atomData
.
getRowList
())
if
len
(
altIdSet
)
>
len
(
idSet
):
chainIdCol
,
altChainIdCol
=
(
altChainIdCol
,
chainIdCol
)
elementCol
=
atomData
.
getAttributeIndex
(
'type_symbol'
)
elementCol
=
atomData
.
getAttributeIndex
(
'type_symbol'
)
altIdCol
=
atomData
.
getAttributeIndex
(
'label_alt_id'
)
altIdCol
=
atomData
.
getAttributeIndex
(
'label_alt_id'
)
modelCol
=
atomData
.
getAttributeIndex
(
'pdbx_PDB_model_num'
)
modelCol
=
atomData
.
getAttributeIndex
(
'pdbx_PDB_model_num'
)
...
...
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