bool OEAddDepictionHydrogens(OEMolBase &mol)
This function adds explicit "depiction" hydrogens to the specified OEMolBase. Depiction hydrogens are hydrogens that need to be explicitly drawn in a 2D depiction to faithfully represent tetrahedral stereochemistry. A depiction hydrogen is currently defined as the single hydrogen on a three co-ordinated heavy atom that has tetrahedral chirality specified, and all three heavy bonds are ring bonds. For example, the hydrogens on the fusion atoms of decalin are depiction hydrogens.
The OEAddDepictionHydrogens
function identifies all implicit
depiction hydrogens (using the OEHasDepictionHydrogens
function),
and converts them into explicit hydrogens using the
OEAddExplicitHydrogens
function. This function returns
true if any depiction hydrogens were converted into explicit atoms.
bool OEAddDepictionHydrogens(OEMolBase &mol) { bool result = false; OEIter<OEAtomBase> atom; for (atom=mol.GetAtoms(); atom; ++atom) { OEAtomBase *aptr = atom; if (OEHasDepictionHydrogens(aptr) && OEAddExplicitHydrogens(mol,aptr)) result = true; } return result; }