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
e0b3c2bd
Unverified
Commit
e0b3c2bd
authored
May 08, 2019
by
peastman
Committed by
GitHub
May 08, 2019
Browse files
Merge pull request #2307 from peastman/pdbxlabel
PDBxFile is more robust
parents
25e12f36
21cb4f94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
wrappers/python/simtk/openmm/app/pdbxfile.py
wrappers/python/simtk/openmm/app/pdbxfile.py
+9
-1
No files found.
wrappers/python/simtk/openmm/app/pdbxfile.py
View file @
e0b3c2bd
...
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2015-201
8
Stanford University and the Authors.
Portions copyright (c) 2015-201
9
Stanford University and the Authors.
Authors: Peter Eastman
Contributors: Jason Swails
...
...
@@ -85,11 +85,19 @@ class PDBxFile(object):
atomData
=
block
.
getObj
(
'atom_site'
)
atomNameCol
=
atomData
.
getAttributeIndex
(
'auth_atom_id'
)
if
atomNameCol
==
-
1
:
atomNameCol
=
atomData
.
getAttributeIndex
(
'label_atom_id'
)
atomIdCol
=
atomData
.
getAttributeIndex
(
'id'
)
resNameCol
=
atomData
.
getAttributeIndex
(
'auth_comp_id'
)
if
resNameCol
==
-
1
:
resNameCol
=
atomData
.
getAttributeIndex
(
'label_comp_id'
)
resNumCol
=
atomData
.
getAttributeIndex
(
'auth_seq_id'
)
if
resNumCol
==
-
1
:
resNumCol
=
atomData
.
getAttributeIndex
(
'label_seq_id'
)
resInsertionCol
=
atomData
.
getAttributeIndex
(
'pdbx_PDB_ins_code'
)
chainIdCol
=
atomData
.
getAttributeIndex
(
'auth_asym_id'
)
if
chainIdCol
==
-
1
:
chainIdCol
=
atomData
.
getAttributeIndex
(
'label_asym_id'
)
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