OEAnnotateValenceProblems¶
bool OEAnnotateValenceProblems(OE2DMolDisplay &disp)
Annotates potential valence problems on the molecule.
- disp
The OE2DMolDisplay object being annotated.
The following code snippet show how to use the
OEAnnotateValenceProblems
function.
See the generated image in Figure: Example of molecule with incorrect
valences.
OEGraphMol mol;
OESmilesToMol(mol, "C[N+](=C)(C)C1CCCCl1");
OEPrepareDepiction(mol);
const auto width = 200u;
const auto height = 200u;
OE2DMolDisplayOptions opts(width, height, OEScale::AutoScale);
OE2DMolDisplay disp(mol, opts);
OEAnnotateValenceProblems(disp);
OERenderMolecule("OEAnnotateValenceProblems.png", disp);
Note
The OEAnnotateValenceProblems
function uses
the MDL Valence Model.