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

.. oe:namespace:: OEBioisostere

.. meta::
   :keywords: OEFragmentOptions, FragmentOptions


.. _OEBioisostere_OEFragmentOptions:

.. oe:class:: OEFragmentOptions

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEFragmentOptions : public OESystem::OEOptions

   This class provides an interface to set up options for fragmenting
   molecules when building a bioisosteric fragment database. These options
   control fragment generation, size constraints, and structural properties.

   The :ref:`OEFragmentOptions <OEBioisostere_OEFragmentOptions>` class defines the following public methods:
    * :oe:meth:`GetMaxChiral<OEBioisostere::OEFragmentOptions::GetMaxChiral>` and
      :oe:meth:`SetMaxChiral<OEBioisostere::OEFragmentOptions::SetMaxChiral>`
    * :oe:meth:`GetMaxDegree<OEBioisostere::OEFragmentOptions::GetMaxDegree>` and
      :oe:meth:`SetMaxDegree<OEBioisostere::OEFragmentOptions::SetMaxDegree>`
    * :oe:meth:`GetMaxHeavy<OEBioisostere::OEFragmentOptions::GetMaxHeavy>` and
      :oe:meth:`SetMaxHeavy<OEBioisostere::OEFragmentOptions::SetMaxHeavy>`
    * :oe:meth:`GetMaxMolWt<OEBioisostere::OEFragmentOptions::GetMaxMolWt>` and
      :oe:meth:`SetMaxMolWt<OEBioisostere::OEFragmentOptions::SetMaxMolWt>`
    * :oe:meth:`GetMinDegree<OEBioisostere::OEFragmentOptions::GetMinDegree>` and
      :oe:meth:`SetMinDegree<OEBioisostere::OEFragmentOptions::SetMinDegree>`
    * :oe:meth:`GetMinHeavy<OEBioisostere::OEFragmentOptions::GetMinHeavy>` and
      :oe:meth:`SetMinHeavy<OEBioisostere::OEFragmentOptions::SetMinHeavy>`
    * :oe:meth:`GetSingleSourceMol<OEBioisostere::OEFragmentOptions::GetSingleSourceMol>` and
      :oe:meth:`SetSingleSourceMol<OEBioisostere::OEFragmentOptions::SetSingleSourceMol>`
    * :oe:meth:`GetSmarts<OEBioisostere::OEFragmentOptions::GetSmarts>` and
      :oe:meth:`SetSmarts<OEBioisostere::OEFragmentOptions::SetSmarts>`
    * :oe:meth:`SetSmartsFile<OEBioisostere::OEFragmentOptions::SetSmartsFile>`
   

   .. _OEBioisostere_OEFragmentOptions_Constructors:
   .. oe:method:: Constructors

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

         .. oe:api::

            OEFragmentOptions()
            OEFragmentOptions(const OEFragmentOptions &)

      .. oe:language:: python

         .. oe:api:: python

            OEFragmentOptions() -> OEFragmentOptions
            OEFragmentOptions(arg2: OEFragmentOptions) -> OEFragmentOptions

      Default and copy constructors.


   .. _OEBioisostere_OEFragmentOptions_operator=:
   .. oe:method:: operator=

      .. oe:language:: c++

         .. oe:api::

            OEFragmentOptions &operator=(const OEFragmentOptions &)

      Assignment operator.

   .. _OEBioisostere_OEFragmentOptions_GetMaxChiral:

   .. oe:method:: GetMaxChiral

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

         .. oe:api::

            unsigned GetMaxChiral() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxChiral() -> int

      See :oe:meth:`SetMaxChiral<OEBioisostere::OEFragmentOptions::SetMaxChiral>` method.

   .. _OEBioisostere_OEFragmentOptions_GetMaxDegree:


   .. oe:method:: GetMaxDegree

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

         .. oe:api::

            unsigned GetMaxDegree() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxDegree() -> int

      See :oe:meth:`SetMaxDegree<OEBioisostere::OEFragmentOptions::SetMaxDegree>` method.

   .. _OEBioisostere_OEFragmentOptions_GetMaxHeavy:


   .. oe:method:: GetMaxHeavy

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

         .. oe:api::

            unsigned GetMaxHeavy() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxHeavy() -> int

      See :oe:meth:`SetMaxHeavy<OEBioisostere::OEFragmentOptions::SetMaxHeavy>` method.

   .. _OEBioisostere_OEFragmentOptions_GetMaxMolWt:


   .. oe:method:: GetMaxMolWt

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

         .. oe:api::

            double GetMaxMolWt() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxMolWt() -> float

      See :oe:meth:`SetMaxMolWt<OEBioisostere::OEFragmentOptions::SetMaxMolWt>` method.

   .. _OEBioisostere_OEFragmentOptions_GetMinDegree:


   .. oe:method:: GetMinDegree

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

         .. oe:api::

            unsigned GetMinDegree() const

      .. oe:language:: python

         .. oe:api:: python

            GetMinDegree() -> int

      See :oe:meth:`SetMinDegree<OEBioisostere::OEFragmentOptions::SetMinDegree>` method.

   .. _OEBioisostere_OEFragmentOptions_GetMinHeavy:


   .. oe:method:: GetMinHeavy

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

         .. oe:api::

            unsigned GetMinHeavy() const

      .. oe:language:: python

         .. oe:api:: python

            GetMinHeavy() -> int

      See :oe:meth:`SetMinHeavy<OEBioisostere::OEFragmentOptions::SetMinHeavy>` method.

   .. _OEBioisostere_OEFragmentOptions_GetSingleSourceMol:


   .. oe:method:: GetSingleSourceMol

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

         .. oe:api::

            bool GetSingleSourceMol() const

      .. oe:language:: python

         .. oe:api:: python

            GetSingleSourceMol() -> bool

      See :oe:meth:`SetSingleSourceMol<OEBioisostere::OEFragmentOptions::SetSingleSourceMol>` method.

   .. _OEBioisostere_OEFragmentOptions_GetSmarts:

   .. oe:method:: GetSmarts

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

         .. oe:api::

            std::string GetSmarts() const

      .. oe:language:: python

         .. oe:api:: python

            GetSmarts() -> str

      See :oe:meth:`SetSmarts<OEBioisostere::OEFragmentOptions::SetSmarts>` method.

   .. _OEBioisostere_OEFragmentOptions_SetMaxChiral:

   .. oe:method:: SetMaxChiral

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

         .. oe:api::

            bool SetMaxChiral(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxChiral(value: int) -> bool

      Sets the maximum allowable number of chiral centers (atom and bond) in
      generated fragments.
      **Default: 3.**

   .. _OEBioisostere_OEFragmentOptions_SetMaxDegree:

   .. oe:method:: SetMaxDegree

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

         .. oe:api::

            bool SetMaxDegree(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxDegree(value: int) -> bool

      Sets the maximum allowed attachment points in generated fragments.
      **Default: 3.**

   .. _OEBioisostere_OEFragmentOptions_SetMaxHeavy:

   .. oe:method:: SetMaxHeavy

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

         .. oe:api::

            bool SetMaxHeavy(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxHeavy(value: int) -> bool

      Sets the maximum allowed heavy atoms in generated fragments.
      **Default: 15.**

   .. _OEBioisostere_OEFragmentOptions_SetMaxMolWt:

   .. oe:method:: SetMaxMolWt

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

         .. oe:api::

            bool SetMaxMolWt(const double)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxMolWt(value: float) -> bool

      Sets the maximum allowed molecular weight for generated fragments.
      **Default: 350.**

   .. _OEBioisostere_OEFragmentOptions_SetMinDegree:

   .. oe:method:: SetMinDegree

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

         .. oe:api::

            bool SetMinDegree(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetMinDegree(value: int) -> bool

      Sets the minimum required attachment points in generated fragments.
      **Default: 1.**

   .. _OEBioisostere_OEFragmentOptions_SetMinHeavy:

   .. oe:method:: SetMinHeavy

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

         .. oe:api::

            bool SetMinHeavy(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetMinHeavy(value: int) -> bool

      Sets the minimum required heavy atoms in generated fragments.
      **Default: 1.**

   .. _OEBioisostere_OEFragmentOptions_SetSingleSourceMol:

   .. oe:method:: SetSingleSourceMol

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

         .. oe:api::

            bool SetSingleSourceMol(bool)

      .. oe:language:: python

         .. oe:api:: python

            SetSingleSourceMol(value: bool) -> bool

      Sets whether to store only a *single source molecule* per fragment.
      When disabled (default), stores information for up to five source molecules.
      **Default: false**

   .. _OEBioisostere_OEFragmentOptions_SetSmarts:

   .. oe:method:: SetSmarts

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

         .. oe:api::

            bool SetSmarts(const std::string value)

      .. oe:language:: python

         .. oe:api:: python

            SetSmarts(value: str) -> bool

      Sets the SMARTS pattern for bonds to break during fragmentation.
      Built-in options are ``recap``, ``rlf``, ``both`` (both rlf and recap),
      and ``all``.
      **Default: all**

   .. _OEBioisostere_OEFragmentOptions_SetSmartsFile:

   .. oe:method:: SetSmartsFile

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

         .. oe:api::

            bool SetSmartsFile(const std::string&)
            bool SetSmartsFile(const OEPlatform::oeisstream value)

      .. oe:language:: python

         .. oe:api:: python

            SetSmartsFile(value: oeisstream) -> bool
            SetSmartsFile(filename: str) -> bool

      Sets SMARTS patterns for bonds to break from a file. The first overload
      accepts a ``filename`` and the second accepts an
      :ref:`oeisstream<OEPlatform_oeisstream>`. This method takes precedence over the
      :oe:meth:`SetSmarts<OEBioisostere::OEFragmentOptions::SetSmarts>` method.

