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

.. oe:namespace:: OEShape

.. meta::
   :keywords: OEFlexiOverlapOptions, FlexiOverlapOptions


.. _OEShape_OEFlexiOverlapOptions:

.. oe:class:: OEFlexiOverlapOptions

   .. oe:api::

      class OEFlexiOverlapOptions : public OESystem::OEOptions

   This class provides an interface to setup options required for
   :ref:`OEFlexiOverlapFunc <OEShape_OEFlexiOverlapFunc>`.

   The :ref:`OEFlexiOverlapOptions <OEShape_OEFlexiOverlapOptions>` class defines the following public methods:
    * :oe:meth:`Validate<OEShape::OEFlexiOverlapOptions::Validate>`
    * :oe:meth:`GetShapeFuncType<OEShape::OEFlexiOverlapOptions::GetShapeFuncType>` and
      :oe:meth:`SetShapeFuncType<OEShape::OEFlexiOverlapOptions::SetShapeFuncType>`
    * :oe:meth:`GetColorFuncType<OEShape::OEFlexiOverlapOptions::GetColorFuncType>` and
      :oe:meth:`SetColorFuncType<OEShape::OEFlexiOverlapOptions::SetColorFuncType>`
    * :oe:meth:`GetForceField<OEShape::OEFlexiOverlapOptions::GetForceField>` and
      :oe:meth:`SetForceField<OEShape::OEFlexiOverlapOptions::SetForceField>`
    * :oe:meth:`GetHarmonic<OEShape::OEFlexiOverlapOptions::GetHarmonic>` and
      :oe:meth:`SetHarmonic<OEShape::OEFlexiOverlapOptions::SetHarmonic>`
    * :oe:meth:`GetShapeOptions<OEShape::OEFlexiOverlapOptions::GetShapeOptions>` and
      :oe:meth:`SetShapeOptions<OEShape::OEFlexiOverlapOptions::SetShapeOptions>`
    * :oe:meth:`GetColorOptions<OEShape::OEFlexiOverlapOptions::GetColorOptions>` and
      :oe:meth:`SetColorOptions<OEShape::OEFlexiOverlapOptions::SetColorOptions>`
    * :oe:meth:`GetOverlapFunc<OEShape::OEFlexiOverlapOptions::GetOverlapFunc>` and
      :oe:meth:`SetOverlapFunc<OEShape::OEFlexiOverlapOptions::SetOverlapFunc>`

   .. oe:method:: Constructor

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

         .. oe:api::

            OEFlexiOverlapOptions()
            OEFlexiOverlapOptions(const OEFlexiOverlapOptions&)

      .. oe:language:: python

         .. oe:api:: python

            OEFlexiOverlapOptions() -> OEFlexiOverlapOptions
            OEFlexiOverlapOptions(arg2: OEFlexiOverlapOptions) -> OEFlexiOverlapOptions

      Default and copy constructors.

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

      .. oe:api::

         OEFlexiOverlapOptions &operator=(const OEFlexiOverlapOptions&)

.. _OEShape_OEFlexiOverlapOptions_Validate:

      Assignment operator.



   .. oe:method:: Validate

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

         .. oe:api::

            bool Validate() const

      .. oe:language:: python

         .. oe:api:: python

            Validate() -> bool

      Returns **True** if the provided options corresponding to :ref:`OEFlexiOverlapOptions <OEShape_OEFlexiOverlapOptions>`
      are valid.

.. _OEShape_OEFlexiOverlapOptions_GetShapeFuncType:


   .. oe:method:: GetShapeFuncType

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

         .. oe:api::

            unsigned GetShapeFuncType() const

      .. oe:language:: python

         .. oe:api:: python

            GetShapeFuncType() -> int

      Gets the current type of :ref:`OEShapeFunc <OEShape_OEShapeFunc>` used for shape overlap calculations.
      See also :oe:meth:`SetShapeFuncType<OEShape::OEFlexiOverlapOptions::SetShapeFuncType>` method. 

.. _OEShape_OEFlexiOverlapOptions_GetColorFuncType:


   .. oe:method:: GetColorFuncType

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

         .. oe:api::

            unsigned GetColorFuncType() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorFuncType() -> int

      Gets the current type of  :ref:`OEColorFunc <OEShape_OEColorFunc>` used for color overlap calculations.
      See also :oe:meth:`SetColorFuncType<OEShape::OEFlexiOverlapOptions::SetColorFuncType>` method. 

.. _OEShape_OEFlexiOverlapOptions_GetForceField:


   .. oe:method:: GetForceField

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

         .. oe:api::

            const OEMolPotential::OEForceField* GetForceField() const

      .. oe:language:: python

         .. oe:api:: python

            GetForceField() -> OEForceField

      Gets the current type of ligand force field used.
      See also :oe:meth:`SetForceField<OEShape::OEFlexiOverlapOptions::SetForceField>` method. 

.. _OEShape_OEFlexiOverlapOptions_GetHarmonic:


   .. oe:method:: GetHarmonic

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

         .. oe:api::

            bool GetHarmonic() const

      .. oe:language:: python

         .. oe:api:: python

            GetHarmonic() -> bool

      Returns True if the harmonic constraints are added to the force field for the flexible overlap 
      optimizations.    

