Hi Christoph,

Thanks for bug will look into it. The iterating reader is a better choice for SDF. I think in 1.4.* itís called IteratingMDLReader. On master at least I get 2 molecules from your file.

         IteratingSDFReader sdf = new IteratingSDFReader(new FileReader("/Users/johnmay/downloads/test.sdf"),
        while (sdf.hasNext()) {
            IAtomContainer container = sdf.next();

On 8 Nov 2013, at 09:41, cruttkie <cruttkie@ipb-halle.de> wrote:


I investigated problems when using the MDLV2000Reader for SDF file
parsing. I have attached an example SDF with two structures. The code
used for parsing is attached, too. The problem is that only one of the
two structures is parsed correctly. The first structure has 2 newlines
between the last property and its end tags ($$$$), which causes the
problem. If I remove one newline, it works. I believe, the parser should
detect both structures correctly independent on the number of newlines
contained or at least give an error if structures are missed. I also
checked Bioclipse reading both structures correctly. I tried cdk
versions 1.4.18 and 1.4.19.

Thanks in advance.

Best regards,


Christoph Ruttkies
Group Bioinformatics & Mass Spectrometry
Leibniz Institute of Plant Biochemistry
Weinberg 3
06120 Halle, Germany

email: christoph.ruttkies@ipb-halle.de
phone: +49-345-5582-1471
fax:   +49-345-5582-1409

November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
Cdk-devel mailing list