.. oe:namespace:: OEMolAM1

.. meta::
   :keywords: OEOptimizedAM1, OptimizedAM1


.. _OEMolAM1_OEOptimizedAM1:

.. oe:class:: OEOptimizedAM1

   .. oe:api::


      class OEOptimizedAM1

   .. 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:`OEOptimizedAM1 <OEMolAM1_OEOptimizedAM1>` class optimizes :ref:`OEAM1 <OEMolAM1_OEAM1>`
   followed by calculation of Mulliken-type partial charges and other relevant quantities.

   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 :ref:`OEOptimizedAM1 <OEMolAM1_OEOptimizedAM1>` class defines the following public methods:
    * :oe:meth:`CalcAM1<OEMolAM1::OEOptimizedAM1::CalcAM1>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEOptimizedAM1(unsigned int wvnFnType = OEMethodType::AM1)
            OEOptimizedAM1(const OEOptimizedAM1&)

      .. oe:language:: python

         .. oe:api:: python

            OEOptimizedAM1(wvnFnType: int = OEMethodType_AM1) -> OEOptimizedAM1
            OEOptimizedAM1(arg2: OEOptimizedAM1) -> OEOptimizedAM1

      Default and copy constructors.

      The wave functype could be any value defined in :oe:constns:`OEMolAM1::OEMethodType` namespace.

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

      .. oe:api::

         OEOptimizedAM1 &operator=(const OEOptimizedAM1 &)

      The assignment operator.

      Assignment operator.


   .. oe:method:: CalcAM1

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

         .. oe:api::

            bool CalcAM1(OEAM1Results& results, const OEChem::OEMolBase& mol)
            bool CalcAM1(OEAM1Results& results, const OEChem::OEMCMolBase& mol)

      .. oe:language:: python

         .. oe:api:: python

            CalcAM1(results: OEAM1Results, mol: Union[OEGraphMol,OEQMol]) -> bool
            CalcAM1(results: OEAM1Results, mol: OEMol) -> bool

      Optimizes and 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.
