.. oe:namespace:: OESz


.. meta::
   :keywords: OEFixedProteinLigandOptimizer, FixedProteinLigandOptimizer


.. _OESz_OEFixedProteinLigandOptimizer:

.. oe:class:: OEFixedProteinLigandOptimizer

   .. oe:api::

      class OEFixedProteinLigandOptimizer

   This class provides an interface to optimize a ligand in a protein active site, where the
   protein is kept fixed during the optimization. The protein active site can be defined
   either by using a :ref:`OEDesignUnit <OEBio_OEDesignUnit>` or by simple passing in a protein
   molecule.

   The :ref:`OEFixedProteinLigandOptimizer <OESz_OEFixedProteinLigandOptimizer>` class defines the following public methods:
    * :oe:meth:`Energy<OESz::OEFixedProteinLigandOptimizer::Energy>`
    * :oe:meth:`Optimize<OESz::OEFixedProteinLigandOptimizer::Optimize>`
    * :oe:meth:`SetProtein<OESz::OEFixedProteinLigandOptimizer::SetProtein>`

   .. oe:method:: Constructor

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

         .. oe:api::

            OEFixedProteinLigandOptimizer(const OEProteinLigandOptOptions& opts = OEProteinLigandOptOptions())
            OEFixedProteinLigandOptimizer(const OEFixedProteinLigandOptimizer &)

      .. oe:language:: python

         .. oe:api:: python

            OEFixedProteinLigandOptimizer(opts: OEProteinLigandOptOptions = OEProteinLigandOptOptions()) -> OEFixedProteinLigandOptimizer
            OEFixedProteinLigandOptimizer(arg2: OEFixedProteinLigandOptimizer) -> OEFixedProteinLigandOptimizer

      Default and copy constructors.

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

      .. oe:api::

         OEFixedProteinLigandOptimizer &operator=(const OEFixedProteinLigandOptimizer &)

.. _OESz_OEFixedProteinLigandOptimizer_Energy:

      Assignment operator.


   .. oe:method:: Energy

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

         .. oe:api::

            OESystem::OEIterBase<OEFF::OEComplexEnergies>* Energy(const OEChem::OEMCMolBase& ligand) const
            unsigned Energy(OEFF::OEComplexEnergies& res,
                            const OEChem::OEMolBase& ligand) const

      .. oe:language:: python

         .. oe:api:: python

            Energy(mol: OEMol) -> Iterable[OEComplexEnergies]
            Energy(res: OEComplexEnergies, mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

      Calculate the single point energy of the ligand interacting with the protein.  The intra-molecular protein
      energy components are ignored by this method.  The second overload returns a value from
      the :oe:constns:`OESz::OESzybkiReturnCode` namespace reporting the success or failure of the 
      calculation.

.. _OESz_OEFixedProteinLigandOptimizer_Optimize:

   .. oe:method:: Optimize

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

         .. oe:api::

            OESystem::OEIterBase<OESz::OEProteinLigandOptResults>* Optimize(OEChem::OEMCMolBase& ligand) const
            unsigned Optimize(OESz::OEProteinLigandOptResults& res,
                              OEChem::OEMolBase& ligand) const

      .. oe:language:: python

         .. oe:api:: python

            Optimize(mol: OEMol) -> Iterable[OEProteinLigandOptResults]
            Optimize(res: OEProteinLigandOptResults,
                     mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

      Optimize the ligand in the protein active site.  The intra-molecular protein
      energy components are ignored by this method.  The second overload returns a value from
      the :oe:constns:`OESz::OESzybkiReturnCode` namespace reporting the success or failure of the 
      optimization.  The return code for each conformer in the first overload can be obtained
      from the corresponding results object.

.. _OESz_OEFixedProteinLigandOptimizer_SetProtein:


   .. oe:method:: SetProtein

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

         .. oe:api::

            unsigned SetProtein(const OEBio::OEDesignUnit& du,
                                const unsigned proteinMask,
                                const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& proteinPred = OEChem::OEIsTrueAtom())
            unsigned SetProtein(const OEChem::OEMolBase& mol)

      .. oe:language:: python

         .. oe:api:: python

            SetProtein(du: OEDesignUnit, proteinMask: int,
                       proteinPred: OEUnaryAtomPred = OEIsTrueAtom()) -> int
            SetProtein(mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

      Set the protein molecule for the calculation.  In the first two overload, the ``proteinMask``
      define the portion of the :ref:`OEDesignUnit <OEBio_OEDesignUnit>` that should be used as the target
      protein active site. An optional ``proteinPred`` can be also provided along with the mask,
      to define additional residue components to be part of the target. Method returns a value from
      the :oe:constns:`OESz::OESzybkiReturnCode` namespace reporting the success or failure.
