On Wed, Apr 1, 2009 at 8:10 PM, George Oakman <[email protected]> wrote:
>
> I would like to explore the possiblilty of transforming aromatic bonds into
> single and double bonds, for example:
>
>   c1ccccc1 into C1=CC=CC=C1 into
>

[9]>>> m = Chem.MolFromSmiles('c1ccccc1')

[10]>>> Chem.MolToSmiles(m)
Out[10] 'c1ccccc1'

[11]>>> Chem.Kekulize(m,clearAromaticFlags=True)

[12]>>> Chem.MolToSmiles(m)
Out[12] 'C1=CC=CC=C1'


> and similarly, transform conjugated bonds into single and doubles, for
> example:
>
>   N:C:O into NC=O

This kind of structure won't be read in in the first place, it will fail:

[13]>>> m = Chem.MolFromSmiles('N:C:O')
[20:17:58] Kekulization somehow did not convert bond 0


 ":" in a SMILES does not mean delocalized, it means aromatic and that
is a concept that only applies to rings.

The RDKit is, by design, exceedingly picky about these things.

-greg

Reply via email to