Content-Type: multipart/related; type="text/html"; boundary="Apple-Mail=_A7DC6482-F944-47ED-A0B3-AA7BCBDEB1AE" --Apple-Mail=_A7DC6482-F944-47ED-A0B3-AA7BCBDEB1AE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Dear = all, 

I am trying to render selected bonds in a = molecule with different colour, using CDK. 
I use the = latest nightly built of CDK and version 26 of CDK-jchempaint. I use = CDK-jchempaint for 
ExternalHighlightGenerator = class. 

Below is my method code. It = renders image for adenine(attached) but not with bonds = highlighted. 
Has anyone done different colouring for = bonds while rendering ? 

Any help =  will be much = appreciated. 
---------------------------------------------= ----------------------------------------------------------
= public void generateImageWithBondsHighlighted() throws Exception = {
            IAtomContainer = molecule =3D MoleculeFactory.makeAdenine();
    =         IAtomContainer selectionMolecule =3D = molecule.getBuilder().newInstance(IAtomContainer.class);

            for (int i =3D 0; i = < 3; i++) {
            =       = selectionMolecule.addBond(molecule.getBond(i));
    =         }
        =     = AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
            = StructureDiagramGenerator structureDiagramGenerator =3D new = StructureDiagramGenerator();
        =     = structureDiagramGenerator.setMolecule(molecule);
    =         = structureDiagramGenerator.generateCoordinates();
    =         IAtomContainer moleculeWithCoordinates =3D = structureDiagramGenerator.getMolecule();

  =           IRenderer chemicalMoleculeRenderer =3D = new AtomContainerRenderer(Arrays.asList(new BasicSceneGenerator(), new = ExternalHighlightGenerator(),
        =             new BasicBondGenerator(), new = BasicAtomGenerator()), new AWTFontManager());
    =         RendererModel renderer2DModel =3D = chemicalMoleculeRenderer.getRenderer2DModel();
    =         = renderer2DModel.set(ExternalHighlightGenerator.ExternalHighlightDistance.c= lass, (double) 12);
            = renderer2DModel.set(RendererModel.ExternalHighlightColor.class, = Color.ORANGE);
            = renderer2DModel.setExternalSelectedPart(selectionMolecule);

=
            BufferedImage image = =3D new BufferedImage(186, 186, = BufferedImage.TYPE_INT_ARGB);
        =     Rectangle2D bounds =3D new Rectangle2D.Double(0, = 0,
                =     image.getWidth(),
        =             = image.getHeight());
            = Graphics2D g2 =3D (Graphics2D) image.createGraphics();
  =           = g2.setBackground(Color.WHITE);
        =     g2.clearRect(0, 0, 186, 186);
    =         AWTDrawVisitor awtDrawVisitor =3D new = AWTDrawVisitor(g2);
            = System.out.println("Atom count - " + = moleculeWithCoordinates.getAtomCount());
      =       = chemicalMoleculeRenderer.paint(moleculeWithCoordinates, awtDrawVisitor, = bounds, true);
            = g2.dispose();
            = ImageIO.write((RenderedImage) image, "PNG", new = File("/Users/kalai/adenine.png"));
        =     System.out.println("Finished rendering");
  =          
      = }
--------------------------------------------------------------= -----------------------------------------

<= div>
Kind = regards,
Kalai


----
Ms Kalai Vanii Jayaseelan = (Bioinformatician)
Cheminformatics and Metabolism Group
European = Bioinformatics Institute (EBI)
Wellcome Trust Genome = Campus
Hinxton, Cambridge CB10 1SD UK
Phone +44 1223 49 = 4581




