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 = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, "C[N+](=C)(C)C1CCCCl1")
oedepict.OEPrepareDepiction(mol)
width, height = 200, 200
opts = oedepict.OE2DMolDisplayOptions(width, height, oedepict.OEScale_AutoScale)
disp = oedepict.OE2DMolDisplay(mol, opts)
oedepict.OEAnnotateValenceProblems(disp)
oedepict.OERenderMolecule("OEAnnotateValenceProblems.png", disp)
Note
The OEAnnotateValenceProblems
function uses
the MDL Valence Model.