.. oe:namespace:: OEBio

.. meta::
   :keywords: OERotamer, Rotamer


.. _OEBio_OERotamer:

.. oe:class:: OERotamer

   .. oe:api::

      struct OERotamer

   This class represents an :ref:`OERotamer <OEBio_OERotamer>`, an abstraction of
   a frequently observed conformation of an amino-acid side-chain.
   Statistical surveys of side-chain conformations
   for well-curated sets of protein structures reveal that almost all
   can be assigned to a limited number of clusters.
   The mean, or more usefully the *mode*, of each cluster's dihedral
   angles can be used to represent the cluster as a whole.
   Collections of these dihedral angles, along with the observed
   probability of the associated cluster is known as a rotamer library.

   .. seealso::

      * :oe:func:`OEBio::OESetRotamer` function that takes an :ref:`OERotamer <OEBio_OERotamer>` as an argument
        and modifies the 3-dimensional structure of a particular amino-acid
        side-chain so that the dihedral angles are that of the rotamer.
      * :oe:func:`OEBio::OEGetRotamers` function that returns an :ref:`OERotamer <OEBio_OERotamer>` iterator
        over each rotamer for a given amino-acid in a specific rotamer library.
      * :oe:constns:`OEBio::OERotamerLibrary` namespace
      * :oe:func:`OEChem::OEGetTorsion` function


   .. note::

      If a specific side-chain dihedral angle does not exist in the given residue,
      the above GetChiN e.g. :oe:meth:`OEBio::OERotamer::GetChi1` methods return ``-100.0``.

   .. oe:method:: GetChi1

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

         .. oe:api::

            float GetChi1() const

      .. oe:language:: python

         .. oe:api:: python

            GetChi1() -> float

      Return the value of the side-chain :math:`\chi_1` dihedral angle,
      ``N-CA-CB-xG(1)``.

   .. oe:method:: GetChi2

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

         .. oe:api::

            float GetChi2() const

      .. oe:language:: python

         .. oe:api:: python

            GetChi2() -> float

      Return the value of the side-chain :math:`\chi_2` dihedral angle,
      ``CA-CB-xG(1)-xD(1)``.

   .. oe:method:: GetChi3

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

         .. oe:api::

            float GetChi3() const

      .. oe:language:: python

         .. oe:api:: python

            GetChi3() -> float

      Return the value of the side-chain :math:`\chi_3` dihedral angle,
      ``CB-xG-xD-xE(1)``.

   .. oe:method:: GetChi4

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

         .. oe:api::

            float GetChi4() const

      .. oe:language:: python

         .. oe:api:: python

            GetChi4() -> float

      Return the value of the side-chain :math:`\chi_4` dihedral angle,
      ``xG-xD-xE-xZ``.

   .. oe:method:: GetProbability

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

         .. oe:api::

            float GetProbability() const

      .. oe:language:: python

         .. oe:api:: python

            GetProbability() -> float

      Return the probability assigned to this rotamer by
      the rotamer library used to set the rotamer parameters
      (see :oe:constns:`OEBio::OERotamerLibrary`).

   .. oe:method:: GetResidueIndex

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

         .. oe:api::

            unsigned int GetResidueIndex() const

      .. oe:language:: python

         .. oe:api:: python

            GetResidueIndex() -> int

      Return the :oe:constns:`OEChem::OEResidueIndex` value indicating
      the type of amino-acid residue used to set the rotamer parameters.
