OERenderContactMap¶
bool OERenderContactMap(OEDepict::OEImageBase& image,
const OE2DActiveSiteDisplay& adisp);
Renders the protein-ligand contact map with residue toggle buttons. Clicking on any residue will highlight those ligand atoms that interact with the residue.
Note
This functionality is only available for .svg
image format. In all other image formats it only depicts
the residue circles.
The generated svg
image should be included into and
HTML page with the SVG MIME type.
<object data="<imagename>.svg" type="image/svg+xml"></object>
- image
The image on which the contact map is rendered.
- adisp
The OE2DActiveSiteDisplay object that holds the data necessary to depict the interactions of an active site.
The following code snippet shows how to use the OERenderContactMap
function. The image created is shown in
Figure: Example of using the OERenderContactMap function.
Example:
asite = oechem.OEInteractionHintContainer(protein, ligand)
oechem.OEPerceiveInteractionHints(asite)
oegrapheme.OEPrepareActiveSiteDepiction(asite)
image = oedepict.OEImage(800.0, 600.0)
opts = oegrapheme.OE2DActiveSiteDisplayOptions(image.GetWidth(), image.GetHeight())
adisp = oegrapheme.OE2DActiveSiteDisplay(asite, opts)
oegrapheme.OERenderContactMap(image, adisp)
oedepict.OEWriteImage("RenderContactMap.svg", image)
click on any residue circles
Example of using the OERenderContactMap function
See also
OERenderActiveSite
functionOERenderActiveSiteMaps
functionOERenderBFactorMap
functionOERenderUnpairedInteractionMap
function
Code Example
Visualizing Protein-Ligand Contacts OpenEye Python Cookbook recipe