Re: [Rdkit-discuss] Smarts conversion help
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Patrick W. <wpw...@gm...> - 2019-03-27 01:21:18
|
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)cccc2-[#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])C3=O"
mol = Chem.MolFromSmiles(smi)
mol_list = [mol]
core = Chem.MolFromSmarts("[#8]=[#6]3-c1c2c(ccc1)cccc2-[#6](-[#7H]3)=[#8]")
Draw.MolsToGridImage(mol_list,highlightAtomLists=[x.GetSubstructMatch(core)
for x in mol_list])
[image: image.png]
|