.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OERotate

.. oe:function:: OERotate

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

      .. oe:api::

         void OERotate(OEMolBase& mol, const float* m)
         void OERotate(OEMolBase& mol, const double* m)
         void OERotate(OEConfBase& conf, const float* m)
         void OERotate(OEConfBase& conf, const double* m)
         void OERotate(OEMCMolBase& mcmol, const float* m)
         void OERotate(OEMCMolBase& mcmol, const double* m)

   .. oe:language:: python

      .. oe:api:: python

         OERotate(mol: Union[OEGraphMol,OEQMol], m: OEFloatArray) -> None
         OERotate(mol: Union[OEGraphMol,OEQMol], m: OEDoubleArray) -> None
         OERotate(conf: OEConfBase, m: OEFloatArray) -> None
         OERotate(conf: OEConfBase, m: OEDoubleArray) -> None
         OERotate(mcmol: OEMol, m: OEFloatArray) -> None
         OERotate(mcmol: OEMol, m: OEDoubleArray) -> None

   These functions rotate a molecule by the :math:`3 \times 3`
   rotation matrix passed as the ``m`` argument that is 9-element
   array in row-major order. 
   The rotation is defined as :math:`xyz' = m \times xyz`, where
   :math:`m` is the rotation matrix, :math:`xyz` is the original
   vector, and :math:`xyz'` is the new  vector.
   The overloads for :ref:`OEConfBase <OEChem_OEConfBase>` and
   :ref:`OEMCMolBase <OEChem_OEMCMolBase>` are for efficiency.

   *mol*
      The molecule to rotate.

   *conf*
      The conformer to rotate.

   *mcmol*
      The multi-conformer molecule to rotate.

   *m*
      The rotation matrix.

.. seealso::

  .. oe:language:: c++

      * Example program :ref:`mcs3dalign.cpp<section_example_oechem_mcs3dalign>`

  .. oe:language:: python

      * Example program :ref:`mcs3dalign.py<section_example_oechem_mcs3dalign>`

  .. oe:language:: java

      * Example program :ref:`MCS3DAlign.java<section_example_oechem_mcs3dalign>`

  .. oe:language:: csharp

      * Example program :ref:`MCS3DAlign.cs<section_example_oechem_mcs3dalign>`

