Hi
Tks you for your explication but I have a other problem I explain...
I has written a little program 
"print "Test"
from cinfony import rdk
from rdkit import Chem

suppl = Chem.SmilesMolSupplier("C:\Test/testsmi.smi")
for mol in supple
        print mol.GetNumAtoms()

Normaly I understand RDkit this program read a smi file and give me the numbers 
of atoms each molecule in my file 
It's right ?

When I execute the program I have this answer...

Traceback (most recent call last):
  File "C:/Documents and Settings/cdmo/Desktop/testtt/testtttttttttttt.py", 
line 7, in <module>
    print mol.GetNumAtoms()
AttributeError: 'NoneType' object has no attribute 'GetNumAtoms'



So I decided to put a print to read mol during the test.
And I have this answer

None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None

So the error message is normal but I can't understand why he doesn't arrive to 
read correctly these smile in my smi files  



My files have this form

cccc...@](C)(C(C)C)O
C1C=CC[C@@h]...@h]1oc(=O)O2
C[C@@]12CCC3(C[C@@h]1cc...@]2(C#C)O)OCCO3
COc1ccc(cc1OCc2cccc3c2cccc3)C=O
CC(=O)OC[C@@h]1c...@](O1)(C)Cc2ccccc2
CC(C)C(=C1C(=O)c2ccccc2C1=O)O
c1ccc2c(c1)ccc3c2ccc4c3...@h](C4=O)O
c1cc(ccc1C=O)OCC2CCCCC2
C1CCC(C1)[...@h]2ccc[c@H]2O
COc1cccc(c1)C(=O)/C=C/c2ccc3c(c2)OCCO3
Cc1cc(c(o1)C)C(=O)OCC(=O)C23CC4CC(C2)CC(C4)C3
c...@h]1ccc[c@]2(C1=CC(=O)CC2)C
CC(=O)/C(=C/c1ccco1)/C(=O)OC(C)(C)C
C[C@@H](CC[C@@H](C(=C)C)O)C=C
CC[C@@]12c...@h]3c4ccc(cc4c...@h]3[c@@h]1...@h]([C@@H]2O)O)O
C[C@@]1(C[C@@H]2CCCC[C@@H]2C[C@@]1(C)O)COC
CC(C)(C)C(=O)Oc1ccc2c(cc(=O)oc2c1)c3ccccc3
c1ccc(cc1)c2coc3ccccc3c2=O
Cc1cccc2c1C3c4c(cccc4C(=O)CC3CC2=O)C
CC(C)[C@@H]1C[C@@H]([C@@](C=C1)(C)O)O

Tks 
Cedric



-----Original Message-----
From: Greg Landrum [mailto:greg.land...@gmail.com] 
Sent: jeudi, 25. mars 2010 13:09
To: Cedric MORETTI
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] read a smi files

Hi,

You can read molecules from SMILES files using a SmilesMolSupplier:
suppl = 
Chem.SmilesMolSupplier('benzodiazepine.smi',delimiter='\t',titleLine=False)

For more information: the SmilesMolSupplier behaves the same way as
the SDMolSupplier that is described in the
GettingStartedWithPython.pdf file distributed with the RDKit.

Best Regards,
-greg

On Thu, Mar 25, 2010 at 4:09 AM, Cedric MORETTI
<cedric.more...@firmenich.com> wrote:
> Hello,
>
> I am writing because I am seeking your help.
> I have a program that requires this input parameter
>
>
>
> "reader1 = Chem.SDMolSupplier("C:\Test/testsdf.sdf")"
>
> "writer = Chem.SDWriter("C:\Data\test_out.sdf")"
>
>
>
> I liked to read a file directly "*. smi " using this command
>
>
>
> "reader1 = Chem.MolFromSmiles(C:\Test/testsmi.smi")"
>
> "writer = Chem.SDWriter("C:\Data\test_out.sdf")"
>
>
>
> My smi file is this latter type
>
>
>
> cccc...@](C)(C(C)C)O         ZINC02508045
>
> C1C=CC[C@@h]...@h]1oc(=O)O2 ZINC17163557
>
> C[C@@]12CCC3(C[C@@h]1cc...@]2(C#C)O)OCCO3        ZINC01616187
>
> COc1ccc(cc1OCc2cccc3c2cccc3)C=O ZINC05294043
>
> CC(=O)OC[C@@h]1c...@](O1)(C)Cc2ccccc2         ZINC01641674
>
> CC(C)C(=C1C(=O)c2ccccc2C1=O)O    ZINC01592093
>
> c1ccc2c(c1)ccc3c2ccc4c3...@h](C4=O)O    ZINC06118532
>
> c1cc(ccc1C=O)OCC2CCCCC2  ZINC19806585
>
> C1CCC(C1)[...@h]2ccc[c@H]2O       ZINC02168867
>
> COc1cccc(c1)C(=O)/C=C/c2ccc3c(c2)OCCO3            ZINC05128906
>
> Cc1cc(c(o1)C)C(=O)OCC(=O)C23CC4CC(C2)CC(C4)C3
> ZINC04930263
>
> c...@h]1ccc[c@]2(C1=CC(=O)CC2)C           ZINC05081132
>
> CC(=O)/C(=C/c1ccco1)/C(=O)OC(C)(C)C        ZINC01673320
>
> C[C@@H](CC[C@@H](C(=C)C)O)C=C           ZINC06020645
>
> CC[C@@]12c...@h]3c4ccc(cc4c...@h]3[c@@h]1...@h]([C@@H]2O)O)O
> ZINC17424830
>
> C[C@@]1(C[C@@H]2CCCC[C@@H]2C[C@@]1(C)O)COC   ZINC05464622
>
> CC(C)(C)C(=O)Oc1ccc2c(cc(=O)oc2c1)c3ccccc3        ZINC01940013
>
> c1ccc(cc1)c2coc3ccccc3c2=O ZINC00895390
>
> Cc1cccc2c1C3c4c(cccc4C(=O)CC3CC2=O)C   ZINC01601995
>
> CC(C)[C@@H]1C[C@@H]([C@@](C=C1)(C)O)O       ZINC14588844
>
>
>
> Do you know how I can do?
> Thank you
> Moretti Cédric
>
>
>
> **********************************************************************
> DISCLAIMER
> This email and any files transmitted with it, including replies and
> forwarded copies (which may contain alterations) subsequently
> transmitted from Firmenich, are confidential and solely for the use
> of the intended recipient.
> The contents do not represent the opinion of Firmenich except
> to the extent that it relates to their official business.
> **********************************************************************
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
**********************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and
forwarded copies (which may contain alterations) subsequently
transmitted from Firmenich, are confidential and solely for the use
of the intended recipient.
The contents do not represent the opinion of Firmenich except
to the extent that it relates to their official business.
********************************************************************** 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to