OERenderColorOverlap

void OERenderColorOverlap(OEDepict::OEImageBase &image,
                          const OEShapeOverlapDisplay &odisp)

Renders the color overlap between a reference and a fit molecule.

image

The image on which the fit molecule is rendered along with circles representing the satisfied and missed color atoms of the reference molecule.

odisp

The OEShapeOverlapDisplay object that holds the data necessary to depict the color overlap between the reference and the fit molecules.

The following code snippet shows how to use the OERenderColorOverlap function. The image created is shown in Table: Example of using the OERenderColorOverlap function.

OEShape::OEColorForceField cff;
cff.Init(OEShape::OEColorFFType::ImplicitMillsDean);
OEShapeQueryDisplay qdisp(query, cff); 

OEColorOverlapDisplayOptions opts;
opts.SetTitleLocation(OETitleLocation::Hidden);
OEPen arcpen(OEGrey, OEGrey, OEFill::Off, 2.0, OEStipple::ShortDash);
opts.SetQuerySurfaceArcFxn(OEDefaultArcFxn(arcpen));
OEShapeOverlapDisplay odisp(qdisp, target, opts);

OEImage image(420.0, 280.0);
OERenderColorOverlap(image, odisp);

Note

The color atom matches between the reference and the fit molecule are represented by circles (or half circles if two color atoms occupy the same space in 3D). Each circle corresponds to a color atom in the reference molecule. The color of the circle indicates the fitness of the color atom match in 3D. The lighter the color, the smaller the overlap between the reference and fit color atoms in 3D. Unfilled circles represent unmatched reference color atoms. If there is a good color atom match exist for a reference color atom in 3D, then the circle representing the color atom is positioned to the matching fit color atom in 2D.

Example of using the OERenderColorOverlap function

(A) reference molecule (shape query)

(B) fit molecule

../../_images/RenderShapeQuery.png ../../_images/RenderColorOverlap.png

shape query depicted by the OERenderShapeQuery function

color atom overlap depicted by the OERenderColorOverlap function

Warning

When calling the OERenderColorOverlap function no overlay is performed to maximize the color overlap between the reference and the fit molecule, i.e., the function simply calculates the color overlap using the given 3D coordinates.

Code Example