.. oe:namespace:: OEChem



.. meta::
   :keywords: OEOmegaConfTest, OmegaConfTest


.. _OEChem_OEOmegaConfTest:

.. oe:class:: OEOmegaConfTest

   .. oe:api::


      class OEOmegaConfTest : public OEConfTestBase

   This implementation of :ref:`OEConfTestBase <OEChem_OEConfTestBase>` combines
   subsequent connection tables into a multi-conformer molecule if
   they:

   * have the same number of atoms and bonds in the same order
   * have atoms and bonds with identical properties in the same order 
   * have the same atom and bond stereochemistry, except for invertible nitrogen stereochemistry 
   * have the same title (optional)

   :ref:`OEOmegaConfTest <OEChem_OEOmegaConfTest>` shouldn't be used for reading
   multi-conformer molecules in PDB or XYZ file format. These file
   formats typically require the use of
   :oe:func:`OEChem::OEDetermineConnectivity` (and
   :oe:func:`OEChem::OEPerceiveBondOrders`) which may potentially
   perceive and create bonds in different orders (or arbitrarily
   assign bond orders and Kekulé forms differently) for different
   conformers of the same molecule. This disrupts the ordering (and
   property) constraints described above. Generally, file formats
   other than PDB and XYZ should be used for storing multi-conformer
   molecules (as consecutive connection tables).

   The following methods are publicly inherited from :ref:`OEConfTestBase <OEChem_OEConfTestBase>`:

   =========================================================== =========================================================== ==========================================================
   :oe:meth:`CombineMols<OEChem::OEConfTestBase::CombineMols>` :oe:meth:`CompareMols<OEChem::OEConfTestBase::CompareMols>` :oe:meth:`CreateCopy<OEChem::OEConfTestBase::CreateCopy>` 
   =========================================================== =========================================================== ==========================================================

   .. oe:method:: Constructors

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

         .. oe:api::

            OEOmegaConfTest(bool compTitles = true)

      .. oe:language:: python

         .. oe:api:: python

            OEOmegaConfTest(compTitles: bool = True) -> OEOmegaConfTest

      Constructs an  :ref:`OEOmegaConfTest <OEChem_OEOmegaConfTest>`
      object. The argument 'compTitle' specifies whether to compare
      molecule titles (accessed by
      :oe:meth:`OEChem::OEMolBase::GetTitle`).  If the constructor is
      called with no arguments or with the argument ``true``, molecule
      titles will be required to be the same. Otherwise, the titles
      will not be compared. In the latter instance, each conformer
      will have the individual title of its original connection table
      and the multi-conformer molecule will reflect the title of the
      active conformer.

   .. oe:method:: CombineMols

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

         .. oe:api::

            bool CombineMols(OEMCMolBase& m1, OEMolBase& m2)

      .. oe:language:: python

         .. oe:api:: python

            CombineMols(m1: OEMol, m2: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   .. oe:method:: CompareMols

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

         .. oe:api::

            bool CompareMols(OEMolBase& m1, OEMolBase& m2) const

      .. oe:language:: python

         .. oe:api:: python

            CompareMols(m1: Union[OEGraphMol,OEMol,OEQMol],
                        m2: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Returns whether the two :ref:`OEMolBase <OEChem_OEMolBase>` objects
      are the same by checking the four conditions listed above.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEConfTestBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEConfTestBase

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEOmegaConfTest <OEChem_OEOmegaConfTest>`
      object is dynamically allocated  and owned by the caller.

      .. oe:language:: c++ 

         The returned copy should be deallocated using C++
         ``delete`` in order to prevent a memory leak. 
