From 3f64e4088d49a76e19105241a50627791f8d870d Mon Sep 17 00:00:00 2001 From: rkakamilan Date: Sun, 6 Nov 2022 22:40:37 +0900 Subject: [PATCH 1/2] fix compute_distance_and_angle --- data/frag_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/frag_utils.py b/data/frag_utils.py index c3578d6..0722d06 100644 --- a/data/frag_utils.py +++ b/data/frag_utils.py @@ -352,7 +352,8 @@ def compute_distance_and_angle(mol, smi_linker, smi_frags): frags_matches = list(mol.GetSubstructMatches(qfrag, uniquify=False)) qlinker = Chem.AdjustQueryProperties(linker,qp) linker_matches = list(mol.GetSubstructMatches(qlinker, uniquify=False)) - + if len(linker_matches) == 0: + linker_matches = [()] # Loop over matches for frag_match, linker_match in product(frags_matches, linker_matches): # Check if match From be78770fde207f5b147806688ce669021239c9c6 Mon Sep 17 00:00:00 2001 From: rkakamilan Date: Sun, 6 Nov 2022 22:49:04 +0900 Subject: [PATCH 2/2] fix compute_distance_and_angle --- analysis/frag_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analysis/frag_utils.py b/analysis/frag_utils.py index e62128e..f6fc669 100644 --- a/analysis/frag_utils.py +++ b/analysis/frag_utils.py @@ -354,7 +354,8 @@ def compute_distance_and_angle(mol, smi_linker, smi_frags): frags_matches = list(mol.GetSubstructMatches(qfrag, uniquify=False)) qlinker = Chem.AdjustQueryProperties(linker,qp) linker_matches = list(mol.GetSubstructMatches(qlinker, uniquify=False)) - + if len(linker_matches) == 0: + linker_matches = [()] # Loop over matches for frag_match, linker_match in product(frags_matches, linker_matches): # Check if match