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

.. oe:namespace:: OEConfGen

.. meta::
   :keywords: OESliceEnsembleOptions, SliceEnsembleOptions


.. _OEConfGen_OESliceEnsembleOptions:

.. oe:class:: OESliceEnsembleOptions

   .. oe:api::

      class OESliceEnsembleOptions : public OESystem::OEOptions

   This class provides an interface to set up options required for reducing a
   molecule conformer ensemble by removing duplicates and high energy conformers.

   The :ref:`OESliceEnsembleOptions <OEConfGen_OESliceEnsembleOptions>` allows multiple ways to set up
   the desired settings for each parameter for slicing an ensemble. There are
   three main control parameters: `EnergyWindow`, `RMSThreshold`, and `MaxConfs`.  The
   default usage is to use the same control settings for slicing all molecule ensembles.  
   However, for each of the three parameters, the parameter
   settings can be made a variable based on the number of rotatable bonds in the molecule.
   The variable settings can be applied by using the `range` based API points.

   This describes how to use the range based settings for `MaxConfs`, however, the
   same applies to `EnergyWindow` and `RMSThreshold`. A `MaxConfs` setting of
   *100,200,300* for :ref:`SetMaxConfRange<OEConfGen_OESliceEnsembleOptions_SetMaxConfRange>`
   along with a value of *5* for the `RangeIncrement` set with
   :ref:`SetRangeIncrement<OEConfGen_OESliceEnsembleOptions_SetRangeIncrement>` would
   use a `MaxConfs` value of *100* for a molecule with a number of rotatable bonds between 0 and 4,
   that of *200* for a molecule with a number of rotatable bonds between 5 and 9, and *300* for a molecule
   with a number of rotatable bonds of 10 or higher.


   .. seealso::

      * :ref:`OETorDriver <OEConfGen_OETorDriver>` class

   The :ref:`OESliceEnsembleOptions <OEConfGen_OESliceEnsembleOptions>` class defines the following public methods:
    * :oe:meth:`GetEnergyWindow<OEConfGen::OESliceEnsembleOptions::GetEnergyWindow>` and
      :oe:meth:`SetEnergyWindow<OEConfGen::OESliceEnsembleOptions::SetEnergyWindow>`
    * :oe:meth:`GetEnergyRange<OEConfGen::OESliceEnsembleOptions::GetEnergyRange>` and
      :oe:meth:`SetEnergyRange<OEConfGen::OESliceEnsembleOptions::SetEnergyRange>`
    * :oe:meth:`GetMaxConfs<OEConfGen::OESliceEnsembleOptions::GetMaxConfs>` and
      :oe:meth:`SetMaxConfs<OEConfGen::OESliceEnsembleOptions::SetMaxConfs>`
    * :oe:meth:`GetMaxConfRange<OEConfGen::OESliceEnsembleOptions::GetMaxConfRange>` and
      :oe:meth:`SetMaxConfRange<OEConfGen::OESliceEnsembleOptions::SetMaxConfRange>`
    * :oe:meth:`GetMaxTerminalHeavy<OEConfGen::OESliceEnsembleOptions::GetMaxTerminalHeavy>` and
      :oe:meth:`SetMaxTerminalHeavy<OEConfGen::OESliceEnsembleOptions::SetMaxTerminalHeavy>`
    * :oe:meth:`GetOverlayRMS<OEConfGen::OESliceEnsembleOptions::GetOverlayRMS>` and
      :oe:meth:`SetOverlayRMS<OEConfGen::OESliceEnsembleOptions::SetOverlayRMS>`
    * :oe:meth:`GetRangeIncrement<OEConfGen::OESliceEnsembleOptions::GetRangeIncrement>` and
      :oe:meth:`SetRangeIncrement<OEConfGen::OESliceEnsembleOptions::SetRangeIncrement>`
    * :oe:meth:`GetRMSThreshold<OEConfGen::OESliceEnsembleOptions::GetRMSThreshold>` and
      :oe:meth:`SetRMSThreshold<OEConfGen::OESliceEnsembleOptions::SetRMSThreshold>`
    * :oe:meth:`GetRMSRange<OEConfGen::OESliceEnsembleOptions::GetRMSRange>` and
      :oe:meth:`SetRMSRange<OEConfGen::OESliceEnsembleOptions::SetRMSRange>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OESliceEnsembleOptions()
            OESliceEnsembleOptions(const OESliceEnsembleOptions &)

      .. oe:language:: python

         .. oe:api:: python

            OESliceEnsembleOptions() -> OESliceEnsembleOptions
            OESliceEnsembleOptions(arg2: OESliceEnsembleOptions) -> OESliceEnsembleOptions

      Default and copy constructors.

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

      .. oe:api::

         OESliceEnsembleOptions &operator=(const OESliceEnsembleOptions &)

      Assignment operator.


   .. _OEConfGen_OESliceEnsembleOptions_GetEnergyWindow:

   .. oe:method:: GetEnergyWindow

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

         .. oe:api::

            double GetEnergyWindow() const
            double GetEneWindow(const unsigned numRotors) const

      .. oe:language:: python

         .. oe:api:: python

            GetEnergyWindow() -> float

      See the :oe:meth:`SetEnergyWindow<OEConfGen::OESliceEnsembleOptions::SetEnergyWindow>` method.
      The second variation of the method returns the
      value of the energy window that is in effect for a given molecule with a specified
      number of rotors.

   .. _OEConfGen_OESliceEnsembleOptions_GetEnergyRange:

   .. oe:method:: GetEnergyRange

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

         .. oe:api::

            std::vector<double> GetEnergyRange() const

      .. oe:language:: python

         .. oe:api:: python

            GetEnergyRange() -> OEDoubleVector

      See the :oe:meth:`SetEnergyRange<OEConfGen::OESliceEnsembleOptions::SetEnergyRange>` method.

   .. _OEConfGen_OESliceEnsembleOptions_GetMaxConfs:

   .. oe:method:: GetMaxConfs

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

         .. oe:api::

            unsigned GetMaxConfs() const
            unsigned GetMaxConfs(const unsigned numRotors) const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxConfs() -> int
            GetMaxConfs(argNumRotors: int) -> int

      See the :oe:meth:`SetMaxConfs<OEConfGen::OESliceEnsembleOptions::SetMaxConfs>` method.
      The second variation of the method returns the
      value of the maximum conformers that is in effect for a given molecule with a specified
      number of rotors.

   .. _OEConfGen_OESliceEnsembleOptions_GetMaxConfRange:

   .. oe:method:: GetMaxConfRange

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

         .. oe:api::

            std::vector<unsigned int> GetMaxConfRange() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxConfRange() -> OEUIntVector

      See the :oe:meth:`SetMaxConfRange<OEConfGen::OESliceEnsembleOptions::SetMaxConfRange>` method.


   .. _OEConfGen_OESliceEnsembleOptions_GetMaxTerminalHeavy:

   .. oe:method:: GetMaxTerminalHeavy

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

         .. oe:api::

            unsigned GetMaxTerminalHeavy() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxTerminalHeavy() -> int

      See the :oe:meth:`SetMaxConfRange<OEConfGen::OESliceEnsembleOptions::SetMaxTerminalHeavy>` method.


   .. _OEConfGen_OESliceEnsembleOptions_GetOverlayRMS:

   .. oe:method:: GetOverlayRMS

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

         .. oe:api::

            bool GetOverlayRMS() const

      .. oe:language:: python

         .. oe:api:: python

            GetOverlayRMS() -> bool

      See the :oe:meth:`SetOverlayRMS<OEConfGen::OESliceEnsembleOptions::SetOverlayRMS>` method.


   .. _OEConfGen_OESliceEnsembleOptions_GetRangeIncrement:

   .. oe:method:: GetRangeIncrement

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

         .. oe:api::

            unsigned int GetRangeIncrement() const

      .. oe:language:: python

         .. oe:api:: python

            GetRangeIncrement() -> int

      See the :oe:meth:`SetRangeIncrement<OEConfGen::OESliceEnsembleOptions::SetRangeIncrement>` method.

   .. _OEConfGen_OESliceEnsembleOptions_GetRMSThreshold:

   .. oe:method:: GetRMSThreshold

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

         .. oe:api::

            double GetRMSThreshold() const
            double GetRMSCutoff(const unsigned numRotors) const

      .. oe:language:: python

         .. oe:api:: python

            GetRMSThreshold() -> float

      See the :oe:meth:`SetRMSThreshold<OEConfGen::OESliceEnsembleOptions::SetRMSThreshold>` method.
      The second variation of the method returns the
      value of RMS threshold that is in effect for a given molecule with the specified
      number of rotors.

   .. _OEConfGen_OESliceEnsembleOptions_GetRMSRange:

   .. oe:method:: GetRMSRange

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

         .. oe:api::

            std::vector<double> GetRMSRange() const

      .. oe:language:: python

         .. oe:api:: python

            GetRMSRange() -> OEDoubleVector

      See the :oe:meth:`SetRMSRange<OEConfGen::OESliceEnsembleOptions::SetRMSRange>` method.

   .. _OEConfGen_OESliceEnsembleOptions_SetEnergyWindow:

   .. oe:method:: SetEnergyWindow

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

         .. oe:api::

            void SetEnergyWindow(const double)

      .. oe:language:: python

         .. oe:api:: python

            SetEnergyWindow(value: float) -> bool

      Sets the **maximum allowable energy** difference between the
      lowest and the highest energy conformers, in units of kcal/mol.
      Default: 10.0 kcal/mol

   .. _OEConfGen_OESliceEnsembleOptions_SetEnergyRange:

   .. oe:method:: SetEnergyRange

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

         .. oe:api::

            bool SetEnergyRange(const std::vector<double>&)
            bool SetEnergyRange(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetEnergyRange(value: OEDoubleVector) -> bool
            SetEnergyRange(value: str) -> bool

      Sets the **energy range** defines a varying
      :oe:meth:`EnergyWindow<OEConfGen::OESliceEnsembleOptions::SetEnergyWindow>` energy window in
      conjunction with the :oe:meth:`RangeIncrement<OEConfGen::OESliceEnsembleOptions::SetRangeIncrement>`.
      Defining the range overrides the singly defined energy window value. The string version of the 
      overload expects a comma-separated string.

   .. _OEConfGen_OESliceEnsembleOptions_SetMaxConfs:

   .. oe:method:: SetMaxConfs

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

         .. oe:api::

            void SetMaxConfs(const unsigned int)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxConfs(value: int) -> bool

      Sets the **maximum number of conformers** to be included in the output ensemble for each
      molecule. For molecules with few conformational degrees of freedom, the number of output conformers might
      be lower than the value set for this flag but will never exceed it.
      Default: 200

   .. _OEConfGen_OESliceEnsembleOptions_SetMaxConfRange:

   .. oe:method:: SetMaxConfRange

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

         .. oe:api::

            bool SetMaxConfRange(const std::vector<unsigned>&)
            bool SetMaxConfRange(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxConfRange(value: OEUIntVector) -> bool
            SetMaxConfRange(value: str) -> bool

      Sets the **maximum number of conformers range** that defines a varying number of
      :oe:meth:`MaxConfs<OEConfGen::OESliceEnsembleOptions::SetMaxConfs>` in conjunction
      with the :oe:meth:`RangeIncrement<OEConfGen::OESliceEnsembleOptions::SetRangeIncrement>`.
      Defining the range overrides the singly defined `MaxConfs` value. The string version of the
      overload expects a comma-separated string.

   .. _OEConfGen_OESliceEnsembleOptions_SetMaxTerminalHeavy:

   .. oe:method:: SetMaxTerminalHeavy

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

         .. oe:api::

            bool SetMaxTerminalHeavy(const unsigned int)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxTerminalHeavy(value: int) -> bool

      Sets the **maximum number of terminal heavy atoms** that should be allowed in 
      calculating *RMSD* between conformers.  If the number of terminal heavy atoms 
      in the molecule exceeds the specified limit, all terminal heavy atoms are ignored
      in the *RMSD* calculation.  If the number is set to *0*, this value is treated as not set.
      Default: 0


   .. _OEConfGen_OESliceEnsembleOptions_SetOverlayRMS:

   .. oe:method:: SetOverlayRMS

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

         .. oe:api::

            bool SetOverlayRMS(const bool)

      .. oe:language:: python

         .. oe:api:: python

            SetOverlayRMS(value: bool) -> bool

      Sets flag indicating if **overlay should be performed for RMSD calculation** between conformers. 
      Default: True


   .. _OEConfGen_OESliceEnsembleOptions_SetRangeIncrement:

   .. oe:method:: SetRangeIncrement

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

         .. oe:api::

            bool SetRangeIncrement(const unsigned)

      .. oe:language:: python

         .. oe:api:: python

            SetRangeIncrement(value: int) -> bool

      Sets the **number of rotatable bonds range** to be
      used when the
      :oe:meth:`OEConfGen::OESliceEnsembleOptions::SetEnergyRange`,
      :oe:meth:`OEConfGen::OESliceEnsembleOptions::SetRMSRange`,
      and :oe:meth:`OEConfGen::OESliceEnsembleOptions::SetMaxConfRange` are defined in terms of
      ranges. Default: 5


   .. _OEConfGen_OESliceEnsembleOptions_SetRMSRange:

   .. oe:method:: SetRMSRange

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

         .. oe:api::

            bool SetRMSRange(const std::vector<double>&)
            bool SetRMSRange(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetRMSRange(value: OEDoubleVector) -> bool
            SetRMSRange(value: str) -> bool

      Sets the **RMS range** that allows to define a varying
      :ref:`RMSThreshold<OEConfGen_OESliceEnsembleOptions_SetRMSThreshold>` in conjunction
      with the :ref:`RangeIncrement<OEConfGen_OESliceEnsembleOptions_SetRangeIncrement>`.
      Defining the range overrides the singly defined RMS threshold value. The string version of the
      overload expects a comma-separated string.

   .. _OEConfGen_OESliceEnsembleOptions_SetRMSThreshold:

   .. oe:method:: SetRMSThreshold

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

         .. oe:api::

            bool SetRMSThreshold(const double)

      .. oe:language:: python

         .. oe:api:: python

            SetRMSThreshold(value: float) -> bool

      Sets the **RMS threshold** (Root Mean Square Cartesian distance)
      below which two conformers are treated as duplicates.
      Default: 0.5
