OERenderActiveSite

The overloaded versions of the OERenderActiveSite function

Link

Description

OERenderActiveSite(image, adisp)

renders an active site into an image

OERenderActiveSite(filename, adisp)

writes an active site display into a file

OERenderActiveSite(stream, ext, adisp)

writes an active site display into an output stream

Code Example

Example of using the OERenderActiveSite function

../../_images/OERenderActiveSite-image-adisp.svg

bool OERenderActiveSite(OEDepict::OEImageBase &image,
                        const OE2DActiveSiteDisplay &adisp)

Renders the active site display into an image.

image

The image in which the active site is drawn.

adisp

The OE2DActiveSiteDisplay object that holds the data necessary to depict the interactions of an active site.

Example:

// initializing asite OEInteractionHintContainer(receptor, ligand) object

OEImage image = new OEImage(800.0, 600.0);
OE2DActiveSiteDisplayOptions opts = new OE2DActiveSiteDisplayOptions(image.GetWidth(), image.GetHeight());
opts.SetRenderInteractiveLegend(true);
OE2DActiveSiteDisplay adisp = new OE2DActiveSiteDisplay(asite, opts);

oegrapheme.OERenderActiveSite(image, adisp);
oedepict.OEWriteImage("OERenderActiveSite-image-adisp.png", image);
bool OERenderActiveSite(const std::string &filename,
                        const OE2DActiveSiteDisplay &adisp)

Writes the active site display into a file.

filename

The name of the file into which the active site display is being written. The extension of the filename determine the type of the image.

adisp

The OE2DActiveSiteDisplay object that holds the data necessary to depict the interactions of an active site.

Example:

// initializing asite OEInteractionHintContainer(receptor, ligand) object

OE2DActiveSiteDisplayOptions opts = new OE2DActiveSiteDisplayOptions(800.0, 600.0);
opts.SetRenderInteractiveLegend(true);
OE2DActiveSiteDisplay adisp = new OE2DActiveSiteDisplay(asite, opts);

oegrapheme.OERenderActiveSite("OERenderActiveSite-fname-adisp.png", adisp);
bool OERenderActiveSite(OEPlatform::oeostream &os,
                        const std::string &extension,
                        const OE2DActiveSiteDisplay &adisp)

Writes the active site display into a stream.

os

The stream into which the active site is being written.

ext

The extension which determine the type of the image.

adisp

The OE2DActiveSiteDisplay object that holds the data necessary to depict the interactions of an active site.

Example:

// initializing asite OEInteractionHintContainer(receptor, ligand) object

OE2DActiveSiteDisplayOptions opts = new OE2DActiveSiteDisplayOptions(800.0, 600.0);
opts.SetRenderInteractiveLegend(true);
OE2DActiveSiteDisplay adisp = new  OE2DActiveSiteDisplay(asite, opts);

oeofstream ofs = new oeofstream("OERenderActiveSite-stream-adisp.png");
oegrapheme.OERenderActiveSite(ofs, "png", adisp);
ofs.close();