OEAnnotateDepictionProblems

bool OEAnnotateDepictionProblems(OE2DMolDisplay &disp)

Annotates various depiction problems on the molecule. Currently it can mark double bonds which are not depicted correctly according to their cis/trans stereo specifications.

disp

The OE2DMolDisplay object being annotated.

The following code snippet show how to use the OEAnnotateDepictionProblems function. See the generated image in Figure: Example of incorrect trans double bond depiction. The highlighting indicates that the double bond specified in the input SMILES string as trans is depicted as cis.

OEGraphMol mol = new OEGraphMol();
OEChem.OESmilesToMol(mol, "C1CCC2C/C=C/CCCC2C1");
OEDepict.OEPrepareDepiction(mol);

int width  = 200;
int height = 200;
double scale  = OEScale.AutoScale;
OE2DMolDisplayOptions opts = new OE2DMolDisplayOptions(width, height, scale);

OE2DMolDisplay disp = new OE2DMolDisplay(mol, opts);
OEDepict.OEAnnotateDepictionProblems(disp);

OEDepict.OERenderMolecule("OEAnnotateDepictionProblems.png", disp);
../../_images/OEAnnotateDepictionProblems.png

Example of incorrect trans double bond depiction

Note

OEDepict TK uses built-in ring system templates when generating 2D coordinates. Generating 2D coordinates which are inconsistent with cis/trans stereo bond specification can occur due to a missing ring template. The OEPrepareDepiction function throws a warning when this problem occurs.