diff --git a/modules/mol/alg/pymod/ligand_scoring.py b/modules/mol/alg/pymod/ligand_scoring.py index 2a462b78df99c5e76e55afe54819516c14ee7229..41e906649512efe56ab9b2101b2b3772fa959494 100644 --- a/modules/mol/alg/pymod/ligand_scoring.py +++ b/modules/mol/alg/pymod/ligand_scoring.py @@ -1466,7 +1466,11 @@ class LigandScorer: "target ligand (different stoichiometry)") # Could not be assigned to any ligand - must be different - return ("identity", "Ligand was not found in the target (by isomorphism)") + if self.substructure_match: + iso = "subgraph isomorphism" + else: + iso = "full graph isomorphism" + return ("identity", "Ligand was not found in the target (by %s)" % iso) def _find_unassigned_target_ligand_reason(self, ligand, assignment="lddt_pli", check=True): # Is this a target ligand? @@ -1519,8 +1523,13 @@ class LigandScorer: # Could have been assigned but was assigned to a different ligand return ("stoichiometry", "Ligand was assigned to an other " "model ligand (different stoichiometry)") + # Could not be assigned to any ligand - must be different - return ("identity", "Ligand was not found in the model (by isomorphism)") + if self.substructure_match: + iso = "subgraph isomorphism" + else: + iso = "full graph isomorphism" + return ("identity", "Ligand was not found in the model (by %s)" % iso) def _ResidueToGraph(residue, by_atom_index=False): diff --git a/modules/mol/alg/tests/test_ligand_scoring.py b/modules/mol/alg/tests/test_ligand_scoring.py index de7abda0c4e6313560c3a428b1b1c29467e9e3df..7207a32255fe790180fe230c43f1ce5fc343a1a4 100644 --- a/modules/mol/alg/tests/test_ligand_scoring.py +++ b/modules/mol/alg/tests/test_ligand_scoring.py @@ -572,7 +572,7 @@ class TestLigandScoring(unittest.TestCase): 'L_NA': {1: ('binding_site', 'No residue in proximity of the target ligand')}, 'L_OXY': {1: ('identity', - 'Ligand was not found in the target (by isomorphism)')}, + 'Ligand was not found in the target (by full graph isomorphism)')}, 'L_MG_2': {1: ('stoichiometry', 'Ligand was assigned to an other target ligand (different stoichiometry)')}, "L_CMO": {1: ('disconnected', @@ -580,13 +580,13 @@ class TestLigandScoring(unittest.TestCase): } assert sc.unassigned_target_ligands == { 'G': {1: ('identity', - 'Ligand was not found in the model (by isomorphism)')}, + 'Ligand was not found in the model (by full graph isomorphism)')}, 'H': {1: ('model_representation', 'No representation of the reference binding site was found in the model')}, 'J': {1: ('stoichiometry', 'Ligand was assigned to an other model ligand (different stoichiometry)')}, 'K': {1: ('identity', - 'Ligand was not found in the model (by isomorphism)')}, + 'Ligand was not found in the model (by full graph isomorphism)')}, 'L_NA': {1: ('binding_site', 'No residue in proximity of the target ligand')}, "L_CMO": {1: ('disconnected',