OEAddResidueHighlighting

void OEAddResidueHighlighting(OE2DActiveSiteDisplay &adisp,
                              const OEDepict::OEPen &pen,
                              const OEChem::OEResidue &residue)

Highlights the given residues in the active site display.

adisp

The OE2DActiveSiteDisplay object of which residues being highlighted.

pen

The OEPen object that specifies the style of the highlighting.

residue

The residue being highlighted.

Example: (See image generated in Example of highlighting residues)

The OEGetLightColors function in the below example returns eight colors that is used to highlight only the first eight residues in the generated image.

private static void OEAddHighlighting_OEResidue(OE2DActiveSiteDisplay adisp)
{
    OEColorIter citer = OEChem.OEGetLightColors();
    foreach (OEResidue residue in adisp.GetDisplayedResidues())
    {
        if (citer.IsValid())
        {
            OEColor color = citer.Target();
            OEPen pen = new OEPen(color, color, OEFill.On, 1.0);
            OEGrapheme.OEAddResidueHighlighting(adisp, pen, residue);
        }
    }
}
../../_images/OEAddHighlighting-ActiveSite-OEResidue.png

Example of highlighting residues