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

.. oe:namespace:: OEDocking

.. meta::
   :keywords: OEShapeFit, ShapeFit


.. _OEDocking_OEShapeFit:

.. oe:class:: OEShapeFit

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEShapeFit

   .. note::

      With the default settings, the :ref:`OEShapeFit <OEDocking_OEShapeFit>` flexibly optimizes
      shape overlap and force field.

   
   The :ref:`OEShapeFit <OEDocking_OEShapeFit>` class provides an interface for pose generation using 
   flexible overlay optimization between a reference bound ligand or a bound ligand present in a 
   reference design unit and a fit molecule conformers.

   The :ref:`OEShapeFit <OEDocking_OEShapeFit>` class defines the following public methods:
    * :oe:meth:`SetupRef<OEDocking::OEShapeFit::SetupRef>`
    * :oe:meth:`Fit<OEDocking::OEShapeFit::Fit>`

   .. oe:method:: Constructor

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

         .. oe:api::

            OEShapeFit(const OEShapeFitOptions& options = OEShapeFitOptions())
            OEShapeFit(const OEShapeFit&)

      .. oe:language:: python

         .. oe:api:: python

            OEShapeFit(options: OEShapeFitOptions = OEShapeFitOptions()) -> OEShapeFit
            OEShapeFit(arg2: OEShapeFit) -> OEShapeFit

      Constructors. The parameterized constructor accepts an
      :ref:`OEShapeFitOptions <OEDocking_OEShapeFitOptions>` object; if omitted
      the defaults are used.

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

      .. oe:api::

         OEShapeFit &operator=(const OEShapeFit&)

.. _OEDocking_OEShapeFit_SetupRef:

      Assignment operator.


   .. oe:method:: SetupRef

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

         .. oe:api::

            bool SetupRef(const OEBio::OEDesignUnit&)
            bool SetupRef(const OEChem::OEMolBase&)

      .. oe:language:: python

         .. oe:api:: python

            SetupRef(du: OEDesignUnit) -> bool
            SetupRef(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      This method defines the interface for setting up the reference for the 
      :ref:`OEShapeFit <OEDocking_OEShapeFit>` ShapeFit optimization process.  

   .. oe:method:: Fit

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

         .. oe:api::

            OESystem::OEIterBase<OEShapeFitResults>* Fit(OEChem::OEMCMolBase& fitmol,
                                                         const unsigned numPoses = 1)

      .. oe:language:: python

         .. oe:api:: python

            Fit(fitmol: OEMol, numPoses: int = 1) -> Iterable[OEShapeFitResults]

      This method optimizes the shape and chemical similarity between the fit molecule 
      and a bound ligand in the design unit, along with intra-molecular forcefield energies 
      of the fit molecule, simultaneously. The reference design unit must be set using 
      :oe:meth:`SetupRef<OEDocking::OEShapeFit::SetupRef>` method.
