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.

void OEAddHighlighting_OEResidue(OE2DActiveSiteDisplay& adisp)
{
  OEIter<OEColor> ci = OEGetLightColors();
  for (OEIter<OEResidue> ri = adisp.GetDisplayedResidues(); (bool) ci && (bool)ri; ++ci, ++ri)
  {
     OEPen pen(*ci, *ci, OEFill::On, 1.0);
     OEAddResidueHighlighting(adisp, pen, *ri);
  }
}
../../_images/OEAddHighlighting-ActiveSite-OEResidue.png

Example of highlighting residues