Dear Peter,

On Tue, Sep 28, 2010 at 1:32 AM, Peter Schmidtke <pschmid...@ub.edu> wrote:
>
> I'd like to read several molecules from a SD file (created with MOE).
> These molecules have already added H's and I'd like to keep them as they
> are (so not readd them in rdkit after reading). How can I do this with
> the SDMolSupplier...right now I get the impression that he reads
> everything but H's.

By default the RDKit removes Hs from molecules. To keep them you need
to use the optional "removeHs" argument when constructing your
SDMolSupplier:
In [11]: suppl = Chem.SDMolSupplier('blah.sdf',removeHs=False)
In [12]: ms = [x for x in suppl]
In [13]: ms[0].Debug()
Atoms:
        0 6 C chg: 0  deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 0
        1 6 C chg: 0  deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 0
        2 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
        3 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
        4 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
        5 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
        6 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
        7 1 H chg: 0  deg: 1 exp: 1 imp: 0 hyb: 1 arom?: 0 chi: 0
Bonds:
        0 0->1 order: 1 conj?: 0 aromatic?: 0
        1 0->2 order: 1 conj?: 0 aromatic?: 0
        2 0->3 order: 1 conj?: 0 aromatic?: 0
        3 0->4 order: 1 conj?: 0 aromatic?: 0
        4 1->5 order: 1 conj?: 0 aromatic?: 0
        5 1->6 order: 1 conj?: 0 aromatic?: 0
        6 1->7 order: 1 conj?: 0 aromatic?: 0

Best Regards,
-greg

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to