Hi John,


On 22 November 2013 13:01, John May <johnmay@ebi.ac.uk> wrote:
Hi All,

Does anyone know how to highlight atoms in different colours using the CDK renders?

Yes :)

http://apps.ideaconsult.net:8080/ambit2/dataset/1736?model_uri=http://apps.ideaconsult.net:8080/ambit2/model/48

There are several ways, ambit code is at  http://sourceforge.net/p/ambit/code/HEAD/tree/trunk/ambit2-all/ambit2-rendering/src/main/java/ambit2/rendering/CompoundImageTools.java 

Regards,
Nina
 
Stephan and I have been scratching our heads and really looks like it’s not possible. We have code for this in Knime but simply can’t believe it’s not in the main rendering code. 

I always thought the ColorHash was how it was done but this (see below) only works for bonds :/.

Map<IChemObject,Color> highlight = Maps.newHashMap();
highlight.put(m.getAtom(0), Color.green);
highlight.put(m.getAtom(1), Color.red);
renderer.getRenderer2DModel().set(RendererModel.ColorHash.class, highlight);

Cheers,
J


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-devel mailing list
Cdk-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-devel