.. oe:namespace:: OEConfGen

.. meta::
   :keywords: OEOmega, Omega


.. _OEConfGen_OEOmega:

.. oe:class:: OEOmega

   .. oe:api::

      class OEOmega

   This class defines an interface for generating ensembles of conformers
   of small molecules.

   .. seealso::

      * :ref:`OEOmegaOptions <OEConfGen_OEOmegaOptions>` class

   .. admonition:: Code Examples

      * :ref:`section_examples_simple_omega` example
      * :ref:`section_examples_dens_omega` example
      * :ref:`section_examples_stereo_and_torsion` example

   .. oe:method:: Constructors

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

         .. oe:api::

            OEOmega( OEPlatform::oeistream* torlib = 0 );
            OEOmega(const OEOmegaOptions&)
            OEOmega(const OEOmega&)

      .. oe:language:: python

         .. oe:api:: python

            OEOmega(torlib: oeistream = None) -> OEOmega
            OEOmega(argOpts: OEOmegaOptions) -> OEOmega
            OEOmega(arg2: OEOmega) -> OEOmega

      Default and copy constructors.

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

      .. oe:api::

         OEOmega &operator=(const OEOmega&)

      Assignment operator.

   .. _OEConfGen_OEOmega_AddFragLib:


   .. oe:method:: AddFragLib

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

         .. oe:api::

            void AddFragLib()
            void AddFragLib(const std::string &)
            void AddFragLib(OEPlatform::oeistream &)

      .. oe:language:: python

         .. oe:api:: python

            AddFragLib() -> None
            AddFragLib(arg2: str) -> None
            AddFragLib(arg2: oeistream) -> None

      The parameterless version will load the built-in fragment library immediately.
      By default, the built-in fragment library does not load until
      :oe:meth:`OEConfGen::OEOmega::Build` is called for the first time.

      The `string` and `oeistream` versions will add an external fragment library.
      This will be used in addition to the
      built-in fragment library. To use only this fragment library, call
      :oe:meth:`OEConfGen::OEOmega::ClearFragLibs` first.

      .. note::

         An enhanced fragment library, ``omega_fragment_lib_2020.oeb.gz``,
         that improves the performance of conformer
         generation is available on request from the `database downloads page
         <https://www.eyesopen.com/database-downloads>`_.

   .. _OEConfGen_OEOmega_Build:


   .. oe:method:: Build

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

         .. oe:api::

            unsigned Build(OEChem::OEMCMolBase&) const

      .. oe:language:: python

         .. oe:api:: python

            Build(mol: OEMol) -> int

      Generates conformers for a molecule. Returns
      :oe:const:`OEConfGen::OEOmegaReturnCode::Success` if
      the process succeeds, otherwise returns an error code from the
      :oe:constns:`OEConfGen::OEOmegaReturnCode` namespace.

   .. _OEConfGen_OEOmega_ClearFragLibs:


   .. oe:method:: ClearFragLibs

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

         .. oe:api::

            void ClearFragLibs()

      .. oe:language:: python

         .. oe:api:: python

            ClearFragLibs() -> None

      Clears all fragment libraries from the :ref:`OEOmega <OEConfGen_OEOmega>` object.

   .. _OEConfGen_OEOmega_GetOptions:


   .. oe:method:: GetOptions

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

         .. oe:api::

            const OEOmegaOptions& GetOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetOptions() -> OEOmegaOptions

      Retrieves a constant reference to the :ref:`OEOmegaOptions <OEConfGen_OEOmegaOptions>`
      instance as currently set.

   .. _OEConfGen_OEOmega_SetOptions:


   .. oe:method:: SetOptions

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

         .. oe:api::

            void SetOptions(const OEOmegaOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetOptions(argOpts: OEOmegaOptions) -> None

      Sets the structure generation options by passing in an
      :ref:`OEOmegaOptions <OEConfGen_OEOmegaOptions>` instance.
