Skip to content
Snippets Groups Projects
Commit 55fb3da4 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

scoring.py bugfix

avoid KeyError when trying to figure out whether model residue is
covered by target structure
parent 7d7258c9
No related branches found
No related tags found
No related merge requests found
......@@ -837,13 +837,14 @@ class Scorer:
# => assign None
# fetch trg residue from non-stereochecked aln
aln = self.mapping.alns[(flat_mapping[cname], cname)]
trg_r = None
for col in aln:
if col[0] != '-' and col[1] != '-':
if col.GetResidue(1).GetNumber() == r.GetNumber():
trg_r = col.GetResidue(0)
break
if cname in flat_mapping:
aln = self.mapping.alns[(flat_mapping[cname], cname)]
for col in aln:
if col[0] != '-' and col[1] != '-':
if col.GetResidue(1).number == r.number:
trg_r = col.GetResidue(0)
break
if trg_r is None:
local_lddt[cname][r.GetNumber().GetNum()] = None
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment