On Mon, Mar 14, 2011 at 1:48 PM, Vincent Le Guilloux <vincent.le-guill...@univ-orleans.fr> wrote: > 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".
Yeah, I guess that's an issue of where to put the parantheses... should be updated, I think: "Reads (a molecule from an MDL molfile) or (a MDL SD file)." Or, even more correct: "Reads a {@link IMolecule) from an MDL molfile or a {@link IChemFile} from an MDL SD 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 ? I never anticipated that someone might want to read just the first molecule in a SD file :) BTW, I don't think you're wrong... the documentation is and the CDK library is in not providing decent feedback... >>> 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 :) No, it's kinda new :) That's the funny thing with the CDK... most bug reports are reflecting unanticipated use cases :) > Thanks for your answers anyway :) That's what we have this mailing list for (and the book). Anyway, I will file bug/feature reports for: 1. split SDFReader from MDLV2000Reader (if not in master already; need to check that) 2. have IChemObjectReader.read() throw an EOF exception when called a second time 3. clearer JavaDoc, as outlined above Jules, Vincent, did I miss anything? Thanx for discussing these things in detail! This is what the CDK needs to make progress! (Well, and matching patches following the bug/feature reports, of course ;) Egon -- Dr E.L. Willighagen Postdoctoral Researcher Institutet för miljömedicin Karolinska Institutet Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ------------------------------------------------------------------------------ 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