.. _OEShape_OEFlexiOverlapOptions_GetShapeOptions:


   .. oe:method:: GetShapeOptions

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

         .. oe:api::

            OEShapeOptions& GetShapeOptions()
            const OEShapeOptions& GetShapeOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetShapeOptions() -> OEShapeOptions

      Returns a reference to the :ref:`OEShapeOptions <OEShape_OEShapeOptions>` instance as currently set.
      These options are used in flexible overlap optimization of conformers.
      See also :oe:meth:`SetShapeOptions<OEShape::OEFlexiOverlapOptions::SetShapeOptions>` method.

.. _OEShape_OEFlexiOverlapOptions_GetColorOptions:


   .. oe:method:: GetColorOptions

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

         .. oe:api::

            OEColorOptions& GetColorOptions()
            const OEColorOptions& GetColorOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorOptions() -> OEColorOptions

      Returns a reference to the :ref:`OEColorOptions <OEShape_OEColorOptions>` instance as currently set.
      These options are used in flexible overlap optimization of conformers.
      See also :oe:meth:`SetColorOptions<OEShape::OEFlexiOverlapOptions::SetColorOptions>` method.

.. _OEShape_OEFlexiOverlapOptions_GetOverlapFuncs:


   .. oe:method:: GetOverlapFunc

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

         .. oe:api::

            const OEOverlapFuncBase& GetOverlapFunc() const

      .. oe:language:: python

         .. oe:api:: python

            GetOverlapFunc() -> OEOverlapFuncBase

      Returns a reference to the :ref:`OEOverlapFuncBase <OEShape_OEOverlapFuncBase>`
      instance as currently set. This defines the shape/color interactions to be optimized
      for overlay.

.. _OEShape_OEFlexiOverlapOptions_SetShapeFuncType:


   .. oe:method:: SetShapeFuncType

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

         .. oe:api::

            bool SetShapeFuncType(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetShapeFuncType(value: int) -> bool

      Sets the type of `OEShape::OEShapeFunc` to be used for shape overlap calculations. 
      The default is
      :oe:const:`OEShape::OEShapeType::Grid`. Alternatives are defined in the
      :oe:constns:`OEShape::OEShapeType` namespace.  

.. _OEShape_OEFlexiOverlapOptions_SetColorFuncType:


   .. oe:method:: SetColorFuncType

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

         .. oe:api::

            bool SetColorFuncType(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetColorFuncType(value: int) -> bool

      Sets the type of `OEShape::OEColorFunc` to be used for color overlap calculations. 
      The default is
      :oe:const:`OEShape::OEColorType::Exact`. Alternatives are defined in the
      :oe:constns:`OEShape::OEColorType` namespace.  

.. _OEShape_OEFlexiOverlapOptions_SetForceField:


   .. oe:method:: SetForceField

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

         .. oe:api::

            bool SetForceField(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetForceField(value: int) -> bool
            SetForceField(value: str) -> bool
            SetForceField(value: oeistream) -> bool
            SetForceField(value: OEForceField) -> bool

      Sets the type of ligand intra-molecular force field to be used for flxible optimizations. 
      The default is
      :oe:const:`OEFF::OELigandFFType::SAGE`. Alternatives are defined in the
      :oe:constns:`OEFF::OELigandFFType` namespace.

.. _OEShape_OEFlexiOverlapOptions_SetHarmonic:


   .. oe:method:: SetHarmonic

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

         .. oe:api::

            bool SetHarmonic(const bool)

      .. oe:language:: python

         .. oe:api:: python

            SetHarmonic(value: bool) -> bool

      This flag defines if the harmonic constraints should be added to the force field for the flexible overlap 
      optimizations. Default `False`.

.. _OEShape_OEFlexiOverlapOptions_SetShapeOptions:


   .. oe:method:: SetShapeOptions

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

         .. oe:api::

            void SetShapeOptions(const OEShapeOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetShapeOptions(opts: OEShapeOptions) -> None

      Sets the options related to :ref:`OEShapeFunc <OEShape_OEShapeFunc>` calculations used in flexible overlap optimization
      by passing in :ref:`OEShapeOptions <OEShape_OEShapeOptions>` instance.

.. _OEShape_OEFlexiOverlapOptions_SetColorOptions:


   .. oe:method:: SetColorOptions

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

         .. oe:api::

            void SetColorOptions(const OEColorOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetColorOptions(opts: OEColorOptions) -> None

      Sets the options related to :ref:`OEColorFunc <OEShape_OEColorFunc>` calculations used in flexible overlap optimization
      by passing in :ref:`OEColorOptions <OEShape_OEColorOptions>` instance.


.. _OEShape_OEFlexiOverlapOptions_SetOverlapFunc:



   .. oe:method:: SetOverlapFunc

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

         .. oe:api::

            bool SetOverlapFunc(const OEOverlapFuncBase&)

      .. oe:language:: python

         .. oe:api:: python

            SetOverlapFunc(func: OEOverlapFuncBase) -> bool

      Sets the overlap function by passing in an :ref:`OEOverlapFuncBase <OEShape_OEOverlapFuncBase>`
      instance. This defines the shape/color interactions to be optimized
      for overlay.
