To broaden the topic a bit, what I'm wanting is a way to read structures 
without needing to know the format, leaving it up to CDK to work it out.
Something like:

IAtomContainer readMolecule(String s);
Iterator<IAtomContainer> readMolecules(InputStream is);

 From what I've found so far there is no easy way to do this. Smiles, 
V2000, V3000 and InChi all have to be handled in their own ways.
FormatFactory helps a bit, but not much as the IChemFormat you get back 
still has to be treated separately depending on the format (e.g. the 
Molfile example).

Tim

On 20/01/2016 10:02, Egon Willighagen wrote:
> On Wed, Jan 20, 2016 at 10:44 AM, John M <john.wilkinson...@gmail.com> wrote:
>> Ultimately it's silly that V2000 and V3000 are considered different but
>> haven't had time to put them in a single 'MolfileReader' yet.
> The formats *are* different, but that does not mean the readers must be too!
>
> The MDL formats for reaction lists, etc, also used the V2000 reader.
> No problem with that, but the formats are just different, though
> interdependent.  That we do have different readers, is mostly
> historical; sometimes it's just easier to write a reader from scratch,
> or not to try to make a reader too flexible to support multiple thing,
> which makes code complexer. That's mostly the reasons why we have
> different readers for the MDL molfiles versions. Nothing more.
>
> Egon
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to