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.

cff = oeshape.OEColorForceField()
cff.Init(oeshape.OEColorFFType_ImplicitMillsDean)
qdisp = oegrapheme.OEShapeQueryDisplay(refmol, cff)

opts = oegrapheme.OEColorOverlapDisplayOptions()
opts.SetTitleLocation(oedepict.OETitleLocation_Hidden)
arcpen = oedepict.OEPen(oechem.OEGrey, oechem.OEGrey, oedepict.OEFill_Off,
                        2.0, oedepict.OEStipple_ShortDash)
opts.SetQuerySurfaceArcFxn(oegrapheme.OEDefaultArcFxn(arcpen))
odisp = oegrapheme.OEShapeOverlapDisplay(qdisp, fitmol, opts)

image = oedepict.OEImage(420.0, 280.0)
oegrapheme.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