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

lDDT: remove any requirements on residue numbers

That was 1) strictly increasing (no idea why it was there in a first place)
2) no ins codes (The residue mapper is a dict which now has actual residue
numbers as key - can handle insertion codes)
parent 1222848b
Branches
Tags
No related merge requests found
......@@ -738,12 +738,6 @@ class lDDTScorer:
rnums.append(None)
else:
rnums = [r.GetNumber() for r in ch.residues]
if sum([len(rn.GetInsCode().strip("\0")) for rn in rnums]) > 0:
raise RuntimeError(
"Residue numbers in model must not "
"contain insertion codes"
)
rnums = [rn.GetNum() for rn in rnums]
return rnums
......@@ -828,20 +822,9 @@ class lDDTScorer:
f"chain {ch_name} has SEQRES "
f"ATOMSEQ mismatch"
)
rnums.append(rnum)
rnums.append(mol.ResNum(rnum))
else:
rnums = [r.GetNumber() for r in ch.residues]
if sum([len(rn.GetInsCode().strip("\0")) for rn in rnums]) > 0:
raise RuntimeError(
"Residue numbers in target must not "
"contain insertion codes"
)
rnums = [rnum.GetNum() for rnum in rnums]
if not all(x < y for x, y in zip(rnums, rnums[1:])):
raise RuntimeError(
"Residue numbers in each target chain "
"must be monotonically increasing"
)
assert len(rnums) == len(ch.residues)
residue_numbers[ch_name] = rnums
return residue_numbers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment