[Rdkit-discuss] substructure matching
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Quoc-Tuan DO <quo...@gr...> - 2020-07-21 12:11:36
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <div class="moz-forward-container">Hello, <p>I am not very familiar with smiles/smarts and find the following results quite puzzling: </p> <p> </p> <p>>>> patt = Chem.MolFromSmiles('c1ccc(cc1)C~C2NC~Cc3c2cccc3.c1ccc(cc1)C~C2NC~Cc3c2cccc3')</p> <p>>>> mol = Chem.MolFromSmiles('COc1ccc2cc1Oc1ccc(cc1)CC1N(C)CCc3c1c1Oc4cc5C(C2)NCCc5cc4Oc1c(c3)OC')</p> <p>>>> print mol.HasSubstructMatch(patt) </p> <p>False</p> <p> </p> <p>>>> mol = Chem.MolFromSmiles('COc1ccc7cc1Oc2ccc(cc2)CC3N(C)CCc4c3cc(c(c4)OC)Oc5ccc6c(c5)CCNC6C7')</p> <p>>>> print mol.HasSubstructMatch(patt)</p> <p>True </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It seems that a presence of an extra Ph<font color="#f80c17"><b> - O - </b></font>Ph makes the difference but I am not sure why. How should the smarts be to have positive results for both smiles ?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Thank you in advance for your help.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Best regards,</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Quoc-Tuan</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier'; font-size:10pt;"> </p> <p><style type="text/css"> p, li { white-space: pre-wrap; }</style></p> </div> </body> </html> |