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

.. oe:namespace:: OESz

.. meta::
   :keywords: OESzybkiResults, SzybkiResults


.. _OESz_OESzybkiResults:

.. oe:class:: OESzybkiResults

   .. oe:api::


      class OESzybkiResults

   Container for geometry optimization results, including final energies,
   individual force field component contributions, RMSD from starting
   geometry, and convergence status.

   
   .. oe:method:: Constructors

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

         .. oe:api::

            OESzybkiResults()
            OESzybkiResults(const OESzybkiResults &)

      .. oe:language:: python

         .. oe:api:: python

            OESzybkiResults() -> OESzybkiResults
            OESzybkiResults(arg2: OESzybkiResults) -> OESzybkiResults

      Default and copy constructors.

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

      .. oe:api::

         OESzybkiResults &operator=(const OESzybkiResults &)

      Assignment operator.


   .. oe:method:: Clear

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

         .. oe:api::

            void Clear()

      .. oe:language:: python

         .. oe:api:: python

            Clear() -> None

      Removes all data from the :ref:`OESzybkiResults <OESz_OESzybkiResults>` object.

   .. oe:method:: GetCPUTime

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

         .. oe:api::

            float GetCPUTime() const

      .. oe:language:: python

         .. oe:api:: python

            GetCPUTime() -> float

      Returns CPU time in seconds for the optimization.

   .. oe:method:: GetConfIdx

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

         .. oe:api::

            unsigned int GetConfIdx() const

      .. oe:language:: python

         .. oe:api:: python

            GetConfIdx() -> int

      Returns conformer id number.

   .. oe:method:: GetEnergyTerm

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

         .. oe:api::

            double GetEnergyTerm(unsigned int) const

      .. oe:language:: python

         .. oe:api:: python

            GetEnergyTerm(arg2: int) -> float

      Returns the current energy value for a specified potential term. The integer values which 
      determine potential terms are defined in the namespace :oe:constns:`OESz::OEPotentialTerms`   

   .. oe:method:: GetFinalRMSGradient

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

         .. oe:api::

            double GetFinalRMSGradient() const

      .. oe:language:: python

         .. oe:api:: python

            GetFinalRMSGradient() -> float

      Returns final RMS of forces, :math:`\sqrt\frac{\bf{g} \cdot \bf{g}}{n_v}`, where :math:`\bf{g}` 
      is the gradient vector and :math:`n_v` the number of variables.

   .. oe:method:: GetGradients

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

         .. oe:api::

            bool GetGradients(double* gradients, const OEChem::OEAtomBase* atom) const

      .. oe:language:: python

         .. oe:api:: python

            GetGradients(gradients: OEDoubleArray, atom: OEAtomBase) -> bool

      Fills the passed double array with gradients for the atom passed as a second argument. 
      Returns ``true`` if the gradients are successfully exported, ``false`` otherwise.
      Export of gradients is available only when the method :oe:meth:`OESz::OESzybkiGeneralOptions::SetCalculateGradients`
      is called prior to the calculation performed with one of the 
      :oe:meth:`OESz::OESzybki::operator()` operators. Currently calculation of gradients is available
      only for single-point runs. 

   .. oe:method:: GetFinalTotalPotential

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

         .. oe:api::

            double GetFinalTotalPotential() const

      .. oe:language:: python

         .. oe:api:: python

            GetFinalTotalPotential() -> float

      Returns the value of the optimized potential for the molecular system.

   .. oe:method:: GetIntramolecularLigandEnergy

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

         .. oe:api::

            double GetIntramolecularLigandEnergy() const

      .. oe:language:: python

         .. oe:api:: python

            GetIntramolecularLigandEnergy() -> float

      Returns the value of the value of intramolecular MMFF energy.

   .. oe:method:: GetInitialRMSGradient

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

         .. oe:api::

            double GetInitialRMSGradient() const

      .. oe:language:: python

         .. oe:api:: python

            GetInitialRMSGradient() -> float

      Returns the initial RMS of forces, :math:`\sqrt\frac{\bf{g} \cdot \bf{g}}{n_v}`, 
      where :math:`\bf{g}` is the gradient vector and :math:`n_v` the number of variables.

   .. oe:method:: GetInitialTotalPotential

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

         .. oe:api::

            double GetInitialTotalPotential() const

      .. oe:language:: python

         .. oe:api:: python

            GetInitialTotalPotential() -> float

      Returns the value of the initial potential for the molecular system to be optimized.

   .. oe:method:: GetInterEnergy

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

         .. oe:api::

            double GetInterEnergy() const

      .. oe:language:: python

         .. oe:api:: python

            GetInterEnergy() -> float

      Returns the interaction energy between protein (or DNA) and the ligand optimized inside the 
      macromolecule. For ligands optimized in vacuum or in solution, this function returns 0.

   .. oe:method:: GetMaxDisplacement

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

         .. oe:api::

            double GetMaxDisplacement() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxDisplacement() -> float

      Returns the maximum atomic displacement for a single atom in |A| during optimization.

   .. oe:method:: GetNumCycles

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

         .. oe:api::

            unsigned int GetNumCycles() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumCycles() -> int

      Returns the number of cycles performed by the optimizer.

   .. oe:method:: GetNumFixAtoms

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

         .. oe:api::

            unsigned int GetNumFixAtoms() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumFixAtoms() -> int

      Returns the number of atoms which will be fixed during optimization.

   .. oe:method:: GetNumRotors

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

         .. oe:api::

            unsigned int GetNumRotors() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumRotors() -> int

      Returns the number of rotatable bonds in the molecule.

   .. oe:method:: GetProteinRMSD

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

         .. oe:api::

            double GetProteinRMSD() const

      .. oe:language:: python

         .. oe:api:: python

            GetProteinRMSD() -> float

      In the case of a partially optimized protein (residues, side chains, polar hydrogens
      in proximity to the ligand) the function returns the RMS displacement of a protein from its 
      initial structure.

   .. oe:method:: GetRMSD

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

         .. oe:api::

            double GetRMSD() const

      .. oe:language:: python

         .. oe:api:: python

            GetRMSD() -> float

      Returns the RMS displacement of the optimized structure with respect to the initial structure.

   .. oe:method:: GetTotalEnergy

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

         .. oe:api::

            double GetTotalEnergy() const

      .. oe:language:: python

         .. oe:api:: python

            GetTotalEnergy() -> float

      Returns the total energy of the optimized system. That includes all intra and inter molecular 
      MMFF terms, solvation energy (Sheffield or PB, if present) and protein-ligand interaction energy 
      if a ligand is optimized inside the protein. Harmonic energy constraint energy is excluded. 

   .. oe:method:: GetTotalEnergyWithHarmConstraint

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

         .. oe:api::

            double GetTotalEnergyWithHarmConstraint() const

      .. oe:language:: python

         .. oe:api:: python

            GetTotalEnergyWithHarmConstraint() -> float

      Returns total energy of the optimized system plus harmonic energy constraint.

   .. oe:method:: IsActiveTerm

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

         .. oe:api::

            bool IsActiveTerm(unsigned int term) const

      .. oe:language:: python

         .. oe:api:: python

            IsActiveTerm(arg2: int) -> bool

      Returns ``true`` if the potential term specified by the parameter term is included in the potential 
      function of the system. Possible parameters values are defined in the namespace 
      :oe:constns:`OESz::OEPotentialTerms`.

   .. oe:method:: GetConfFreeEnergyFromEnsemble

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

         .. oe:api::

            double GetConfFreeEnergyFromEnsemble() const

      .. oe:language:: python

         .. oe:api:: python

            GetConfFreeEnergyFromEnsemble() -> float

      Returns the free energy of selecting a conformation out of the ensemble calculated as:
      :math:`-RTln(q/Q)`, where :math:`q` is the partition function of a ligand conformer and
      :math:`Q` is the partition function for the entire ensemble. The method will throw an error
      unless it is run following the call to :oe:meth:`OESz::OESzybki::GetEntropy` method which takes 
      the :ref:`OESzybkiEnsembleResults <OESz_OESzybkiEnsembleResults>` instance as a second parameter, followed by
      the call to :oe:meth:`OESz::OESzybkiEnsembleResults::GetResultsForConformations` on the
      returned :ref:`OESzybkiEnsembleResults <OESz_OESzybkiEnsembleResults>` object.

   .. oe:method:: GetVibEntropy

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

         .. oe:api::

            double GetVibEntropy() const

      .. oe:language:: python

         .. oe:api:: python

            GetVibEntropy() -> float

      Returns the vibrational entropy of a conformation in e.u. (cal/(mol K)) when entropy has been 
      calculated with one of the :oe:meth:`OESz::OESzybki::GetEntropy` methods.

   .. oe:method:: GetRotEntropy

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

         .. oe:api::

            double GetRotEntropy() const

      .. oe:language:: python

         .. oe:api:: python

            GetRotEntropy() -> float

      Returns the rotational entropy of a conformation in e.u. (cal/(mol K)) when entropy has been calculated
      with one of the :oe:meth:`OESz::OESzybki::GetEntropy` methods.

   .. oe:method:: GetLnQvib

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

         .. oe:api::

            double GetLnQvib() const

      .. oe:language:: python

         .. oe:api:: python

            GetLnQvib() -> float

      Returns the natural logarithm of a vibrational partition function when entropy has been 
      calculated with one of the :oe:meth:`OESz::OESzybki::GetEntropy` methods.

   .. oe:method:: GetLnQrot

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

         .. oe:api::

            double GetLnQrot() const

      .. oe:language:: python

         .. oe:api:: python

            GetLnQrot() -> float

      Returns the natural logarithm of a rotational partition function when entropy has been 
      calculated with one of the :oe:meth:`OESz::OESzybki::GetEntropy` methods. 

   .. oe:method:: IsUnique

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

         .. oe:api::

            bool IsUnique() const

      .. oe:language:: python

         .. oe:api:: python

            IsUnique() -> bool

      Returns ``true`` if the conformation is unique in terms of the structure. Although the
      method :oe:meth:`OESz::OESzybki::GetEntropy` which takes a non-const 
      :ref:`OEMCMolBase <OEChem_OEMCMolBase>` object is guaranteed to return an ensemble of unique
      conformations, the other methods in oeszybki library do not. The method might be 
      therefore useful to make sure if the current conformation is unique or not.   

   .. oe:method:: Print

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

         .. oe:api::

            void Print(OEPlatform::oeostream &) const
            void Print(OESystem::OEErrorHandler &) const

      .. oe:language:: python

         .. oe:api:: python

            Print(arg2: oeostream) -> None
            Print(arg2: OEErrorHandler) -> None

      Both functions allow the generation of log information on the optimized system. The following 
      information is reported:

      *  Conformer id 
      *  Number of fixed atoms (if any)
      *  Number of torsions (if any and if optimization in torsion space is true) 
      *  Initial energy  
      *  Initial rms gradient
      *  Final energy
      *  Final rms gradient 
      *  RMS displacement upon optimization 
      *  Maximum displacement during optimization 
      *  Values of potential terms at final geometry 

