.. oe:namespace:: OEMolAM1

.. meta::
   :keywords: OEAM1, AM1


.. _OEMolAM1_OEAM1:

.. oe:class:: OEAM1

   .. oe:api::


      class OEAM1 : public OEMolPotential::OEMolFunc1

   .. note::

      This is a low level api class that allows access to advanced 
      functionality from semi-empirical method calculations. It is recommended
      that you use the high level api method 
      :oe:func:`OEAssignCharges<OEProton::OEAssignCharges>` 
      with :ref:`OEAM1Charges <OEProton_OEAM1Charges>` options to assign AM1 charges
      on a molecule.

   The :ref:`OEAM1 <OEMolAM1_OEAM1>` class calculates Mulliken-type partial
   charges and other relevant quantities in a molecule using AM1 type
   semi-empirical quantum mechanical methods.

   The input must be a 3D molecule, and the AM1 parameters must be 
   available for each atom type in the molecule.

   .. seealso:
      :ref:`chapter_molchargetheory` for a description of AM1

   The following methods are publicly inherited from :ref:`OEFunc0 <OEOpt_OEFunc0>`:
    * :oe:meth:`operator()<OEOpt::OEFunc0::operator()>`         
    * :oe:meth:`GetFComponents<OEOpt::OEFunc0::GetFComponents>` 
    * :oe:meth:`NumVar<OEOpt::OEFunc0::NumVar>`

   The following methods are publicly inherited from :ref:`OEFunc1 <OEOpt_OEFunc1>`:
    * :oe:meth:`operator()<OEOpt::OEFunc1::operator()>`
   
   The following methods are publicly inherited from :ref:`OEMolFunc <OEMolPotential_OEMolFunc>`:
    * :oe:meth:`GetInteractions<OEMolPotential::OEMolFunc::GetInteractions>`  
    * :oe:meth:`Setup<OEMolPotential::OEMolFunc::Setup>`

   The :ref:`OEAM1 <OEMolAM1_OEAM1>` class defines the following public methods:
    * :oe:meth:`CalcAM1<OEMolAM1::OEAM1::CalcAM1>`
    * :oe:meth:`GetOptions<OEMolAM1::OEAM1::GetOptions>`
    * :oe:meth:`GetResults<OEMolAM1::OEAM1::GetResults>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEAM1(const OEAM1Options& argOptions = OEAM1Options())
            OEAM1(const OEAM1&)

      .. oe:language:: python

         .. oe:api:: python

            OEAM1(argOptions: OEAM1Options = OEMolAM1_OEAM1Options()) -> OEAM1
            OEAM1(arg2: OEAM1) -> OEAM1

      Default and copy constructors.

      Constructs an :ref:`OEAM1 <OEMolAM1_OEAM1>` instance using the specified set of parameters.

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

      .. oe:api::

         OEAM1 &operator=(const OEAM1 &)

      The assignment operator.

      Assignment operator.


   .. oe:method:: CalcAM1

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

         .. oe:api::

            bool CalcAM1(OEAM1Results&, const OEMolBase&)

      .. oe:language:: python

         .. oe:api:: python

            CalcAM1(argResults: OEAM1Results,
                    argMolecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Performs AM1 calculation on the specified molecule and fills up 
      the specified :ref:`OEAM1Results <OEMolAM1_OEAM1Results>` with calculated results.
      Returns ``false`` if calculation was not successful.

   .. oe:method:: GetOptions

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

         .. oe:api::

            const OEAM1Options& GetOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetOptions() -> OEAM1Options

      Returns a reference to the :ref:`OEAM1Options <OEMolAM1_OEAM1Options>`
      instance as currently set for this :ref:`OEAM1 <OEMolAM1_OEAM1>`.

   .. oe:method:: GetResults

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

         .. oe:api::

            bool GetResults(OEAM1Results&) const

      .. oe:language:: python

         .. oe:api:: python

            GetResults(argResults: OEAM1Results) -> bool

      Fills up the specified :ref:`OEAM1Results <OEMolAM1_OEAM1Results>` with results
      from the last calculation. Returns ``false`` if a valid set of results
      does not exist.
