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
f9b6cd5a
Unverified
Commit
f9b6cd5a
authored
Feb 26, 2020
by
peastman
Committed by
GitHub
Feb 26, 2020
Browse files
Merge pull request #2575 from peastman/chain
Improved identification of chain IDs in PDBx/mmCIF files
parents
6786cc75
7db5140a
Changes
1
Hide 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 @
f9b6cd5a
...
...
@@ -101,6 +101,13 @@ class PDBxFile(object):
altChainIdCol
=
-
1
else
:
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'
)
altIdCol
=
atomData
.
getAttributeIndex
(
'label_alt_id'
)
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