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

.. oe:namespace:: OESpruce

.. meta::
   :keywords: OESuperpositionOptions, SuperpositionOptions, OEStructuralSuperposition


.. _OESpruce_OESuperpositionOptions:

.. oe:class:: OESuperpositionOptions

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::

      class OESuperpositionOptions

   This class represents :ref:`OESuperpositionOptions <OESpruce_OESuperpositionOptions>` that sets
   the optional parameters for structural superposition using the :ref:`OEStructuralSuperposition <OESpruce_OEStructuralSuperposition>` class.

   .. seealso::

      * :ref:`OEStructuralSuperposition <OESpruce_OEStructuralSuperposition>` class
      * :ref:`OESecondaryStructureSuperposition <OESpruce_OESecondaryStructureSuperposition>` class

   .. oe:method:: Constructors

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

         .. oe:api::

            OESuperpositionOptions()

      .. oe:language:: python

         .. oe:api:: python

            OESuperpositionOptions() -> OESuperpositionOptions

      Default constructor.

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

         .. oe:api::

            OESuperpositionOptions(const OESuperpositionOptions& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OESuperpositionOptions(rhs: OESuperpositionOptions) -> OESuperpositionOptions

      Copy constructor.

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

      .. oe:api::

         OESuperpositionOptions &operator=(const OESuperpositionOptions &argOpts)

      Assignment operator.

   .. oe:method:: AddSiteResidue

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

         .. oe:api::

            void AddSiteResidue(const std::string& argSiteResidue)

      .. oe:language:: python

         .. oe:api:: python

            AddSiteResidue(argSiteResidue: str) -> None

      Add a single site residue for :oe:const:`OESpruce::OESuperpositionType::Site` -based
      superpositions based on a site-specific string that takes the form:
      ``<residue name>:<residue number>:<insertion code>:<chain id>``.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::SetSiteResidues` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::GetSiteResidues` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::ClearSiteResidues` method

   .. oe:method:: ClearLigandConstraints

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

         .. oe:api::

            void ClearLigandConstraints()

      .. oe:language:: python

         .. oe:api:: python

            ClearLigandConstraints() -> None

      Clear the stored ligand constraints, if they exist.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::SetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::GetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::HasLigandConstraints` method

   .. oe:method:: ClearSiteResidues

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

         .. oe:api::

            void ClearSiteResidues()

      .. oe:language:: python

         .. oe:api:: python

            ClearSiteResidues() -> None

      Remove any existing site residues from the :ref:`OESuperpositionOptions <OESpruce_OESuperpositionOptions>` object
      that would be used in the :oe:const:`OESpruce::OESuperpositionType::Site` -based superposition calculations.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::AddSiteResidue` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::SetSiteResidues` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::GetSiteResidues` method

   .. oe:method:: GetDist

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

         .. oe:api::

            double GetDist() const

      .. oe:language:: python

         .. oe:api:: python

            GetDist() -> float

      Get the cutoff distance used in the nearest neighbors calculation for the site residue
      constraints (default = ``5.0 Angstroms``\ ) for
      :oe:const:`OESpruce::OESuperpositionType::Site` -based superpositions.

   .. oe:method:: GetLigandConstraints

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

         .. oe:api::

            void GetLigandConstraints(OEChem::OEMolBase& refLig,
                                      OEChem::OEMolBase& fitLig) const

      .. oe:language:: python

         .. oe:api:: python

            GetLigandConstraints(refLig: Union[OEGraphMol,OEMol,OEQMol],
                                 fitLig: Union[OEGraphMol,OEMol,OEQMol]) -> None

      Returns by reference the reference and fit ligand constraints that are stored.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::SetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::HasLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::ClearLigandConstraints` method

   .. oe:method:: GetSiteResidues

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

         .. oe:api::

            std::vector<std::string> GetSiteResidues() const

      .. oe:language:: python

         .. oe:api:: python

            GetSiteResidues() -> OEStringVector

      Get the site residues used in the :oe:const:`OESpruce::OESuperpositionType::Site` -based
      calculation.

   .. oe:method:: GetSuperpositionType

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

         .. oe:api::

            unsigned GetSuperpositionType() const

      .. oe:language:: python

         .. oe:api:: python

            GetSuperpositionType() -> int

      Get the type of superposition to be performed. Types are given from the constants
      given in :oe:constns:`OESpruce::OESuperpositionType`.
      The default type is :oe:const:`OESpruce::OESuperpositionType::Default`.

   .. oe:method:: HasLigandConstraints

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

         .. oe:api::

            bool HasLigandConstraints() const

      .. oe:language:: python

         .. oe:api:: python

            HasLigandConstraints() -> bool

      Returns whether or not ligand constraints have been set.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::SetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::GetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::ClearLigandConstraints` method

   .. oe:method:: SetDist

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

         .. oe:api::

            void SetDist(double argDist)

      .. oe:language:: python

         .. oe:api:: python

            SetDist(argDist: float) -> None

      Set the cutoff distance used in the nearest neighbors calculation for the site residue
      constraints for :oe:const:`OESpruce::OESuperpositionType::Site` -based superpositions.

   .. oe:method:: SetLigandConstraints

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

         .. oe:api::

            void SetLigandConstraints(const OEChem::OEMolBase& refLig,
                                      const OEChem::OEMolBase& fitLig)

      .. oe:language:: python

         .. oe:api:: python

            SetLigandConstraints(refLig: Union[OEGraphMol,OEMol,OEQMol],
                                 fitLig: Union[OEGraphMol,OEMol,OEQMol]) -> None

      Sets the ligand constraints that will be used for the superposition.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::GetLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::HasLigandConstraints` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::ClearLigandConstraints` method

   .. oe:method:: SetSiteResidues

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

         .. oe:api::

            void SetSiteResidues(const std::vector<std::string>& argSiteResidues)

      .. oe:language:: python

         .. oe:api:: python

            SetSiteResidues(argSiteResidues: OEStringVector) -> None

      Set all site residues at once for :oe:const:`OESpruce::OESuperpositionType::Site` -based
      superpositions using a string vector, where each string takes the
      form ``<residue name>:<residue number>:<insertion code>:<chain id>``.

      .. seealso::

         * :oe:meth:`OESpruce::OESuperpositionOptions::AddSiteResidue` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::GetSiteResidues` method
         * :oe:meth:`OESpruce::OESuperpositionOptions::ClearSiteResidues` method

   .. oe:method:: SetSuperpositionType

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

         .. oe:api::

            bool SetSuperpositionType(unsigned type)

      .. oe:language:: python

         .. oe:api:: python

            SetSuperpositionType(type: int) -> bool

      Set the type of superposition to be performed. Types are taken from the
      constants given in :oe:constns:`OESpruce::OESuperpositionType`.
