3.2.7 GetNbr

virtual OEAtomBase *GetNbr(const OEAtomBase *src) const

Return the atom across the bond from the specified atom. If the ``src'' argument represents the begin atom of the bond, i.e. OEBondBase::GetBgn, this method returns the end atom, i.e. OEBondBase::GetEnd, and if the ``src'' argument is the end atom, this function returns the begin atom. If passed an atom other than the begin or end atoms, this function returns a NULL pointer, (OEAtomBase*)0. This function is often used for traversing the atoms of a molecule.