Quoting Egon Willighagen <egon.willigha...@gmail.com>:

> On Mon, Mar 14, 2011 at 12:55 PM, Jules Kerssemakers
> <j.kerssemak...@cmbi.ru.nl> wrote:
>> The problem seems to be that the MDLv2000Reader DOESN'T parse the molecule
>> properties beyond the "M  END" line if asked for an IMolecule, but DOES
>> parse them if asked for a IChemFile.
>
> Correct. That's how it is supposed to happen. The read() method is not
> expected to be called multiple times.

That's why I used it to load a single molecule, thinking it was the  
best way to do...

>> I'm guessing the molecule-reading stops after encountering "M  END", which
>> makes sense as this used to indicate the end of the molecule. Now with SDF
>> properties occurring after this terminator-token, things go awry.
>
> Yes. Didn't I reply that already? :)
>
> The reason for this is that reading a IMolecule reads a MDL molfile,
> which doesn't have any properties as part of the format.
>

Here I don't understand: if I reefer to the documentation of the  
MDLv2000Reader class, this class "Reads a molecule from an MDL MOL or  
SDF file".

Although no particular documentation is provided on how properties are  
handled, I was guessing that this was the class to use when one want  
to read a single molecule available in the SDF format.

Was my guess a wrong one ?

>> The IChemFileReader of course has to continue beyond the M-END, because
>> there may be more molecules, in this process it "accidentally" encounters
>> the properties, which it then (correctly) associates with the previous
>> molecule.
>
> Properties are only part of the MDL SD file specification, and thus
> read when reading a SD file.
>

Which is the case here... There is clearly something I'm missing here,  
sorry for that if its obvious or already explained elsewhere :)

Thanks for your answers anyway :)
vincent



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to