OEDrawResidues

bool OEDrawResidues(OEDepict::OEImageBase& image, const OEChem::OEMolBase& mol,
                    const bool interactive = false)

Draws a molecule after performing substitutions in which standard amino acids components identified in the molecule are replaced by corresponding circular glyphs.

image

The image on which the molecule is drawn.

mol

The molecule being draw.

interactive

The parameter that determines whether the generated image will be interactive (only available for SVG images) revealing the residue on mouse hover.

Note

The OEDrawResidues does not support visualizing large proteins. The number of heavy atoms is limited to 250.

Example:

The following code snippet shows how to use the OEDrawResidues function to generate an interactive SVG image. The image created is shown in Figure: Example of using the OEDrawResidues function. If the molecule has no residue information, if the OEHasResidues function returns false, then a warning will be throw and no image will be generated.

The OEDrawResidues function allows the visualization of nonstandard amino acids. Nonstandard amino acid residues are represented with a black jagged circle with the residue labels shown at the center.

hover mouse over any residue circles

Example of using the OEDrawResidues function to generate an interactive SVG image

../../_images/DrawResidues.svg

Note

This interactive functionality is only available for .svg image format.

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>

See also