Re: [Rdkit-discuss] Smarts conversion help

2019-03-27 Thread Greg Landrum
As Pat pointed out, what's happening here is that you have an explicit H in your SMARTS. The RDKit has a function, MergeQueryHs(), to merge this into the query of the atom it's connected to. Here's the application to your example: In [2]: s=Chem.MolFromSmarts('[#8]=[#6]-3-c1c2c(ccc1)2-[#6](-[#

Re: [Rdkit-discuss] Smarts conversion help

2019-03-27 Thread Jason Biggs
On Tue, Mar 26, 2019 at 8:22 PM Patrick Walters wrote: > HI Xiaobo, > > There's an explicit hydrogen in the SMARTS that shouldn't be there. I > also wouldn't include the single bonds around the ring closures. > To be fair, that explicit hydrogen was in the original SMILES string, so it is reaso

Re: [Rdkit-discuss] Smarts conversion help

2019-03-26 Thread Patrick Walters
HI Xiaobo, There's an explicit hydrogen in the SMARTS that shouldn't be there. I also wouldn't include the single bonds around the ring closures. '[#8]=[#6]-3-c1c2c(ccc1)2-[#6](-[#7]-3-*[#1]*)=[#8]') from rdkit import Chem from rdkit.Chem import Draw smi = "O=C(C1=C2C(C=CC=C23)=CC=C1)N([H]

[Rdkit-discuss] Smarts conversion help

2019-03-26 Thread Li, Xiaobo [xiaoboli]
Dear all, I have a molecule in Smiles O=C(C1=C2C(C=CC=C23)=CC=C1)N([H])C3=O (Copied from Chemdraw) then, using online converter to get Smarts (https://pubchem.ncbi.nlm.nih.gov/edit2/index.html) [#8]=[#6]-3-c1c2c(ccc1)2-[#6](-[#7]-3-[#1])=[#8] But I got 'false' with following code s