Re: [Rdkit-discuss] Why this doesn't work? HasStructMatch function
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Li, X. [xiaoboli] <Xia...@li...> - 2019-02-19 23:01:47
|
Hi Jason,
Thanks. Can you give reasons of using ~ instead of -?
Best regards,
Xiaobo Li
________________________________
From: Jason Biggs <jas...@gm...>
Sent: 19 February 2019 22:55:22
To: Li, Xiaobo [xiaoboli]
Cc: Rdk...@li...
Subject: Re: [Rdkit-discuss] Why this doesn't work? HasStructMatch function
Change your pattern to use ~ as an unspecified bond instead of - for a single bond:
>m=Chem.MolFromSmiles('CN(C(C=CC=C1)=C1C2=O)C3=C2C=CC=C3')
>s=Chem.MolFromSmarts('c1ccccc1~[#6](~c2ccccc2)=[#8]')
>m.HasSubstructMatch(s)
True
Jason
On Tue, Feb 19, 2019 at 4:42 PM Li, Xiaobo [xiaoboli] <Xia...@li...<mailto:Xia...@li...>> wrote:
Dear all,
Why the output is False?
m=Chem.MolFromSmiles('CN(C(C=CC=C1)=C1C2=O)C3=C2C=CC=C3')
s=Chem.MolFromSmarts('c1ccccc1-[#6](-c2ccccc2)=[#8]')
m.HasSubstructMatch(s)
Output: False
m
[cid:16907f601b8f456b1e51]
s
[cid:16907f601b8f456b1e52]
Best regards,
Xiaobo Li
_______________________________________________
Rdkit-discuss mailing list
Rdk...@li...<mailto:Rdk...@li...>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
|