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:42:30
|
Hi Paolo,
Thanks.
But why this returns True?
m=Chem.MolFromSmiles('C1=CC=C(C=C1C(C2=CC(=CC=C2)C)=O)C')
s=Chem.MolFromSmarts('c1ccccc1-[#6](-c2ccccc2)=[#8]')
m.HasSubstructMatch(s)
Output: True
m
[cid:16500942-5959-47e6-8070-0bac4bcc0230]
Best regards,
Xiaobo Li
________________________________
From: Paolo Tosco <pao...@gm...>
Sent: 19 February 2019 23:15
To: Li, Xiaobo [xiaoboli]
Subject: Re: [Rdkit-discuss] Why this doesn't work? HasStructMatch function
Hi Xiaobo,
it will work if you use as SMARTS query one of the following expressions, not if you specify an explicit single bond, as those two bonds are aromatic in molecule m:
s=Chem.MolFromSmarts('c1ccccc1[#6](c2ccccc2)=[#8]')
s=Chem.MolFromSmarts('c1ccccc1~[#6](~c2ccccc2)=[#8]')
s=Chem.MolFromSmarts('c1ccccc1:[#6](:c2ccccc2)=[#8]')
Cheers,
p.
On 02/19/19 22:41, Li, Xiaobo [xiaoboli] 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:par...@gm...]
s
[cid:par...@gm...]
Best regards,
Xiaobo Li
_______________________________________________
Rdkit-discuss mailing list
Rdk...@li...<mailto:Rdk...@li...>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
|