I can't answer your root question, but if you want to go to SMILES and then
back, I think you want *Chem.MolFromSmiles()*, not *Chem.MolToSmiles()*.

Curt

On Tue, Jan 17, 2017 at 8:52 AM, Chris Arthur <chris.art...@bristol.ac.uk>
wrote:

> Dear all
>
>
> I have a molecule containing a thiazole ring which has been generated by a
> reaction in Rdkit.
>
> Sanitising the molecule gives kekulization error...
>
> Chem.SanitizeMol(forwardProduct_)
> Traceback (most recent call last):
>
>   File "<ipython-input-29-649525efe840>", line 1, in <module>
>     Chem.SanitizeMol(forwardProduct_)
>
> ValueError: Sanitization error: Can't kekulize mol
>
> I can generate a smiles string from it (I had thought of doing a smiles to
> molecule conversion)
>
> #Rdkit generated smiles that started us down this rabbit-hole
> temp = Chem.MolToSmiles('CC(=O)c1sc(C2CCOCC2)nc1C')
>
> But this fails....
>
> ArgumentError: Python argument types in
>     rdkit.Chem.rdmolfiles.MolToSmiles(str)
> did not match C++ signature:
>     MolToSmiles(class RDKit::ROMol mol, bool isomericSmiles=False, bool
> kekuleSmiles=False, int rootedAtAtom=-1, bool canonical=True, bool
> allBondsExplicit=False, bool allHsExplicit=False)
>
>
> So I thought I would try with simpler thiazoles....
>
> #ChemDraws smiles representation
> temp = Chem.MolToSmiles('C1=CN=CS1')
>
> #From wikipedias smile for thiazole
> temp = Chem.MolToSmiles('n1ccsc1')
>
> These however also fail.
>
>  Can anyone suggest how I can proceed in order to sanitize such molecules
>
>  Thanks
>
>  Chris
>
>
>
> --
> Dr Christopher J. Arthur
> School of Chemistry
> University of Bristol
> BRISTOL, BS8 1TS,  UK
> E-mail:  chris.art...@bristol.ac.uk
>
> Office: (+44 117) 331 7192 <+44%20117%20331%207192>
> Mass Spectrometry Lab: (+44 117) 331 7358 <+44%20117%20331%207358>.
> FAX: (+44 117) 927 7985 <+44%20117%20927%207985>
>
> WWW URL: http://www.chm.bris.ac.uk/staff/carthur.htm
> LinkedIn  Profile: https://www.linkedin.com/in/drchrisarthur
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to