Hi Quoc-Tuan both those mols match the smarts pattern in my python3 version of rdkit (2019.03.3 – hmm, it might be time for an upgrade)
>>> from rdkit import rdBase >>> rdBase.rdkitVersion '2019.03.3' >>> from rdkit import Chem >>> patt = >>> Chem.MolFromSmiles('c1ccc(cc1)C~C2NC~Cc3c2cccc3.c1ccc(cc1)C~C2NC~Cc3c2cccc3') >>> mol = >>> Chem.MolFromSmiles('COc1ccc2cc1Oc1ccc(cc1)CC1N(C)CCc3c1c1Oc4cc5C(C2)NCCc5cc4Oc1c(c3)OC') >>> mol.HasSubstructMatch(patt) True >>> mol = >>> Chem.MolFromSmiles('COc1ccc7cc1Oc2ccc(cc2)CC3N(C)CCc4c3cc(c(c4)OC)Oc5ccc6c(c5)CCNC6C7') >>> mol.HasSubstructMatch(patt) True do you have an older version – your print statements look like python2? Best wishes Richard From: Quoc-Tuan DO <quoctuan...@greenpharma.com> Sent: 21 July 2020 13:09 To: rdkit-discuss@lists.sourceforge.net Subject: [EXTERNAL] [Rdkit-discuss] substructure matching Hello, I am not very familiar with smiles/smarts and find the following results quite puzzling: >>> patt = >>> Chem.MolFromSmiles('c1ccc(cc1)C~C2NC~Cc3c2cccc3.c1ccc(cc1)C~C2NC~Cc3c2cccc3') >>> mol = >>> Chem.MolFromSmiles('COc1ccc2cc1Oc1ccc(cc1)CC1N(C)CCc3c1c1Oc4cc5C(C2)NCCc5cc4Oc1c(c3)OC') >>> print mol.HasSubstructMatch(patt) False >>> mol = >>> Chem.MolFromSmiles('COc1ccc7cc1Oc2ccc(cc2)CC3N(C)CCc4c3cc(c(c4)OC)Oc5ccc6c(c5)CCNC6C7') >>> print mol.HasSubstructMatch(patt) True It seems that a presence of an extra Ph - O - Ph makes the difference but I am not sure why. How should the smarts be to have positive results for both smiles ? Thank you in advance for your help. Best regards, Quoc-Tuan This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please delete the original and any copies of this email and any attachments thereto and notify the sender immediately.
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss