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

.. oe:namespace:: OEMolPotential



.. meta::
   :keywords: OEInteractParams, InteractParams


.. _OEMolPotential_OEInteractParams:

.. oe:class:: OEInteractParams

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEInteractParams

   The :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` class provides a general mechanism for retrieving
   multiple parameters from methods defined in the :ref:`OEFFParams <OEMolPotential_OEFFParams>` class.
   The number and types of parameters required for calculating molecular interactions varies among 
   force fields. To keep the interface consistent among implementations of 
   :ref:`OEFFParams <OEMolPotential_OEFFParams>` for various force fields, parameters are stored in the
   :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` class.  Once parameters have been assigned in an
   :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` instance they may be retrieved using
   :oe:meth:`OEMolPotential::OEInteractParams::Get` method.  

   The :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` class defines the following public methods:
    * :oe:meth:`Clear<OEMolPotential::OEInteractParams::Clear>`
    * :oe:meth:`Get<OEMolPotential::OEInteractParams::Get>`
    * :oe:meth:`GetList<OEMolPotential::OEInteractParams::GetList>`
    * :oe:meth:`Set<OEMolPotential::OEInteractParams::Set>`
    * :oe:meth:`SetList<OEMolPotential::OEInteractParams::SetList>`

   .. oe:method:: Constructors

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

          .. oe:api::

             OEInteractParams()
             OEInteractParams(const OEInteractParams&)

       .. oe:language:: python

          .. oe:api:: python

             OEInteractParams() -> OEInteractParams
             OEInteractParams(arg2: OEInteractParams) -> OEInteractParams

      Constructor and copy constructor.

   .. oe:method:: Assignment operator

       .. oe:api::

          OEInteractParams& operator=(const OEInteractParams&)

       Thwe assignment operator


   .. oe:method:: Clear

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

         .. oe:api::

            void Clear()

      .. oe:language:: python

         .. oe:api:: python

            Clear() -> None

      Assigns all parameters to 0.0 in the :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` instance.

   .. oe:method:: Get

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

         .. oe:api::

            double Get(const unsigned int idx) const

      .. oe:language:: python

         .. oe:api:: python

            Get(idx: int) -> float

      Returns the parameter value associated with an integer taken from 
      :oe:const:`OEMolPotential::OEFFParam` namespace. The integer argument specifies the type of 
      parameter requested from the :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` instance. The requested
      parameter type must match :ref:`OEFFParams <OEMolPotential_OEFFParams>` retrieval method to which the
      :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` instance was passed.

   .. oe:method:: GetList

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

         .. oe:api::

            std::vector<double> GetList(const unsigned idx) const

      .. oe:language:: python

         .. oe:api:: python

            GetList(idx: int) -> OEDoubleVector

      Returns a vector of parameters associated with an integer taken from
      :oe:const:`OEMolPotential::OEFFParam` namespace. The integer argument specifies the type of
      parameter vector requested from the :ref:`OEInteractParams <OEMolPotential_OEInteractParams>` instance.

   .. oe:method:: Set 

      .. oe:api::

         bool Set(const unsigned idx, const double value)

      Sets the value of a parameter associated with an integer taken from the
      :oe:const:`OEMolPotential::OEFFParam` namespace (first argument) in the 
      :oe:const:`OEMolPotential::OEFFParam` namespace instance.

   .. oe:method:: SetList

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

         .. oe:api::

            bool SetList(const unsigned idx, const std::vector<double>& values)

      .. oe:language:: python

         .. oe:api:: python

            SetList(idx: int, values: OEDoubleVector) -> bool

      Sets the values of a parameter vector in the 
      :oe:const:`OEMolPotential::OEFFParam` namespace instance.
      The integer argument specifies the type of parameter vector which will be set.
