void OERenderColorOverlap(OEDepict::OEImageBase &image, const OEShapeOverlapDisplay &odisp)
Renders the color overlap between a reference and a fit molecule.
The image on which the fit molecule is rendered along with circles representing the satisfied and missed color atoms of the reference molecule.
OEShapeOverlapDisplayobject 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
function. The image created is shown in
Table: Example of using the OERenderColorOverlap function.
OEColorForceField cff = new OEColorForceField(); cff.Init(OEColorFFType.ImplicitMillsDean); OEShapeQueryDisplay qdisp = new OEShapeQueryDisplay(refmol, cff); OEColorOverlapDisplayOptions opts = new OEColorOverlapDisplayOptions(); opts.SetTitleLocation(OETitleLocation.Hidden); OEPen arcpen = new OEPen(oechem.getOEGrey(), oechem.getOEGrey(), OEFill.Off, 2.0, OEStipple.ShortDash); opts.SetQuerySurfaceArcFxn(new OEDefaultArcFxn(arcpen)); OEShapeOverlapDisplay odisp = new OEShapeOverlapDisplay(qdisp, fitmol, opts); OEImage image = new OEImage(420.0, 280.0); oegrapheme.OERenderColorOverlap(image, odisp);
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.
(A) reference molecule (shape query)
(B) fit molecule
shape query depicted by the OERenderShapeQuery function
color atom overlap depicted by the OERenderColorOverlap function
When calling the
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.