Hi Greg,
At first priority, I will use mol2 format. A s shown in mol2 format
explanation, we can set user specified atom attributes. I copied the text
below for your convenience. See the bold text.
@<TRIPOS>UNITY_ATOM_ATTR
The data records associated with this RTI contain the information necessary
to
reconstruct UNITY atom attributes defined in the molecule. UNITY atom
attributes are used to define charge, chirality, etc.
<atom number> <number of attributes>
<attribute 1 name> <attribute 1 value>
<attribute 2 name> <attribute 2 value>
.
.
.
<attribute n name> <attribute n value>
If atom 5 has a charge of -3, chirality N and isotope 1, and
*atom 9 has a user-defined attribute A with value XYZ and a user-defined
boolean attribute B*, the
records are:
5 3
charge -3
S N
I 1
*9 2A XYZB*
So, Isn't it possible to add such property and write mol2 file.
For second priority, I can use mol files.
There I have to set
Properties block:
- M ALS - atom list and exclusive list
- M APO - Rgroup attachment point
- M CHG - charge
- .....
But, I am not sure, whether the user defined property block is allowed or
not.
Which one looks feasible??
On Fri, Jul 3, 2015 at 4:45 PM Greg Landrum <[email protected]> wrote:
> 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]>
>> 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]]
>>> *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?
>>>
>>
>> --
Regards,
Dr. Hitesh Patel
Post-Doctoral Fellow,
Technische Universität Dortmund,
Chemische Biologie,
Otto-Hahn-Straße 6,
44227, Dortmund,
Germany
Room: C1-05-181
Work: 0231 755-4740
Mob.: +49 (0)176 5544 6467
Email: [email protected]
------------------------------------------------------------------------------
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