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.

mol = OEGraphMol()
OESmilesToMol(mol, "C[N+](=C)(C)C1CCCCl1")
OEPrepareDepiction(mol)

width, height = 200, 200
opts = OE2DMolDisplayOptions(width, height, OEScale_AutoScale)
disp = OE2DMolDisplay(mol, opts)
OEAnnotateValenceProblems(disp)

OERenderMolecule("OEAnnotateValenceProblems.png", disp)
../../_images/OEAnnotateValenceProblems.png

Example of molecule with incorrect valences

Note

The OEAnnotateValenceProblems function uses the MDL Valence Model.