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
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
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
3 matches
Mail list logo