Re: [Rdkit-discuss] access to properties block information from sd file
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Eddie C. <cao...@gm...> - 2011-06-08 22:10:28
|
Hi,
AFAIK, these properties are not parsed. The following list showing supported properties is extracted from function ParseMolBlockProperties in $RDBASE/Code/GraphMol/FileParsers/MolFileParser.cpp
M ALS
M ISO
M RGP
M RBC
M SUB
M UNS
M CHG
M RAD
If you are comfortable about coding in C++, you should be able to quickly add support of other properties by duplicating one of the parsing functions (such as ParseIsotopeLine) and adapting from there.
Regards,
Eddie
On Jun 8, 2011, at 1:40 PM, Donald Keidel wrote:
> Eddie,
>
> Thank you for your response and help.
>
> I also have an SDF that looks like the following:
>
> -ISIS- 01241116242D
>
> 14 15 0 0 0 0 0 0 0 0999 V2000
> 7.4170 -5.1177 0.0000 N 0 0 3 0 0 0 0 0 0 0 0 0
> 6.7037 -5.5292 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 7.4199 -4.2958 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 6.7037 -3.8792 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 5.9916 -5.1208 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 5.9876 -4.2955 0.0000 N 0 0 3 0 0 0 0 0 0 0 0 0
> 5.2069 -4.0390 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
> 4.7234 -4.7018 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 5.2068 -5.3729 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 6.7037 -6.3542 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
> 4.9519 -6.1617 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> 4.1491 -6.3374 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
> 8.1405 -5.5312 0.0000 * 0 0 0 0 0 0 0 0 0 0 0 0
> 3.8984 -4.6977 0.0000 * 0 0 0 0 0 0 0 0 0 0 0 0
> 2 10 2 0 0 0 0
> 5 6 1 0 0 0 0
> 9 11 1 0 0 0 0
> 11 12 1 0 0 0 0
> 6 4 1 0 0 0 0
> 5 2 1 0 0 0 0
> 2 1 1 0 0 0 0
> 1 3 1 0 0 0 0
> 6 7 1 0 0 0 0
> 7 8 2 0 0 0 0
> 1 13 1 0 0 0 0
> 8 9 1 0 0 0 0
> 8 14 1 0 0 0 0
> 3 4 2 0 0 0 0
> G 13 1
> R2
> G 14 8
> R1
> M STY 2 1 SUP 2 SUP
> M SLB 2 1 1 2 2
> M SAL 1 1 13
> M SBL 1 1 11
> M SMT 1 R2
> M SBV 1 11 -0.7200 0.4100
> M SAL 2 1 14
> M SBL 2 1 14
> M SMT 2 R1
> M SBV 2 14 0.8300 -0.0100
> M END
> > <ID> (1)
> 1
>
> > <CATALOG_NUMBER>
> CM0215
>
> $$$$
>
>
>
> As you can see this one has S Group properties. Do you know if RDKit parses this also? I have tried to look into this by doing the following per your example:
>
> >>> from rdkit import Chem
> >>> m = Chem.MolFromMolFile('ChemDiv_templates_1_first_one_only.sdf')
> [13:33:27] deprecated group abbreviation ignored
> [13:33:27] deprecated group abbreviation ignored
> >>> a = m.GetAtoms()[12]
> >>> prop = a.GetPropNames()
> >>> prop[0]
> '_CIPRank'
> >>> prop[1]
> '__computedProps'
>
> As you know you cannot GetProp yet due to potential bug, but I do not see S Group Property at all. Is this correct?
>
> Thank you for your help.
>
> Don
>
>
>
> On 06/07/2011 05:29 PM, Eddie Cao wrote:
>>
>> prop = a.GetPropNames()
|