Hi Toby,
On Wed, Aug 21, 2013 at 12:10 PM, Toby Wright <[email protected]>wrote:
>
> I'm trying to read the data lines from an SD file where the CTAB is in
> V3000 format. If the file "v3000propIssue.sdf" contains the following:
> testMol
>
>
> 0 0 0 0 0 999 V3000
> M V30 BEGIN CTAB
> M V30 COUNTS 1 0 0 0 0
> M V30 BEGIN ATOM
> M V30 1 C 0 0 0 0
> M V30 END ATOM
> M V30 END CTAB
> M END
> > <TestProp>
> 42
>
> $$$$
>
> then it is read by an SDMolSupplier it loads correctly (as shown by the
> Debug) apart from the data lines which are not converted to RDKit
> properties as the following interactive code snippet show:
>
> >>> import rdkit
> >>> from rdkit import Chem
> >>> mol = Chem.SDMolSupplier("v3000propIssue.sdf").next()
> [10:59:33] ERROR: Problems encountered parsing data fields
> [10:59:33] ERROR: moving to the begining of the next molecule
> >>> mol.HasProp("_Name")
> 1
> >>> mol.HasProp("TestProp")
> 0
>
That's a bug (and an embarrassing one). Looks like I've never tested the
use of v3000 mol files in SDFs. They certainly should work though.
I'll get it fixed.
-greg
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss