Afraid that doesn't work. SMILESFormat only implements IChemFormat, not 
IChemFormatMatcher.

Tim


On 15/01/2015 11:51, Egon Willighagen wrote:
> On Thu, Jan 15, 2015 at 12:39 PM, Tim Dudgeon <[email protected]> wrote:
>> OK, will use IteratingSMILESReader, but the basic problem of format
>> detection remains.
>> FormatFactory.guessFormat() does not seem to recognise smiles, and
>> presumably wouldn't return IteratingSMILESReader (or IteratingSDFReader)
>> anyway.
> Correct, this is the one format that is specifically excluded. The
> problem with .smi files is that it is too easily recognizes as other
> chemical formats... the format is ill-defined, and allows for comments
> and sorts, which gave problems.
>
> You should, though I didn't test it right now, be able to to "add" the
> SMILES format to the factory with:
>
> public void registerFormat(IChemFormatMatcher format)...
>
> So, please try:
>
> formatFactory.registerFormat(SMILESFormat.getInstance())
>
> And then do the detection.
>
> Egon
>


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to