4.3 OEHasDepictionHydrogens

bool OEHasDepictionHydrogens(const OEAtomBase *atm)

This function determines whether the specified heavy atom has a "depiction" hydrogen. 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 either there are only two heavy bonds or all three heavy bonds are ring bonds. For example, the fusion atoms of decalin have depiction hydrogens.

bool OEHasDepictionHydrogens(const OEAtomBase *atm)
{
  if (atm->GetAtomicNum() == 1)
    return false;
  if (! atm->HasStereoSpecified())
    return false;
  if (atm->GetTotalHCount() != 1)
    return false;
  if (atm->GetHvyDegree() == 3
      && RingBondCount(atm) == 3)
    return true;
  if (atm->GetHvyDegree() == 2)
    return true;
  return false;
}