= --Apple-Mail=_A7DC6482-F944-47ED-A0B3-AA7BCBDEB1AE Content-Transfer-Encoding: base64 Content-Disposition: inline; filename=adenine.png Content-Type: image/png; x-unix-mode=0644; name="adenine.png" Content-Id: <8E94F566-72B3-4565-8C0B-DEFE0F854E6D@windows.ebi.ac.uk> iVBORw0KGgoAAAANSUhEUgAAALoAAAC6CAYAAAAZDlfxAAAQCElEQVR42u2da2xUVReGgfgHfogK aCsaTbxRoSgqqJBok3qpFZDgJYgGkQAWaFSSiiYqKlLBgKKgIYAGWgUkqAmoARVQQQEveAMFoq13 QRRsxSuI65tnN/0o05nOYTrTnsv7JE0KZZrh7Gf2WXuttfdpY0JEgDa6BEKiCyHRhZDoQkh0ISS6 EBJdCIkuhEQXEl0IiS6ERBdCogu/UlgYG/jYyOfkmNXUHPqzysq6n3XpItFFSETnq6REoosIiN62 rdn69RJdhFx0vvLzzfbvl+gipKIXFJi1a1f3/dSpEl2EVPSyMrPS0rrvO3Qwq66W6CKkotfWmuXm 1v25qMisokKiixCKDkuWHIzXi4slugip6MBs3nCBKtFbaBCiVMzwg+hVVWbt2ycWfefOnRI9W4MQ pWJGtvnjjz9szZo1TYoO5eWJRZ82bZqNHDnSduzYIdGzIXpUihnZ4r///rNnnnnGTjjhBHv++edT ir5vn1leXuNr/Ndff9mECROsU6dONmnSJPfBkegZFD0qxYxssD42Q/Tp08fOP/9827BhQ0Z+51df fWVDhgxxH5z58+fbgQMHJHpzRY9SMSOTfPvtt3b99dfbiSee6GZzZvVMs3HjRuvXr5+dffbZtnr1 aone3IVSVIoZmYrDJ06c6MKL++67r0XCC8KhU045xfr3729bt26V6OmKHpViRqbi8KFDh7oZvSX5 559/7NFHH42NSRcbO3as7dq1S6IfrugQhWKGn+Lwet544w278cYb7cEHH7Tvvvsu5b/fvXu33X77 7da5c+dYqDnVLWAl+mGIDk0VM+bOnWtTpkyxbdu2KQ7PMMhaXl7u5L3zzjtjd9jalK/54osvbPDg wXbSSSfZwoULs/beQil6U8WM6ljwXhoL5rt27Wpnnnmm3XPPPbZp0ybF4RmE/PmIESMsJyfH5syZ Y//++2/K16xbt87dbXr37u2+l+geRIdkxYyGsSrZAGae0047zU4++WQbP368rV27NlBpMD/G4fV8 +OGHVlBQYD179rRVq1Z5et+LFi1yszuzPLO9RE8herJiRjI2b95sDzzwgEuBHXfccTZ69GhbuXJl 7PfsUxzeTF588UWXbRkwYIBt377dUwhE3E4IRBxPPB950bMB4c306dNd7vfoo4+2G264wV544QVf V/haKg5vTraFa0q2BXn37NmT8jVkZMjM8BoyNfwOiZ7FeHP27Nl22WWX2ZFHHmmDBg2yyspKTwMV 5jg8XX7++WcbM2aMHXvssTZz5kzbX1/GbgJy7uTeuSssXbpUomebX3/91UmO7Eh/6aWXug9BazQv +SUOT5ctW7a4yaNbt272yiuveHoNVdVevXq5Oy3rK4neQjMp4QxhDeFN37593a25ipRPBOPwdEFy ZEd65E8FiYIFCxa4Dzh9NPTThFZ0FjejRo2yv//+2xeDxYKVhSsLWBayZ511llvYssCNUhyeLoQv hDGEM4Q1hDdeJho6IwnZ6JSsid+MEHTRSTmxOMm0RJmCGYc8MKlKUpakLhkIbrXpihm0ODxdWPfU V0vpafey+CRspPedCWbWrFmeYn7fi87Med5559mTTz4ZmMEjl0xRiuIURapx48a5WNPLgAQ9Dk8X UpCkIll8cvf2wqeffurCnzPOOMOWLVsWbNHLysrsqquuCvQA0n5A9Y9Za/jw4bZ8+fKEfR5hisPT hSITxSaKTkwYXlixYoX16NHDvaY5Fe9WE/3VV191sekvv/wSikGk8Ym4lAHp2LGjXXfddbZ48WL7 /PPPQxmHNycUpI2AdgLaCrxkuGg5oKcpNzfXhg0b5qnJzBei//TTT3b88ce7DrkwwuLr6aeftqKi ImvTpo0LdcIah6cLDWK0a7BOmTx5sqdux71797pryTX9888//S06M9oVV1xhd999dyQGlEERyaFq fc0117h+GO6A2bqmLT4KlH4vvPDCjK2mJXo4oPnu3HPPdW6kKh75XnQWIORWs1UUkOjBhrs9xSOy WRTukmWlfC3677//bqeffro999xzkRq8ZIOiD0DTrlBnYAGfKBb3teg333yzW2VHDYmePskWnL4V nUUGiX8+qRJdordGOJj1q008TlzutUAg0UXgRCezcsEFF9iMGTM0KBI9vKKTKydnHuVqoEQPueic 3kr1kyqoBkWih1J0+lfo0Hvttdc0KBI9vKIPHDjQ7rjjDo2IRA+v6E888YTrMQ/asRISXaJ7hmZ5 dgu15kE1El2iZ1V0qljsumFXvZDooRX9lltucY04QqKHVnSOiWA/4G+//aZRkOjhFJ1WSnZsv/vu uxoBiR5O0dnLd9FFF7kDJIVED63oHOpzySWXRH7Dr0QPsehvv/2228n9448/6spL9HCKzuGcbGZ9 +eWXddUlenhFZ9f2bbfdpisu0cMrOsfH8RSJ+ANBdW6JRA+N6BzMc8QRRzQ6/xrJCWU4lUpI9NDM 6ByjHD+jczJVfn6+754vKdEletox+rXXXmu33npro7/njMGSkhKNhEQPh+jJsi60ANAKwDPihUQP vOiQLI/+/vvvR+40LokeYtGBymhhYWGjyijnK7L7PyrnK0r0kIuerNcF8a+88kp3LLAGRaI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