The problem is in the data file -- I added an example, benzene, from
wikipedia, and fixed the first one of your molecules for you (attached).

Amongst other things - the first three lines are header lines (
http://en.wikipedia.org/wiki/Chemical_table_file), you only have two of
those.

I find the specification very useful when I hit these kind of problems.
 Here it is: http://c4.cabrillo.edu/404/ctfile.pdf


On 23 July 2014 22:26, Abhik Seal <[email protected]> wrote:

> Hi RDkiters,
>
> I have a sdf file attached(2 molecules only) and when i want to do simple
> printing of the mol using code below i am getting an error not sure what is
> wrong with the file
>
> >>> from rdkit import Chem
>
> >>> suppl = Chem.SDMolSupplier('data.sdf')
>
> >>> for mol in suppl:
>
> ...     print mol
>
> ...
>
> [21:15:14] ERROR: Cannot convert     to int on line 4
>
> [21:15:14] ERROR: moving to the begining of the next molecule
>
> None
>
> [21:15:14] ERROR: Cannot convert     to int on line 106
>
> [21:15:14] ERROR: moving to the begining of the next molecule
>  Any help on this problem ?
>
> Abhik Seal
> Indiana University Bloomington
> School of Informatics and Computing
> Cheminformatics and Chemgenomics group <http://registratio54.wix.com/ccrg>
> [email protected]
> http://mypage.iu.edu/~abseal/index.htm
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>

Attachment: data2.sdf
Description: Binary data

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to