OEDrawMonomer

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

bool OEDrawMonomer(OEDepict::OEImageBase& image,
                   const OEChem::OEMonomer& monomer)

Draws a monomer highlighting its attachment points.

image

The image on which the monomer is drawn (OEImage).

monomer

The monomer being draw (OEMonomer).

Example:

OEMonomerData cystineData("[H:1]N[C@H](CS[H:3])C(=O)[OH:2]");
cystineData.SetName("D-Cysteine");
cystineData.AddCode("Custom", "dC");
OEMonomer cystine(cystineData);
OEImage image(600.0, 600.0);
OEDrawMonomer(image, cystine);
OEDrawCurvedBorder(image, OELightGreyPen, 10.0);
OEWriteImage("DrawMonomer.svg", image);
../../_images/DrawMonomer.svg

Example of using OEDrawMonomer function

Code Example