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

.. oe:namespace:: OEMolPotential



.. _OEMolPotential_OEBendParams:

.. oe:class:: OEBendParams

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class  OEBendParams : public OEMolPotential::OEInteractParams

   The :ref:`OEBendParams <OEMolPotential_OEBendParams>` class defines generic angle-bend parameters
   used in any force field which has bond angle term.

   The following methods are publicly inherited from :ref:`OEInteractParams <OEMolPotential_OEInteractParams>`:
    * :oe:meth:`Clear<OEMolPotential::OEInteractParams::Clear>`
    * :oe:meth:`Get<OEMolPotential::OEInteractParams::Get>`
    * :oe:meth:`Set<OEMolPotential::OEInteractParams::Set>`

   The :ref:`OEBendParams <OEMolPotential_OEBendParams>` class defines the following public methods:
    * :oe:meth:`GetAtomIndex1<OEMolPotential::OEBendParams::GetAtomIndex1>`
    * :oe:meth:`GetAtomIndex2<OEMolPotential::OEBendParams::GetAtomIndex2>`
    * :oe:meth:`GetAtomIndex3<OEMolPotential::OEBendParams::GetAtomIndex3>`
    * :oe:meth:`IsValid<OEMolPotential::OEBendParams::IsValid>`
    * :oe:meth:`IsAngle<OEMolPotential::OEBendParams::IsAngle>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OEBendParams(const OEChem::OEBondBase* bond1,
                         const OEChem::OEBondBase* bond2,
                         const unsigned type = OEFormatType::AMBER)
            OEBendParams(const OEBendParams&)

      .. oe:language:: python

         .. oe:api:: python

            OEBendParams(bond1: OEBondBase, bond2: OEBondBase, type: int) -> OEBendParams
            OEBendParams(arg2: OEBendParams) -> OEBendParams

      Constructor and copy constructor.
      Constructs an :ref:`OEBendParams <OEMolPotential_OEBendParams>` object for two bonds which
      make the bond angle. 

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

      .. oe:api::

         OEBendParams& operator=(const OEBendParams&)

      The assignment operator.

      Assignment operator.


   .. oe:method:: GetAtomIndex1

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

         .. oe:api::

            unsigned GetAtomIndex1() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomIndex1() -> int

      Returns atom index of the first atom for bond angle for which the instance of
      :ref:`OEBendParams <OEMolPotential_OEBendParams>` was created.

   .. oe:method:: GetAtomIndex2

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

         .. oe:api::

            unsigned GetAtomIndex2() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomIndex2() -> int

      Returns atom index of the second atom for bond angle for which the instance of
      :ref:`OEBendParams <OEMolPotential_OEBendParams>` was created.

   .. oe:method:: GetAtomIndex3

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

         .. oe:api::

            unsigned GetAtomIndex3() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomIndex3() -> int

      Returns atom index of the third atom for bond angle for which the instance of
      :ref:`OEBendParams <OEMolPotential_OEBendParams>` was created.

   .. oe:method:: IsValid

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

         .. oe:api::

            bool IsValid() const
            bool IsValid(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& pred) const
            bool IsValid(const OESystem::OEBinaryPredicate<OEChem::OEBondBase, OEChem::OEBondBase>& pred) const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool
            IsValid(pred: OEUnaryAtomPred) -> bool
            IsValid(pred: OEBinaryBondPred) -> bool

      Methods which check if an instance of the :ref:`OEBendParams <OEMolPotential_OEBendParams>`
      class was created for the bond angle to be included in force field calculation.
      First method is checking if the above instance was correctly constructed, while
      two remaining methods provide predicates to test if atoms (second method) and
      two bonds which define bond angle belong to that instance.

   .. oe:method:: IsAngle

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

         .. oe:api::

            bool IsAngle(const OEChem::OEAtomBase* atom1,
                         const OEChem::OEAtomBase* atom2,
                         const OEChem::OEAtomBase* atom3) const

      .. oe:language:: python

         .. oe:api:: python

            IsAngle(atom1: OEAtomBase, atom2: OEAtomBase, atom3: OEAtomBase) -> bool

      Used to check if 3 atom passed as an arguments belong to the current 
      :ref:`OEBendParams <OEMolPotential_OEBendParams>` instance.
       

 
