Egon, it seems you got everything we discussed.

Splitting the MDL-reader into an SDF and MOL-reader is probably the
least-confusing, spec-wise, but it smells of a lot of functionality
duplication. after all an SDFile is just a repeated molfile, with optionally
some "stuff" pasted in-between.
This isn't the first time I've heard people use SDF-files as
"extended-MOL-files" with only one molecule, so it might be easier to just
have the IMolecule-reader also read the properties but throw an
EOF-exception when called a second time.
(e.g. throw new EofException("This function is intended to only read one
single molecule from an MDL-format file. To read multiple files, please use
the IChemFile-read method"); // or something to that effect)

~Jules

P.S. Sorry for calling you hasty. Upon carefully re-reading your posting(s),
I noticed I was a bit hasty myself too. you indeed "did answer that already"
:-)
(Pot calling the Kettle black and everything...)


On 14 March 2011 14:55, Vincent Le Guilloux <
vincent.le-guill...@univ-orleans.fr> wrote:

>
>
>
>> I never anticipated that someone might want to read just the first
>> molecule in a SD file :)
>>
>>
> Fair enough :) I think it's not so much unusual: when it's time to test
> your new outstanding chemoinformatics library, you often want to use some
> molecules you already known as basic test cases, and the simplest and
> cleanest way is to store them in dedicated files (IMHO).
>
> Of course one may use hardcoded SMILES as alternatives, but I found that
> using SDF is less prone to reading / parsing errors...
>
>
>
>> 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?
>>
>>
> I think you got everything :) besides cleaning the javadoc, the first step
> would be to redefine the specifications of the MDL reader, eg. either
> reading properties in all cases, or splitting as you suggested.
>
> Cheers :)
>
>
------------------------------------------------------------------------------
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