Re: [Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread Jason Biggs
Start with your benzene molecule m = Chem.MolFromSmiles('c1c1') make a pattern using Peter's example, with three aromatic atoms connected by three aromatic bonds patt = Chem.MolFromSmarts('a:a:a') and it's a match: m.HasSubstructMatch(patt) >True Kekulize your mol, and the pattern

Re: [Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread Peter S. Shenkin
Hi, In SMARTS, 'a' matches an aromatic atom. So you would match your molecule with the pattern 'aaa', or if you wanted to restrict yourself to carbons, 'ccc'. This would match whether you created the molecule from a Kekulized or an aromatic SMILES. Remember that it's the molecular recognition