Skip to content
Snippets Groups Projects
Unverified Commit 087f6bbe authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: report disconnected rather than single_ligand_issue

This was a problem in CASP16 models L4004LG020_1F where all the model
ligands were disconnected but that was not picked up properly
parent 212c5cc5
No related branches found
No related tags found
No related merge requests found
......@@ -626,7 +626,7 @@ class LigandScorer:
"Ligand was already assigned to an other "
"model ligand (different stoichiometry)")
# maybe its a symmetry issue?
# maybe it's a symmetry issue?
if 2 in tmp:
return self.state_decoding[2]
......@@ -634,12 +634,12 @@ class LigandScorer:
# target counterpart.
if 6 in tmp:
mdl_idx = np.where(self.state_matrix[trg_lig_idx,:]==6)[0]
# we're reporting everything except disconnected error...
# don't ask...
for i in mdl_idx:
if self.model_ligand_states[i] == 0:
raise RuntimeError("This should never happen")
if self.model_ligand_states[i] != 4:
if self.model_ligand_states[i] != 4 or len(tmp) == 1:
# Don't report disconnected if only 1 model ligand is
# disconnected, unless that's the only reason
return self.state_decoding[self.model_ligand_states[i]]
# get rid of remaining single ligand issues (only disconnected error)
......@@ -720,12 +720,12 @@ class LigandScorer:
# target counterpart.
if 6 in tmp:
trg_idx = np.where(self.state_matrix[:,mdl_lig_idx]==6)[0]
# we're reporting everything except disconnected error...
# don't ask...
for i in trg_idx:
if self.target_ligand_states[i] == 0:
raise RuntimeError("This should never happen")
if self.target_ligand_states[i] != 4:
if self.target_ligand_states[i] != 4 or len(tmp) == 1:
# Don't report disconnected if only 1 target ligand is
# disconnected, unless that's the only reason
return self.state_decoding[self.target_ligand_states[i]]
# get rid of remaining single ligand issues (only disconnected error)
......
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