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

.. oe:namespace:: OEMolPotential



.. _OEMolPotential_OEVdwParams:

.. oe:class:: OEVdwParams

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class  OEVdwParams : public OEMolPotential::OEInteractParams

   The :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` class defines generic vdw  parameters
   used in any force field which has Lennard-Jones 6-12 (or similar 7-14) non-bonded 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:`OEVdwParams <OEMolPotential_OEVdwParams>` class defines the following public methods:
    * :oe:meth:`GetAtomIndex1<OEMolPotential::OEVdwParams::GetAtomIndex1>`
    * :oe:meth:`GetAtomIndex2<OEMolPotential::OEVdwParams::GetAtomIndex2>`
    * :oe:meth:`GetAtom1<OEMolPotential::OEVdwParams::GetAtom1>`
    * :oe:meth:`GetAtom2<OEMolPotential::OEVdwParams::GetAtom2>`
    * :oe:meth:`IsValid<OEMolPotential::OEVdwParams::IsValid>`
    * :oe:meth:`IsPair<OEMolPotential::OEVdwParams::IsPair>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OEVdwParams(const OEChem::OEAtomBase* atom1,
                        const OEChem::OEAtomBase* atom2,
                        const unsigned type = OEFormatType::AMBER)
            OEVdwParams& operator=(const OEVdwParams&)

      .. oe:language:: python

         .. oe:api:: python

            OEVdwParams(atom1: OEAtomBase, atom2: OEAtomBase, type: int) -> OEVdwParams
            OEVdwParams(arg2: OEVdwParams) -> OEVdwParams

      Constructor and copy constructor.
      Constructs an :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` object for a pair of atoms passed as
      arguments. 

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

      .. oe:api::

         OEVdwParams& operator=(const OEVdwParams&)

      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 from non-bonded interacting pair for which the instance of
      :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` 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 from non-bonded interacting pair for which the instance of
      :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` was created.

   .. oe:method:: GetAtom1

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

         .. oe:api::

            const OEChem::OEAtomBase* GetAtom1() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtom1() -> OEAtomBase

      Returns the first atom from non-bonded interacting pair for which the instance of
      :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` was created.

   .. oe:method:: GetAtom2

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

         .. oe:api::

            const OEChem::OEAtomBase* GetAtom2() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtom2() -> OEAtomBase

      Returns the second atom from non-bonded interacting pair for which the instance of
      :ref:`OEVdwParams <OEMolPotential_OEVdwParams>` was created.

   .. oe:method:: IsValid

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

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

      Methods which check if an instance of the :ref:`OEVdwParams <OEMolPotential_OEVdwParams>`
      class was created for a pair of non-bonded atoms to be included in force field calculation. 
      The first method provides a predicate which is used to test individually each of the two atoms 
      from the non-boned pair, while the second method provides a predicate which tests a non-bonded 
      pair of atoms in a single test. 

   .. oe:method:: IsPair

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

         .. oe:api::

            bool IsPair(const OEChem::OEAtomBase* atom1,
                        const OEChem::OEAtomBase* atom2) const

      .. oe:language:: python

         .. oe:api:: python

            IsPair(atom1: OEAtomBase, atom2: OEAtomBase) -> bool

      Used to check if atoms passed as arguments belong to the current 
      :ref:`OEStretchParams <OEMolPotential_OEStretchParams>` instance.
       

 
