Hi Sebastian,

On Fri, Apr 16, 2010 at 10:08 AM, Sebastian Wolf <sw...@ipb-halle.de> wrote:
> I was wondering if the new CDK-Jchempaint 9 is able to render lone
> pairs/radicals. I am using cdk 1.3.4 and tried to do the following code:
>
> List<IAtomContainerGenerator> generators = new
> ArrayList<IAtomContainerGenerator>();
> generators.add(new BasicBondGenerator());
> generators.add(new BasicAtomGenerator());
> //this does not work because it implements IGenerator instead of
> IAtomContainerGenerator

Oops... yeah, sorry about that. I 'cleaned up' the API in version 9 a
bit, to have further distinguish between AtomContainer and Reaction
rendering, making IGenerator a super interface giving access to the
rendering parameters, so that the code no longer needed separate
methods for generators... but it seems I have been somewhat careless
with the patch... my apologies!

> //generators.add(new LonePairGenerator());

That should do it, at least for the lone pairs.

> Renderer renderer = new Renderer(generators, new AWTFontManager());
>
> The renderer can only be instantiated using a list of
> IAtomContainerGenerator.
>
> Am I doing something wrong here?

No, this is a bug. I'll file it and fix in in version 10 of the patch.

Egon


-- 
Post-doc @ Uppsala University
Proteochemometrics / Bioclipse Group of Prof. Jarl Wikberg
Homepage: http://egonw.github.com/
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to