Hi,

I am fairly new to RDKit and I apologize in advance if this question is 
rather basic in nature.

I am reading a molecule the following way and trying to display the 
properties from the sdf:

[dkeidel-desktop:dkeidel] /emi/doc/sod/villa $ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import os, sys, copy
 >>> from rdkit.Chem import rdDepictor
 >>> from rdkit import Geometry
 >>>
 >>> from rdkit import Chem
 >>> from rdkit.Chem import AllChem
 >>> from rdkit.Chem.Draw import MolDrawing
 >>> from rdkit.Chem.AvailDescriptors import descDict
[15:14:22] WARNING: The AvailDescriptors module is deprecated. Please 
switch to using the Descriptors module.
 >>>
 >>> import rdkit.DataStructs
 >>> import rdkit.Chem.MACCSkeys
 >>> import rdkit.Chem.AtomPairs.Pairs
 >>> import rdkit.Chem.AtomPairs.Torsions
 >>> suppl = Chem.SDMolSupplier('/emi/doc/sod/villa/R1_060A.sdf')
 >>> mb = suppl.GetItemText(0)
 >>> nsuppl = Chem.SDMolSupplier()
 >>> nsuppl.SetData(mb)
 >>> mol = nsuppl.next()
 >>> list(mol.GetPropNames(includePrivate=True, includeComputed=True))
['Template', '_MolFileComments', '_MolFileInfo', '_Name', 
'_StereochemDone', '__computedProps', 'numArom']
 >>> mol.GetProp('Template')
'060A/11'

As you can see I have successfully done this.  However, I want to get 
access to other properties from the properties block in the sd file.  
Here is the sd file I am referring to:

   -ISIS-  03241116262D

   7  6  0  0  0  0  0  0  0  0999 V2000
     7.9102   -2.4208    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
     6.4770   -2.4208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     5.0437   -2.4208    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
     7.1916   -2.0137    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     5.7583   -2.0137    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     4.3292   -2.0137    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
     7.9148   -3.2458    0.0000 R#  0  0  0  0  0  0  0  0  0  0  0  0
   2  4  1  0  0  0  0
   3  5  1  0  0  0  0
   4  1  1  0  0  0  0
   5  2  1  0  0  0  0
   6  3  1  0  0  0  0
   1  7  1  0  0  0  0
M  RGP  1   7   1
M  END
 > <Template>
060A/11

$$$$


My question is the following.  When I have the RDKit mol object, can I 
Get the property M RGP or Set it to something different?  Or should I 
deal with this information as a string and write it out to a new sdf if 
I want to change some numbers on the M RGP line?

Thank you in advance for any help.

Don

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to