Hitesh,
It is certainly possible to set atom properties. I don't think any of the
output formats the rdkit can generate really support atom properties
though. What format did you envision writing and how would the atom
properties be encoded?
-greg
On Friday, July 3, 2015, Hitesh Patel <[email protected]> wrote:
> Hi Josh,
> Thanks for your quick reply. But, sorry, I want to set atom properties,
> not molecule properties. Like,
>
> atom = m.GetAtomWithIdx(5)
> atom.SetProp('my_property', 'value_of_my_property')
>
> I want to save this property associated with each atom.
>
> Regards,
>
> Hitesh Patel
>
> On Fri, Jul 3, 2015 at 3:41 PM, Campbell J.E. <[email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:
>
>> 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]
>> <javascript:_e(%7B%7D,'cvml','[email protected]');>]
>> *Sent:* 03 July 2015 14:21
>> *To:* [email protected]
>> <javascript:_e(%7B%7D,'cvml','[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