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

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

2017-09-08 Thread James T. Metz via Rdkit-discuss
Hello, Suppose I read in the SMILES of an aromatic molecule e.g., for benzene c1c1 I then want to convert the molecule to a Kekule representation and then perform various SMARTS pattern recognition e.g. [C]=[C]-[C] I have tried various Kekule commands in