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 attached
to a non-hydrogen atom that has tetrahedral chirality specified and either
has only two non-hydrogen neighbors, or has three non-hydrogen neighbors
that are connected via cyclic ``ring'' bonds. See the implementation of
OEHasDepictionHydrogens below.
For example, the fusion atoms of decalin have depiction hydrogens.
bool OEHasDepictionHydrogens(const OEAtomBase *atm)
{
if (atm->GetAtomicNum() == 1)
return false;
if (atm->GetTotalHCount() != 1)
return false;
unsigned int degree = atm->GetHvyDegree();
if (atm->HasStereoSpecified())
{
if (degree == 2)
return true;
if (degree == 3 && RingBondCount(atm) == 3)
return true;
}
if (degree == 1)
{
OEBondBase *bptr = OEGetSoleDoubleBond(atm);
if (bptr && bptr->HasStereoSpecified(OEBondStereo::CisTrans))
return true;
}
return false;
}