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

.. oe:namespace:: OESz

.. meta::
   :keywords: OESzybkiOptOptions, SzybkiOptOptions


.. _OESz_OESzybkiOptOptions:

.. oe:class:: OESzybkiOptOptions

   .. oe:api::


      class OESzybkiOptOptions : public OESystem::OEOptions

   This class represents optimization related options for szybki.

   
   .. oe:method:: Constructors

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

         .. oe:api::

            OESzybkiOptOptions()
            OESzybkiOptOptions(const OESzybkiOptOptions &)

      .. oe:language:: python

         .. oe:api:: python

            OESzybkiOptOptions() -> OESzybkiOptOptions
            OESzybkiOptOptions(arg2: OESzybkiOptOptions) -> OESzybkiOptOptions

      Default and copy constructors.

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

      .. oe:api::

         OESzybkiOptOptions &operator=(const OESzybkiOptOptions &)

      Assignment operator.


   .. oe:method:: GetCalculateFrozenTerms

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

         .. oe:api::

            bool GetCalculateFrozenTerms() const

      .. oe:language:: python

         .. oe:api:: python

            GetCalculateFrozenTerms() -> bool

      Returns the state of the calculate frozen terms flag. If true, OESzybki will include the 
      constant energy terms in the final optimized energy.

   .. oe:method:: GetGradTolerance

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

         .. oe:api::

            double GetGradTolerance() const

      .. oe:language:: python

         .. oe:api:: python

            GetGradTolerance() -> float

      Returns the optimizer gradient convergence criterion defined as RMS gradient in kcal/(mol |A|).

   .. oe:method:: GetMaxIter

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

         .. oe:api::

            unsigned int GetMaxIter() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxIter() -> int

      Returns the value of maximum number of optimizer iterations.

   .. oe:method:: GetOptimizerType

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

         .. oe:api::

            unsigned int GetOptimizerType() const

      .. oe:language:: python

         .. oe:api:: python

            GetOptimizerType() -> int

      Returns the optimizer type to be used, as as `unsigned int` 
      from the :oe:constns:`OESz::OEOptType` namespace.

   .. oe:method:: SetCalculateFrozenTerms

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

         .. oe:api::

            bool SetCalculateFrozenTerms(const bool)

      .. oe:language:: python

         .. oe:api:: python

            SetCalculateFrozenTerms(value: bool) -> bool

      Allows the omission of the energy calculation of the fixed terms at the end of the optimization.
      This situation occurs when adaptors are used. By default constant energy terms are calculated
      for the optimized structure and added to the total energy.

   .. oe:method:: SetGradTolerance

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

         .. oe:api::

            bool SetGradTolerance(const double)

      .. oe:language:: python

         .. oe:api:: python

            SetGradTolerance(value: float) -> bool

      Sets the optimizer gradient convergence criterion defined as RMS gradient in kcal/(mol |A|). 
      If not set by the user a 0.1 value threshold for gradient
      norm :math:`\sqrt{\sum_i {g_ig_i} }`, will be used as termination criteria for all
      optimization types but Newton-Raphson. In the case of the latter the default gradient tolerance
      is RMS gradient of 1e-5 kcal/(mol |A|).

   .. oe:method:: SetMaxIter

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

         .. oe:api::

            bool SetMaxIter(const unsigned int)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxIter(value: int) -> bool

      Sets the value of maximum number of optimizer iterations. The default value is set to 1000.

   .. oe:method:: SetOptimizerType

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

         .. oe:api::

            bool SetOptimizerType(const unsigned int)

      .. oe:language:: python

         .. oe:api:: python

            SetOptimizerType(value: int) -> bool

      Selects the type of the optimization which will be used for optimization. The available
      values are defined in  the :oe:constns:`OESz::OEOptType` namespace.
      Method returns ``false`` when the invalid selection is chosen, ``true`` otherwise.

