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
"vscode:/vscode.git/clone" did not exist on "efa678e0e22be1b506db93300be4bd80ae812967"
Commit
7db5140a
authored
Feb 24, 2020
by
peastman
Browse files
Improved identification of chain IDs in PDBx/mmCIF files
parent
3fdc297c
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 @
7db5140a
...
...
@@ -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