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
774638c3
Commit
774638c3
authored
Sep 25, 2017
by
João Rodrigues
Browse files
Removed references to 'label_asym_id' and corrected atomKey to use proper chainIdCol values.
parent
2842dd7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
wrappers/python/simtk/openmm/app/pdbxfile.py
wrappers/python/simtk/openmm/app/pdbxfile.py
+2
-6
No files found.
wrappers/python/simtk/openmm/app/pdbxfile.py
View file @
774638c3
...
@@ -85,7 +85,6 @@ class PDBxFile(object):
...
@@ -85,7 +85,6 @@ class PDBxFile(object):
resNameCol
=
atomData
.
getAttributeIndex
(
'label_comp_id'
)
resNameCol
=
atomData
.
getAttributeIndex
(
'label_comp_id'
)
resIdCol
=
atomData
.
getAttributeIndex
(
'label_seq_id'
)
resIdCol
=
atomData
.
getAttributeIndex
(
'label_seq_id'
)
resNumCol
=
atomData
.
getAttributeIndex
(
'auth_seq_id'
)
resNumCol
=
atomData
.
getAttributeIndex
(
'auth_seq_id'
)
asymIdCol
=
atomData
.
getAttributeIndex
(
'label_asym_id'
)
chainIdCol
=
atomData
.
getAttributeIndex
(
'auth_asym_id'
)
chainIdCol
=
atomData
.
getAttributeIndex
(
'auth_asym_id'
)
elementCol
=
atomData
.
getAttributeIndex
(
'type_symbol'
)
elementCol
=
atomData
.
getAttributeIndex
(
'type_symbol'
)
altIdCol
=
atomData
.
getAttributeIndex
(
'label_alt_id'
)
altIdCol
=
atomData
.
getAttributeIndex
(
'label_alt_id'
)
...
@@ -95,12 +94,11 @@ class PDBxFile(object):
...
@@ -95,12 +94,11 @@ class PDBxFile(object):
zCol
=
atomData
.
getAttributeIndex
(
'Cartn_z'
)
zCol
=
atomData
.
getAttributeIndex
(
'Cartn_z'
)
lastChainId
=
None
lastChainId
=
None
lastResId
=
None
lastResId
=
None
lastAsymId
=
None
atomTable
=
{}
atomTable
=
{}
atomsInResidue
=
set
()
atomsInResidue
=
set
()
models
=
[]
models
=
[]
for
row
in
atomData
.
getRowList
():
for
row
in
atomData
.
getRowList
():
atomKey
=
((
row
[
resIdCol
],
row
[
asym
IdCol
],
row
[
atomNameCol
]))
atomKey
=
((
row
[
resIdCol
],
row
[
chain
IdCol
],
row
[
atomNameCol
]))
model
=
(
'1'
if
modelCol
==
-
1
else
row
[
modelCol
])
model
=
(
'1'
if
modelCol
==
-
1
else
row
[
modelCol
])
if
model
not
in
models
:
if
model
not
in
models
:
models
.
append
(
model
)
models
.
append
(
model
)
...
@@ -118,12 +116,10 @@ class PDBxFile(object):
...
@@ -118,12 +116,10 @@ class PDBxFile(object):
chain
=
top
.
addChain
(
row
[
chainIdCol
])
chain
=
top
.
addChain
(
row
[
chainIdCol
])
lastChainId
=
row
[
chainIdCol
]
lastChainId
=
row
[
chainIdCol
]
lastResId
=
None
lastResId
=
None
lastAsymId
=
None
if
lastResId
!=
row
[
resIdCol
]
or
lastChainId
!=
row
[
chainIdCol
]
or
(
lastResId
==
'.'
and
row
[
atomNameCol
]
in
atomsInResidue
):
if
lastResId
!=
row
[
resIdCol
]
or
lastAsymId
!=
row
[
asymIdCol
]
or
(
lastResId
==
'.'
and
row
[
atomNameCol
]
in
atomsInResidue
):
# The start of a new residue.
# The start of a new residue.
res
=
top
.
addResidue
(
row
[
resNameCol
],
chain
,
None
if
resNumCol
==
-
1
else
row
[
resNumCol
])
res
=
top
.
addResidue
(
row
[
resNameCol
],
chain
,
None
if
resNumCol
==
-
1
else
row
[
resNumCol
])
lastResId
=
row
[
resIdCol
]
lastResId
=
row
[
resIdCol
]
lastAsymId
=
row
[
asymIdCol
]
atomsInResidue
.
clear
()
atomsInResidue
.
clear
()
element
=
None
element
=
None
try
:
try
:
...
...
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