.. oe:namespace:: OEBio

.. oe:function:: OEGetResidueAtom

   These two functions return an atom pointer to a specific atom in a residue.
   The specific atom is specified by the :oe:constns:`OEChem::OEPDBAtomName` namespace.
   The residue in question can either be supplied by passing an :ref:`OEResidue <OEChem_OEResidue>` object
   indicating the residue and the molecule of interest, or by passing any atom in the residue.
   In both functions, the assume argument is a bitmask that indicates whether the algorithm
   can assume that the molecule has perceived residues, has PDB ordered atoms, or as
   bonded residues.

   .. oe:language:: c++ java csharp

      .. oe:api::

         const OEChem::OEAtomBase * OEGetResidueAtom(const OEChem::OEAtomBase* atom,
                                                     const unsigned pdbAtomIdx,
                                                     unsigned assume = OEAssumption::Default)
         OEChem::OEAtomBase * OEGetResidueAtom(OEChem::OEAtomBase* atom,
                                               const unsigned pdbAtomIdx,
                                               unsigned assume = OEAssumption::Default)

   .. oe:language:: python

      .. oe:api:: python

         OEGetResidueAtom(atom: OEAtomBase, pdbAtomIdx: int, assume: int) -> OEAtomBase

   In this function, the residue of interest is identified by passing
   any atom from that residue into the function, e.g. passing in the
   :oe:const:`NZ<OEChem::OEPDBAtomName::NZ>` atom and requesting the
   :oe:const:`CA<OEChem::OEPDBAtomName::CA>` atom in the same residue.

   .. oe:language:: c++ java csharp

      .. oe:api::

         const OEChem::OEAtomBase * OEGetResidueAtom(const OEChem::OEMolBase& mol,
                                                     const OEChem::OEResidue& residue,
                                                     const unsigned pdbAtomIdx,
                                                     unsigned assume = OEAssumption::Default)
         OEChem::OEAtomBase * OEGetResidueAtom(OEChem::OEMolBase& mol,
                                               const OEChem::OEResidue& residue,
                                               const unsigned pdbAtomIdx,
                                               unsigned assume = OEAssumption::Default)

   .. oe:language:: python

      .. oe:api:: python

         OEGetResidueAtom(mol: Union[OEGraphMol,OEMol,OEQMol],
                          residue: OEResidue, pdbAtomIdx: int, assume: int) -> OEAtomBase

   In this function, the residue is indicated by a combination of the
   molecule of interest as well as any one of the :ref:`OEResidue <OEChem_OEResidue>`
   objects from the residue.

   .. seealso::

      * :oe:func:`OEBio::OEGetResidueAtoms` function
      * :oe:constns:`OEBio::OEAssumption` namespace
      * :ref:`OEHierView <OEBio_OEHierView>` for an additional method for accessing the
        atom of a residue in a protein
