Hi Fabian,

The first one is easy: the function expects a header in the file by default. 
There is a parameter that toggles this but I don't have access to a computer 
right now. There is an example in the documentation. 

Best regards, 

George 

Sent from my gPad

On 7 Sep 2012, at 13:34, Fabian Dey <[email protected]> wrote:

> Hi 
> 
> I found two issues when reading files:
> 
> 1)  I might be getting something wrong here, but it seems as if 
> SmilesMolSupplier misses the very first Smiles:
> 
> input smiles file "test.smi":
> C mola
> CC molb
> CCC molc
> CCCC mold
> 
> 
> # python script
> from rdkit import Chem
> suppl = Chem.SmilesMolSupplier('test.smi');
> 
> print "TEST-1 : %s %s"  
> %(Chem.MolToSmiles(suppl[0]),suppl[0].GetProp("_Name"))
> print ""
> 
> for mol in suppl:
>     print "TEST-2 : %s %s"  %(Chem.MolToSmiles(mol),mol.GetProp("_Name"))
> 
> print ""
> 
> for i,mol in enumerate(suppl):
>     print "TEST-3 : %s %s"  %(Chem.MolToSmiles(mol),mol.GetProp("_Name"))
> 
> 
> #output 
> TEST-1 : CC molb
> 
> TEST-2 : CC molb
> TEST-2 : CCC molc
> TEST-2 : CCCC mold
> 
> TEST-3 : CC molb
> TEST-3 : CCC molc
> TEST-3 : CCCC mold
> 
> The first molecule "mola" is not available through the supplier (also happens 
> with other smiles files).
> 
> 
> 2) SDMolSupplier  : I have a script which calculates properties from SDfiles 
> read in through the corresponding supplier
> and RDKIT occassionally reported the following errors:
> 
> ****
> Pre-condition Violation
> Atomic number not found
> Violation occurred on line 56 in file 
> /home/dey/Downloads/RDKit_2012_06_1/Code/GraphMol/PeriodicTable.h
> Failed Expression: atomicNumber<byanum.size()
> ****
> 
> [12:25:23] Unexpected error hit on line 6
> [12:25:23] ERROR: moving to the begining of the next molecule
> ERROR for molecule at position 0
> 
> 
> It turned out that for the corresponding SD-file the atom elements were 
> written in all captial letters  (e.g. CL) - if these
> were changed to the proper format (Cl) RDKIT passed without throwing an 
> error. Although I can preprocess the SD-files
> with a script, it would be nice if RDKIT could handle these cases internally.
> 
> Best
> Fabian
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to