.. include:: ../substitutions

.. oe:namespace:: OEBio

.. meta::
   :keywords: OESetRotamer

.. oe:function:: OESetRotamer

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

      .. oe:api::

         bool OESetRotamer(OEHierResidue& residue, const OERotamer& rotamer)
         bool OESetRotamer(OEAtomBase& atom, const OERotamer& rotamer)

   .. oe:language:: python

      .. oe:api:: python

         OESetRotamer(residue: OEHierResidue, rotamer: OERotamer) -> bool
         OESetRotamer(atom: OEAtomBase, rotamer: OERotamer) -> bool

   Sets the :math:`\chi` angles for the atoms in the specified residue.
   The angles are defined in the :ref:`OERotamer <OEBio_OERotamer>` object
   while the residue is specified either by an :ref:`OEHierResidue <OEBio_OEHierResidue>` object
   or by one of the atoms of the residue (:ref:`OEAtomBase <OEChem_OEAtomBase>`).
   The molecule must have 3D coordinates assigned; side-chain atoms are
   moved in 3D space to match the requested rotamer conformation.

   .. seealso::

      * :ref:`OERotamer <OEBio_OERotamer>` class
      * :oe:func:`OEBio::OEGetRotamers` function

