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

.. oe:namespace:: OEConfGen

.. meta::
   :keywords: OETorDriver, TorDriver


.. _OEConfGen_OETorDriver:

.. oe:class:: OETorDriver

   .. oe:api::

      class OETorDriver

   This class defines an interface for generating conformer ensembles
   of molecules by torsion driving on the provided 3D structures of the
   molecules.

   .. seealso::

      * :ref:`OETorDriveOptions <OEConfGen_OETorDriveOptions>` class
      * :ref:`OESliceEnsembleOptions <OEConfGen_OESliceEnsembleOptions>` class
      * :ref:`OEConfFixOptions <OEConfGen_OEConfFixOptions>` class

   .. admonition:: Code Examples

      * :ref:`section_examples_torsion_drive` example

   The :ref:`OETorDriver <OEConfGen_OETorDriver>` class defines the following public methods:
    * :oe:meth:`GenerateConfs<OEConfGen::OETorDriver::GenerateConfs>`
    * :oe:meth:`GetForceField<OEConfGen::OETorDriver::GetForceField>` and
      :oe:meth:`SetForceField<OEConfGen::OETorDriver::SetForceField>`
    * :oe:meth:`GetSliceEnsembleOptions<OEConfGen::OETorDriver::GetSliceEnsembleOptions>` and
      :oe:meth:`SetSliceEnsembleOptions<OEConfGen::OETorDriver::SetSliceEnsembleOptions>`
    * :oe:meth:`GetTorDriveOptions<OEConfGen::OETorDriver::GetTorDriveOptions>` and
      :oe:meth:`SetTorDriveOptions<OEConfGen::OETorDriver::SetTorDriveOptions>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OETorDriver(const OETorDriveOptions& argTorOpts = OETorDriveOptions(),
                        const OESliceEnsembleOptions& argSlicerOpts = OESliceEnsembleOptions())
            OETorDriver(const OETorDriver&)

      .. oe:language:: python

         .. oe:api:: python

            OETorDriver(argTorOpts: OETorDriveOptions = OETorDriveOptions(),
                        argSlicerOpts: OESliceEnsembleOptions = OESliceEnsembleOptions()) -> OETorDriver
            OETorDriver(rhs: OETorDriver) -> OETorDriver

      Default and copy constructors.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OETorDriver &operator=(const OETorDriver&)

      Assignment operator.

   .. oe:method:: GenerateConfs

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

         .. oe:api::

            unsigned GenerateConfs(OEChem::OEMCMolBase&,
                                   const OEConfFixOptions& = OEConfFixOptions()) const

      .. oe:language:: python

         .. oe:api:: python

            GenerateConfs(argMol: OEMol,
                          argOpts: OEConfFixOptions = OEConfFixOptions()) -> int

      Generates a conformer ensemble for a molecule. Returns
      :oe:const:`OEConfGen::OEOmegaReturnCode::Success` if 
      the process succeeds, otherwise returns an error code from the
      :oe:constns:`OEConfGen::OEOmegaReturnCode` namespace. The second 
      argument provided with appropriate options can be
      used to fix part of a molecule structure to predefined coordinates.

      .. seealso::

         * :ref:`OEConfFixOptions <OEConfGen_OEConfFixOptions>` class

   .. oe:method:: GetForceField

      .. oe:api::

         const OEMolPotential::OEForceField& GetForceField() const

      See the :oe:meth:`SetForceField<OEConfGen::OETorDriver::SetForceField>` method.

   .. oe:method:: GetSliceEnsembleOptions

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

         .. oe:api::

            const OESliceEnsembleOptions& GetSliceEnsembleOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetSliceEnsembleOptions() -> OESliceEnsembleOptions

      See the :oe:meth:`SetSliceEnsembleOptions<OEConfGen::OETorDriver::SetSliceEnsembleOptions>` method.

   .. oe:method:: GetTorDriveOptions

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

         .. oe:api::

            const OETorDriveOptions& GetTorDriveOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetTorDriveOptions() -> OETorDriveOptions

      See the :oe:meth:`SetTorDriveOptions<OEConfGen::OETorDriver::SetTorDriveOptions>`.

   .. oe:method:: SetForceField

      .. oe:api::

         void SetForceField(OEMolPotential::OEForceField&)

      Sets the **force field** for torsion driving.
      Default: :ref:`OEMMFFSheffield <OEFF_OEMMFFSheffield>` with
      :oe:const:`OEFF::OEMMFFSheffieldFFType::MMFF94Smod_NOESTAT`

      .. seealso::

         * :ref:`OEForceField <OEMolPotential_OEForceField>` class
         * :ref:`OEMMFFSheffield <OEFF_OEMMFFSheffield>`

   .. oe:method:: SetSliceEnsembleOptions

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

         .. oe:api::

            void SetSliceEnsembleOptions(const OESliceEnsembleOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetSliceEnsembleOptions(argOpts: OESliceEnsembleOptions) -> None

      Sets :oe:cls:`options<OEConfGen::OESliceEnsembleOptions>` for slicing
      ensemble to remove duplicates.

      .. seealso::

         * :ref:`OESliceEnsembleOptions <OEConfGen_OESliceEnsembleOptions>` class

   .. oe:method:: SetTorDriveOptions

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

         .. oe:api::

            void SetTorDriveOptions(const OETorDriveOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetTorDriveOptions(argOpts: OETorDriveOptions) -> None

      Sets :oe:cls:`options<OEConfGen::OETorDriveOptions>` for torsion driving.

      .. seealso::

         * :ref:`OETorDriveOptions <OEConfGen_OETorDriveOptions>` class
