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

.. oe:namespace:: OESz

.. meta::
   :keywords: OEFreeFormSolvOptions, FreeFormSolvOptions


.. _OESz_OEFreeFormSolvOptions:

.. oe:class:: OEFreeFormSolvOptions

   .. oe:api::


      class OEFreeFormSolvOptions : public OESystem::OEOptions

   Configuration options for :oe:func:`OESz::OEEstimateSolvFreeEnergy` solvation
   free-energy calculations.
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEFreeFormSolvOptions()
            OEFreeFormSolvOptions(const OEFreeFormSolvOptions&)

      .. oe:language:: python

         .. oe:api:: python

            OEFreeFormSolvOptions() -> OEFreeFormSolvOptions
            OEFreeFormSolvOptions(arg2: OEFreeFormSolvOptions) -> OEFreeFormSolvOptions

      Default and copy constructors.

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

      .. oe:api::

         OEFreeFormSolvOptions& operator=(const OEFreeFormSolvOptions&)

      Assignment operator.


   .. oe:method:: GetAtomicRadiiType

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

         .. oe:api::

            unsigned GetAtomicRadiiType() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomicRadiiType() -> int

      Returns the type of atomic radii used for PB calculations. Possible values passed to the method are
      defined in :oe:constns:`OESz::OEAtomicRadii` namespace.

   .. oe:method:: GetChargeType

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

         .. oe:api::

            unsigned GetChargeType() const

      .. oe:language:: python

         .. oe:api:: python

            GetChargeType() -> int

      Returns the type of partial charges used for Sheffield and PB calculations.

   .. oe:method:: GetConfGenRMS

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

         .. oe:api::

            double GetConfGenRMS() const

      .. oe:language:: python

         .. oe:api:: python

            GetConfGenRMS() -> float

      Returns the value of RMSD used by the conformation generator for conformation deduplication.
      The default values are 0.6 |A| for solvation free energy estimation and
      0.3 |A| for conformation free energy estimation.

   .. oe:method:: GetIonicState

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

         .. oe:api::

            unsigned GetIonicState() const

      .. oe:language:: python

         .. oe:api:: python

            GetIonicState() -> int

      Returns the type of charge state. Possible values are defined in the
      :oe:constns:`OESz::OEFreeFormIonicState` namespace. The default value is
      :oe:constns:`OESz::OEFreeFormIonicState::PH74`.

   .. oe:method:: GetMaxConfGen

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

         .. oe:api::

            unsigned GetMaxConfGen() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxConfGen() -> int

      Returns the maximum conformations number used by the conformation generator.
   
   .. oe:method:: GetUseInput3D

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

        .. oe:api::

           bool GetUseInput3D() const
           Determines if the calculations are set to use 3D coordinates of the input molecule.

     .. oe:language:: python

        .. oe:api:: python

           GetUseInput3D() -> bool

   .. oe:method:: GetUseInputEnsemble

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

         .. oe:api::

            bool GetUseInputEnsemble() const

      .. oe:language:: python

         .. oe:api:: python

            GetUseInputEnsemble() -> bool

      Determines if the calculations are set to use the input ensemble of conformations
      rather than generate the ensemble internally.

   .. oe:method:: SetAtomicRadiiType

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

         .. oe:api::

            bool SetAtomicRadiiType(unsigned radii_type)

      .. oe:language:: python

         .. oe:api:: python

            SetAtomicRadiiType(value: int) -> bool

      Sets the atomic radii type for all PB calculations. Possible values passed to the method are
      defined in :oe:constns:`OESz::OEAtomicRadii` namespace.

   .. oe:method:: SetChargeType

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

         .. oe:api::

            bool SetChargeType(unsigned charge_type)

      .. oe:language:: python

         .. oe:api:: python

            SetChargeType(value: int) -> bool

      Sets the partial charges type. Possible values to pass to the method are defined in a subset
      of `the `OEProton::OECharges`` namespace (please look at the documentation of The **Quacpac TK**.)
      The allowed types are: :oe:constns:`OEProton::OECharges::NoOp` (to use existing partial charges),
      :oe:constns:`OEProton::OECharges::AM1BCCSym`, :oe:constns:`OEProton::OECharges::AM1BCCNoSym`,
      :oe:constns:`OEProton::OECharges::AM1BCCSymSPt`, :oe:constns:`OEProton::OECharges::AM1BCCNoSymSPt`
      and :oe:constns:`OEProton::OECharges::MMFF94`. The default values are
      :oe:constns:`OEProton::OECharges::AM1BCCNoSymSPt` and :oe:constns:`OEProton::OECharges::AM1BCCSym`
      for solvation free energy estimation and conformation free energy estimation respectively. 
   
   .. oe:method:: SetConfGenRMS

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

         .. oe:api::

            bool SetConfGenRMS(double rms)

      .. oe:language:: python

         .. oe:api:: python

            SetConfGenRMS(value: float) -> bool

      Sets the value of RMSD used by the conformation generator for conformation deduplication.
      The default values are 0.6 |A| for solvation free energy 
      estimation and 0.3 |A| for conformation free energy estimation.

   .. oe:method:: SetIonicState

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

         .. oe:api::

            bool SetIonicState(unsigned ionic_state)

      .. oe:language:: python

         .. oe:api:: python

            SetIonicState(value: int) -> bool

      Sets the charge state of the molecule. Possible values are defined in the
      :oe:constns:`OESz::OEFreeFormIonicState` namespace. The default value is
      :oe:constns:`OESz::OEFreeFormIonicState::PH74`.

   .. oe:method:: SetMaxConfGen

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

         .. oe:api::

            bool SetMaxConfGen(unsigned nmax)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxConfGen(value: int) -> bool

      Sets the maximum number of conformations generated by the conformation generator.
      The default values are 200 for solvation free energy estimation and 20000 for
      conformation free energy estimation.

   .. oe:method:: SetUseInput3D

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

         .. oe:api::

            bool SetUseInput3D(bool use3D)

      .. oe:language:: python

         .. oe:api:: python

            SetUseInput3D(value: bool) -> bool

      When parameter ``use3D`` is set to ``true``, solvation free energy is calculated just
      for the input structure representing specific conformation. This option allows to
      find what is the difference in solvation energy between different conformations.

   .. oe:method:: SetUseInputEnsemble

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

         .. oe:api::

            bool SetUseInputEnsemble(bool use_ensemble)

      .. oe:language:: python

         .. oe:api:: python

            SetUseInputEnsemble(value: bool) -> bool

      Sets the usage of the input ensemble rather than generating it internally when the
      parameter ``use_ensemble`` is set to ``true``.

.. note::

   The value set by the :oe:meth:`OESz::OEFreeFormSolvOptions::SetUseInput3D` method takes precedence
   over :oe:meth:`OESz::OEFreeFormSolvOptions::SetUseInputEnsemble`. In other words when the first
   of those methods passes boolean value ``true``, solvation code is looking for a single 3D
   structure (conformation) provided by the user and determines its solvation free energy.
   When the value passed by this method is ``false`` or when it is not used, solvation code is
   selecting the lowest force field energy conformation either from the user ensemble (when 
   medthod :oe:meth:`OESz::OEFreeFormSolvOptions::SetUseInputEnsemble` passes boolean ``true``)
   or from the ensemble generated internally and determines its solvation free energy.   
     
