Brian,

Please send RDKit-related questions to the rdkit-discuss mailing list.

On Mon, Sep 27, 2010 at 6:01 AM, Brian Watkins <[email protected]> wrote:
>
>>>>x = SD[0]
>>>> import cPickle
>>>> pkl = cPickle.dumps(x)
>>>> mol = cPickle.loads(pkl)
>>>> x.GetProp('Name')
> 'Genistein'
>>>> mol.GetProp('Name')
> Traceback (most recent call last):
>   File "<pyshell#16>", line 1, in <module>
>     mol.GetProp('Name')
> KeyError: 'Name'
>
> Why doesn't the un-pickled version(mol) return the name of the compound?

The RDKit pickle format does not preserve molecular properties. If you
would like to pickle the properties along with a molecule, you can use
the PropertyMol class:
http://www.rdkit.org/Python_Docs/rdkit.Chem.PropertyMol.PropertyMol-class.html

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to