.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

.. oe:function:: OEPerceivePeptideBackbone

   .. attention::

      |PRELIMINARY-API|

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

      .. oe:api::

         bool OEPerceivePeptideBackbone(OEMolBase &)

   .. oe:language:: python

      .. oe:api:: python

         OEPerceivePeptideBackbone(arg1: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   The :oe:func:`OEChem::OEPerceivePeptideBackbone` function identifies the peptide backbone of a
   molecule based on monomers that have already been perceived.
   It returns `true` if the backbone is successfully perceived and `false` if no monomer information
   is available.
   The function sets the following atom name constants
   :oe:const:`OEChem::OEPDBAtomName::C`, :oe:const:`OEChem::OEPDBAtomName::O`,
   :oe:const:`OEChem::OEPDBAtomName::OXT`, :oe:const:`OEChem::OEPDBAtomName::CA`, and
   :oe:const:`OEChem::OEPDBAtomName::N` for atoms belonging to alpha amino acids.
   Furthermore, :oe:const:`OEChem::OEPDBAtomName::CB`, :oe:const:`OEChem::OEPDBAtomName::CG`, and
   :oe:const:`OEChem::OEPDBAtomName::CD` are used to mark additional carbon atoms that are part of
   the backbone in beta, gamma, or delta peptide monomers.

   mol
    The input molecule (:oe:cls:`OEChem::OEMolBase`).

   .. warning::

      The :oe:func:`OEChem::OEPerceivePeptideBackbone` function does not perform a full residue perception 
      like :oe:func:`OEChem::OEPerceiveResidues` does. Instead, it removes any residue information 
      (:oe:cls:`OEChem::OEResidue`) already present and marks only the backbone atoms based on monomer perception. 

   .. seealso::

      * :oe:func:`OEChem::OEGetPDBAtomIndex` function to access PDB ideas assigned to the atoms

      Monomer information is required for the perception of the peptide backbone. The following functions will
      help in obtaining this information:

      * :oe:func:`OEChem::OEHelmToMol`  function to convert a HELM string to a molecule
      * :oe:func:`OEChem::OEDetectMonomers` function to detect monomers in a molecule
