Hi George, 
I don't quite understand the problem with the canonical smiles although I'm 
sure Greg will work it out. The molecule reads in fine from the original smiles.

>>> mol = Chem.MolFromSmiles("C1=CC=C2C(=C1)NC=S2")
>>> Chem.MolToSmiles(mol)
>>> 'c1[nH]c2ccccc2s1'

It would be less work (computationally) to write a try statement from the 
original smiles and if that fails then handle it the way that you have shown.

Sorry I couldn't answer your exact question though, best of luck.
Best,
Nick


On 12 Mar 2012, at 16:58, George Papadatos wrote:

> Hello all,
> 
> Could anyone please explain this:
> 
> In [21]: Chem.CanonSmiles('C1=CC=C2C(=C1)NC=S2')
> Out[21]: 'c1[nH]c2ccccc2s1'
> 
> In [22]: Chem.MolFromSmiles(Out[21])
> [16:47:14] Can't kekulize mol
> 
> In other words, how is it possible that a valid RDKit SMILES output fails to 
> be converted to molecule again?
> I'm sure this has to do with aromaticity and kekulization for benzothiazole 
> but still....
> 
> 
> Many thanks in advance,
> George
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2_______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company 
Limited by Guarantee, Registered in England under Company No. 534147 with its 
Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer and network.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to