From 13b846c8b6acac70407489605511aa462330c4ec Mon Sep 17 00:00:00 2001 From: Katie <78595877+katie-bw@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:51:20 +0100 Subject: [PATCH] Update run_chemed The run_chemed function became redundant when the returned name for the SMILES value changed to ConnectivitySMILES, an argument has been added to reflect this and set the standard name to "ConnectivitySMILES" --- exmol/exmol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exmol/exmol.py b/exmol/exmol.py index ba613cb..14ada81 100644 --- a/exmol/exmol.py +++ b/exmol/exmol.py @@ -555,6 +555,7 @@ def run_chemed( similarity: float = 0.1, fp_type: str = "ECFP4", _pbar: Any = None, + smi_name : str = "ConnectivitySMILES" ) -> Tuple[List[str], List[float]]: """ This method is similar to STONED but works by quering PubChem @@ -584,7 +585,7 @@ def run_chemed( data = reply.json() except: return [], [] - smiles = [d["CanonicalSMILES"] for d in data["PropertyTable"]["Properties"]] + smiles = [d[smi_name] for d in data["PropertyTable"]["Properties"]] smiles = list(set(smiles)) if _pbar: