Hi Hitesh

I use the PropertyMol object to save molecules with properties, setting a 
property for a molecule is fairly simple,

m.SetProp("_Name",”mol_name")

for m in mol_lst:
            pm = AllChem.PropertyMol(m)
            pm.SetProp("_Name", name)
            pm.SetProp("_Energy", None)
            dump_list.append(pm)
cPickle.dump(dump_list, open(p_name, "w+"))

Then something like this will allow you to act on the molecules again.

mol_list = cPickle.load( open(p_name, "rb" ) )

Hope this helps.

Josh Campbell

From: Hitesh Patel [mailto:[email protected]]
Sent: 03 July 2015 14:21
To: [email protected]
Subject: [Rdkit-discuss] Save files with new atom properties and read again

Hi there,
I am new to RDkti.
Is there a way to save custom property for each atoms and save that to any file 
format and use it again?
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to