Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
65ba012f
Commit
65ba012f
authored
2 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
scoring bugfix
guard for the rare case when stereochemistry checks remove a whole chain
parent
55fb3da4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mol/alg/pymod/scoring.py
+16
-12
16 additions, 12 deletions
modules/mol/alg/pymod/scoring.py
with
16 additions
and
12 deletions
modules/mol/alg/pymod/scoring.py
+
16
−
12
View file @
65ba012f
...
...
@@ -799,21 +799,25 @@ class Scorer:
trg_nuc_chains
=
[
s
.
GetName
()
for
s
in
self
.
chain_mapper
.
polynuc_seqs
]
trg_pep_chains
=
set
(
trg_pep_chains
)
trg_nuc_chains
=
set
(
trg_nuc_chains
)
alns
=
dict
()
lddt_alns
=
dict
()
lddt_chain_mapping
=
dict
()
for
mdl_ch
,
trg_ch
in
flat_mapping
.
items
():
if
trg_ch
in
trg_pep_chains
:
stype
=
mol
.
ChemType
.
AMINOACIDS
elif
trg_ch
in
trg_nuc_chains
:
stype
=
mol
.
ChemType
.
NUCLEOTIDES
else
:
raise
RuntimeError
(
"
Chain name inconsistency... ask Gabriel
"
)
alns
[
mdl_ch
]
=
self
.
chain_mapper
.
Align
(
trg_seqs
[
trg_ch
],
mdl_seqs
[
mdl_ch
],
stype
)
if
mdl_ch
in
mdl_seqs
and
trg_ch
in
trg_seqs
:
if
trg_ch
in
trg_pep_chains
:
stype
=
mol
.
ChemType
.
AMINOACIDS
elif
trg_ch
in
trg_nuc_chains
:
stype
=
mol
.
ChemType
.
NUCLEOTIDES
else
:
raise
RuntimeError
(
"
Chain name inconsistency... ask
"
"
Gabriel
"
)
lddt_alns
[
mdl_ch
]
=
self
.
chain_mapper
.
Align
(
trg_seqs
[
trg_ch
],
mdl_seqs
[
mdl_ch
],
stype
)
lddt_chain_mapping
[
mdl_ch
]
=
trg_ch
lddt_score
=
self
.
lddt_scorer
.
lDDT
(
self
.
stereochecked_model
,
chain_mapping
=
flat
_mapping
,
residue_mapping
=
alns
,
chain_mapping
=
lddt_chain
_mapping
,
residue_mapping
=
lddt_
alns
,
check_resnames
=
False
,
local_lddt_prop
=
"
lddt
"
)[
0
]
local_lddt
=
dict
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment