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

.. oe:namespace:: OEBio

.. meta::
   :keywords: OESplitMolComplexOptions, SplitMolComplexOptions


.. _OEBio_OESplitMolComplexOptions:

.. oe:class:: OESplitMolComplexOptions

   .. oe:api::


      class OESplitMolComplexOptions

   The `OESplitMolComplexOptions` class encapsulates
   properties and resources that determine how
   :oe:func:`OEBio::OESplitMolComplex` and
   :oe:func:`OEBio::OEGetMolComplexComponents` operate.
   For examples detailing how to modify and/or operate different filters
   see :ref:`section_split_mol_complex`.

   .. oe:method:: Constructors

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

         .. oe:api::

            OESplitMolComplexOptions(const OESplitMolComplexOptions& rhs)
            OESplitMolComplexOptions(const std::string& ligName = std::string())

      .. oe:language:: python

         .. oe:api:: python

            OESplitMolComplexOptions(ligName: str = str()) -> OESplitMolComplexOptions
            OESplitMolComplexOptions(rhs: OESplitMolComplexOptions) -> OESplitMolComplexOptions

      Constructor and copy constructor. If ``ligName`` is specified
      in the call to the constructor, components will be recognized
      as ligands if and only if
      they have a matching residue name string.

      .. seealso::

         * :oe:meth:`OEBio::OEMolComplexCategorizer::Constructors`

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

      .. oe:api::

         OESplitMolComplexOptions &operator=(const OESplitMolComplexOptions &rhs)

      Assignment operator.

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

      .. oe:api::

         bool operator!=(const OESplitMolComplexOptions &rhs) const

      Not equals operator. Returns ``true`` if options are not equivalent.

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

      .. oe:api::

         bool operator==(const OESplitMolComplexOptions &rhs) const

      Equals operator. Returns ``true`` if options are equivalent.

   .. oe:method:: GetAddRGroup

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

         .. oe:api::

            bool GetAddRGroup() const

      .. oe:language:: python

         .. oe:api:: python

            GetAddRGroup() -> bool

      Returns ``true`` if "R groups" are to be added
      when covalent bonds are broken.

   .. oe:method:: GetAdjustHCount

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

         .. oe:api::

            bool GetAdjustHCount() const

      .. oe:language:: python

         .. oe:api:: python

            GetAdjustHCount() -> bool

      Returns ``true`` if the implicit hydrogen count is to be adjusted
      when covalent bonds are broken.

   .. oe:method:: GetAssumptions

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

         .. oe:api::

            unsigned GetAssumptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetAssumptions() -> int

      Return assumptions about molecular perception.

      .. seealso::

         * :oe:constns:`OEBio::OEAssumption`

   .. oe:method:: GetCategorizer

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

         .. oe:api::

            OEMolComplexCategorizerBase* GetCategorizer() const

      .. oe:language:: python

         .. oe:api:: python

            GetCategorizer() -> OEMolComplexCategorizerBase

      Return a new copy of the :ref:`OEMolComplexCategorizerBase <OEBio_OEMolComplexCategorizerBase>`
      object used to categorize molecular components.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.

   .. oe:method:: GetCollectProteinByChain

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

         .. oe:api::

            bool GetCollectProteinByChain() const

      .. oe:language:: python

         .. oe:api:: python

            GetCollectProteinByChain() -> bool

      Returns ``true`` if fragmented protein chains be
      associated with the same the same site.

   .. oe:method:: GetCombinedFilter

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

         .. oe:api::

            OESystem::OEUnaryPredicate<OESystem::OERoleSet>* GetCombinedFilter() const

      .. oe:language:: python

         .. oe:api:: python

            GetCombinedFilter() -> OEUnaryRoleSetPred

      Returns a new copy of the filter that matches
      the *ligand* or *protein* or *water* filters.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.


      .. seealso::

         * :oe:meth:`OEBio::OESplitMolComplexOptions::GetLigandFilter`
         * :oe:meth:`OEBio::OESplitMolComplexOptions::GetProteinFilter`
         * :oe:meth:`OEBio::OESplitMolComplexOptions::GetWaterFilter`
         * :oe:meth:`OEBio::OESplitMolComplexOptions::GetOtherFilter`

   .. oe:method:: GetLigandFilter

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

         .. oe:api::

            OESystem::OEUnaryPredicate<OESystem::OERoleSet>* GetLigandFilter() const

      .. oe:language:: python

         .. oe:api:: python

            GetLigandFilter() -> OEUnaryRoleSetPred

      Returns a new copy of the *ligand* filter.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.


   .. oe:method:: GetMaxBindingSiteDist

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

         .. oe:api::

            double GetMaxBindingSiteDist() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxBindingSiteDist() -> float

      Return the maximum distance from the ligand to be associated with a binding site.
      Can not be less than 1.0 |A|.

   .. oe:method:: GetMaxSurfaceWaterDist

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

         .. oe:api::

            double GetMaxSurfaceWaterDist() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxSurfaceWaterDist() -> float

      Return the maximum distance from the protein to be considered a surface water.
      Can not be less than 1.0 |A|.

   .. oe:method:: GetOtherFilter

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

         .. oe:api::

            OESystem::OEUnaryPredicate<OESystem::OERoleSet>* GetOtherFilter() const

      .. oe:language:: python

         .. oe:api:: python

            GetOtherFilter() -> OEUnaryRoleSetPred

      Returns a new copy of the filter that matches everything
      that does *not* match the combined filter.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.


      .. seealso::

         * :oe:meth:`OEBio::OESplitMolComplexOptions::GetCombinedFilter`

   .. oe:method:: GetPromoteUnknowns

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

         .. oe:api::

            bool GetPromoteUnknowns() const

      .. oe:language:: python

         .. oe:api:: python

            GetPromoteUnknowns() -> bool

      Returns ``true`` if components classified as
      :oe:const:`OEBio::OEMolComplexFilterCategory::Unknown`
      should be considered the ligand if no others
      ligand is found.

   .. oe:method:: GetProteinFilter

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

         .. oe:api::

            OESystem::OEUnaryPredicate<OESystem::OERoleSet>* GetProteinFilter() const

      .. oe:language:: python

         .. oe:api:: python

            GetProteinFilter() -> OEUnaryRoleSetPred

      Returns a new copy of the *protein* filter.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.


   .. oe:method:: GetSeparateResidues

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

         .. oe:api::

            bool GetSeparateResidues() const

      .. oe:language:: python

         .. oe:api:: python

            GetSeparateResidues() -> bool

      Returns ``true`` if proteins are to be separated into individual residues
      before selection.
      Separating into residues can be used to extract binding site residues.

   .. oe:method:: GetSplitCovalent

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

         .. oe:api::

            bool GetSplitCovalent() const

      .. oe:language:: python

         .. oe:api:: python

            GetSplitCovalent() -> bool

      Returns ``true`` if covalent ligands are to be searched for
      and split out as separate components.

   .. oe:method:: GetSplitCovalentCofactors

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

         .. oe:api::

            bool GetSplitCovalentCofactors() const

      .. oe:language:: python

         .. oe:api:: python

            GetSplitCovalentCofactors() -> bool

      Returns ``true`` if covalent cofactors are to be searched for
      and split out as separate components.

   .. oe:method:: GetWarnNoLigand

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

         .. oe:api::

            bool GetWarnNoLigand() const

      .. oe:language:: python

         .. oe:api:: python

            GetWarnNoLigand() -> bool

      Returns ``true`` if a verbose level warning will be generated
      when a ligand is not found.

   .. oe:method:: GetWaterFilter

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

         .. oe:api::

            OESystem::OEUnaryPredicate<OESystem::OERoleSet>* GetWaterFilter() const

      .. oe:language:: python

         .. oe:api:: python

            GetWaterFilter() -> OEUnaryRoleSetPred

      Returns a new copy of the *water* filter.

      .. oe:language:: c++

         To avoid a memory leak in C++, the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.

   .. oe:method:: ResetFilters

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

         .. oe:api::

            void ResetFilters(unsigned site = 1u, bool surfaceWaters = false,
                              unsigned ligCategory = OEMolComplexFilterCategory::Ligand,
                              unsigned protCategory = OEMolComplexFilterCategory::ProtComplex,
                              unsigned waterCategory = OEMolComplexFilterCategory::Water,
                              unsigned modelNo = 1u)

      .. oe:language:: python

         .. oe:api:: python

            ResetFilters(site: int = 1, surfaceWaters: bool = False,
                         ligCategory: int, protCategory: int,
                         waterCategory: int, modelNo: int = 1) -> None

      Regenerate filters based on parameters. Can be overridden by methods to
      set individual filters. Site 0 means all sites. ModelNo 0 means all models.

      .. note::

         It may be necessary to remove the input flavor
         :oe:const:`OEChem::OEIFlavor::PDB::ENDM` to read all models
         (see the :ref:`splitmolcomplex<section_example_oebio_splitmolcomplex>`
         example for how to do this).
         In most situations, the ``modelNo`` parameter should be
         set to either 0 or 1 (the default). The reason
         for this is that the site counter, which the ``site`` parameter
         selects based on, does not reset for each model and
         therefore site and model are not independent. A good example of
         where this can be used is with a PDB biological assembly file:
         setting the ``modelNo`` parameter to 0 (use all models),
         allows a binding site spanning symmetry related
         proteins marked as different models to be recognized.

      .. seealso::

         * :oe:constns:`OEBio::OEMolComplexFilterCategory` namespace
         * :oe:func:`OEBio::OEMolComplexFilterFactory` function
         * :oe:meth:`OEBio::OESplitMolComplexOptions::SetLigandFilter`
         * :oe:meth:`OEBio::OESplitMolComplexOptions::SetProteinFilter`
         * :oe:meth:`OEBio::OESplitMolComplexOptions::SetWaterFilter`
         * :ref:`OEMolComplexFilter <OEBio_OEMolComplexFilter>` class
         * :ref:`section_split_mol_complex` section


   .. oe:method:: SetAddRGroup

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

         .. oe:api::

            void SetAddRGroup(bool addR = true)

      .. oe:language:: python

         .. oe:api:: python

            SetAddRGroup(addR: bool = True) -> None

      Set whether "R groups" are to be added when covalent bonds are broken.

   .. oe:method:: SetAdjustHCount

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

         .. oe:api::

            void SetAdjustHCount(bool adjust = true)

      .. oe:language:: python

         .. oe:api:: python

            SetAdjustHCount(adjust: bool = True) -> None

      Set whether the implicit hydrogen count is to be adjusted
      when covalent bonds are broken.

   .. oe:method:: SetAssumptions

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

         .. oe:api::

            void SetAssumptions(unsigned assume)

      .. oe:language:: python

         .. oe:api:: python

            SetAssumptions(assume: int) -> None

      Set assumptions about molecular perception.
      Default = :oe:const:`OEBio::OEAssumption::ResPerceived`

   .. oe:method:: SetCategorizer

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

         .. oe:api::

            void SetCategorizer(const OEMolComplexCategorizerBase& cat)

      .. oe:language:: python

         .. oe:api:: python

            SetCategorizer(cat: OEMolComplexCategorizerBase) -> None

      Set the :ref:`OEMolComplexCategorizerBase <OEBio_OEMolComplexCategorizerBase>` object
      used to categorize molecular components.

   .. oe:method:: SetCollectProteinByChain

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

         .. oe:api::

            void SetCollectProteinByChain(bool collect = true)

      .. oe:language:: python

         .. oe:api:: python

            SetCollectProteinByChain(collect: bool = True) -> None

      Set whether fragmented protein chains should be collected into the same site.
      Default = ``true``

   .. oe:method:: SetLigandFilter

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

         .. oe:api::

            void SetLigandFilter(const OESystem::OEUnaryPredicate<OESystem::OERoleSet>& f)

      .. oe:language:: python

         .. oe:api:: python

            SetLigandFilter(f: OEUnaryRoleSetPred) -> None

      Set the *ligand* filter.
      Default is an :oe:func:`OEBio::OEMolComplexFilterFactory` created with :oe:const:`OEBio::OEMolComplexFilterCategory::Ligand`

      .. seealso::

         * :ref:`OEMolComplexFilter <OEBio_OEMolComplexFilter>` class
         * :oe:func:`OEBio::OEMolComplexFilterFactory` function
         * :oe:meth:`OEBio::OESplitMolComplexOptions::ResetFilters`

   .. oe:method:: SetMaxBindingSiteDist

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

         .. oe:api::

            void SetMaxBindingSiteDist(double dist)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxBindingSiteDist(dist: float) -> None

      Set the maximum distance from the ligand to be associated with a binding site.
      Default = 8.0 |A|

   .. oe:method:: SetMaxSurfaceWaterDist

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

         .. oe:api::

            void SetMaxSurfaceWaterDist(double dist)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxSurfaceWaterDist(dist: float) -> None

      Set the maximum distance from the protein to be considered a surface water.
      Default = 5.0 |A|

   .. oe:method:: SetPromoteUnknowns

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

         .. oe:api::

            void SetPromoteUnknowns(bool promote = true)

      .. oe:language:: python

         .. oe:api:: python

            SetPromoteUnknowns(promote: bool = True) -> None

      Set whether components classified as
      :oe:const:`OEBio::OEMolComplexFilterCategory::Unknown`
      should be considered the ligand if no others
      ligand is found.
      Default = ``true``

   .. oe:method:: SetProteinFilter

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

         .. oe:api::

            void SetProteinFilter(const OESystem::OEUnaryPredicate<OESystem::OERoleSet>& f)

      .. oe:language:: python

         .. oe:api:: python

            SetProteinFilter(f: OEUnaryRoleSetPred) -> None

      Set the *protein* filter.
      Default is an :oe:func:`OEBio::OEMolComplexFilterFactory` created with :oe:const:`OEBio::OEMolComplexFilterCategory::ProtComplex`

      .. seealso::

         * :ref:`OEMolComplexFilter <OEBio_OEMolComplexFilter>` class
         * :oe:func:`OEBio::OEMolComplexFilterFactory` function
         * :oe:meth:`OEBio::OESplitMolComplexOptions::ResetFilters`

   .. oe:method:: SetSeparateResidues

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

         .. oe:api::

            void SetSeparateResidues(bool separate = true)

      .. oe:language:: python

         .. oe:api:: python

            SetSeparateResidues(separate: bool = True) -> None

      Set whether to separate proteins into individual residues before selection.
      Can be used to identify binding site residues.
      Default = ``false``

   .. oe:method:: SetSplitCovalent

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

         .. oe:api::

            void SetSplitCovalent(bool split = true)

      .. oe:language:: python

         .. oe:api:: python

            SetSplitCovalent(split: bool = True) -> None

      Set whether covalent ligands are to be searched for
      and split out as separate components.
      Default = ``false``

   .. oe:method:: SetSplitCovalentCofactors

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

         .. oe:api::

            void SetSplitCovalentCofactors(bool split = true)

      .. oe:language:: python

         .. oe:api:: python

            SetSplitCovalentCofactors(split: bool = True) -> None

      Set whether covalent cofactors are to be searched for
      and split out as separate components.
      Default = ``false``

   .. oe:method:: SetWarnNoLigand

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

         .. oe:api::

            void SetWarnNoLigand(bool warn = true)

      .. oe:language:: python

         .. oe:api:: python

            SetWarnNoLigand(warn: bool = True) -> None

      Set whether to send out a verbose level warning
      if a ligand is not found.
      Default = ``true``

   .. oe:method:: SetWaterFilter

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

         .. oe:api::

            void SetWaterFilter(const OESystem::OEUnaryPredicate<OESystem::OERoleSet>& f)

      .. oe:language:: python

         .. oe:api:: python

            SetWaterFilter(f: OEUnaryRoleSetPred) -> None

      Set the *water* filter.
      Default is an :oe:func:`OEBio::OEMolComplexFilterFactory` created with :oe:const:`OEBio::OEMolComplexFilterCategory::Water`

      .. seealso::

         * :ref:`OEMolComplexFilter <OEBio_OEMolComplexFilter>` class
         * :oe:func:`OEBio::OEMolComplexFilterFactory` function
         * :oe:meth:`OEBio::OESplitMolComplexOptions::ResetFilters`
