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

.. oe:namespace:: OEBio

.. oe:function:: OETransformDesignUnit

   .. attention::

      |TWOLANGUAGE|

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

      .. oe:api::

         void OETransformDesignUnit(OEDesignUnit& du, const double* rmat,
                                    const double* trns)
         void OETransformDesignUnit(OEDesignUnit& du,
                                    const OEChem::OETrans& trans)

   .. oe:language:: python

      .. oe:api:: python

         OETransformDesignUnit(du: OEDesignUnit, rmat: OEDoubleArray,
                               trns: OEDoubleArray) -> None
         OETransformDesignUnit(du: OEDesignUnit, trans: OETrans) -> None

   Transforms the OEDesignUnit with the provided transforms. The OEDesignUnit object stores the transforms
   applied to it, which can be helpul if the original coordiante frame is required later in a workflow.

    .. warning::

       Applying a transform to a design unit invalidates the :ref:`OEReceptor <OEBio_OEReceptor>` object stored on the design unit
       and it will be removed as part of the transformation.

   .. seealso::

      * :ref:`OETrans <OEChem_OETrans>` class
      * :ref:`OEReceptor <OEBio_OEReceptor>` class
      * :oe:meth:`OEBio::OEDesignUnit::GetTransform` method
