.. oe:namespace:: OEShape



.. meta::
   :keywords: OEROCS, ROCS


.. _OEShape_OEROCS:

.. oe:class:: OEROCS

   .. oe:api::


      class OEROCS

   The :ref:`OEROCS <OEShape_OEROCS>` defines an interface for finding ROCS hits
   from a search database, by overlaying a reference object (a molecule, grid or a shape query) .

   The :ref:`OEROCS <OEShape_OEROCS>` class defines the following public methods:
    * :oe:meth:`AddMolecule<OEShape::OEROCS::AddMolecule>`
    * :oe:meth:`ClearMolecules<OEShape::OEROCS::ClearMolecules>` 
    * :oe:meth:`GetROCSOptions<OEShape::OEROCS::GetROCSOptions>`
    * :oe:meth:`SetDatabase<OEShape::OEROCS::SetDatabase>`
    * :oe:meth:`Overlay<OEShape::OEROCS::Overlay>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEROCS(const OEROCSOptions& argOptions = OEROCSOptions())
            OEROCS(const OEROCS&)

      .. oe:language:: python

         .. oe:api:: python

            OEROCS(argOptions: OEROCSOptions = OEROCSOptions()) -> OEROCS

      Default and copy constructors.

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

      .. oe:api::

         OEROCS &operator=(const OEROCS &)

      Assignment operator.


   .. oe:method:: AddMolecule

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

         .. oe:api::

            unsigned int AddMolecule(const OEChem::OEMCMolBase& argMol)

      .. oe:language:: python

         .. oe:api:: python

            AddMolecule(argMol: OEMol) -> int

      Adds a copy of the specified molecule to the search database.  Returns the index of the
      molecule in the search database.

   .. oe:method:: ClearMolecules

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

         .. oe:api::

            void ClearMolecules()

      .. oe:language:: python

         .. oe:api:: python

            ClearMolecules() -> None

      Remove all molecules and clear the search database.

   .. oe:method:: GetROCSOptions

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

         .. oe:api::

            const OEROCSOptions& GetROCSOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetROCSOptions() -> OEROCSOptions

      Returns a reference to the :ref:`OEROCSOptions <OEShape_OEROCSOptions>`
      instance as currently set. This defines options to perform
      :ref:`OEROCS <OEShape_OEROCS>` calculations.

   .. oe:method:: SetDatabase

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

         .. oe:api::

            bool SetDatabase(const OEChem::OEMolDatabase&)
            bool SetDatabase(OEChem::oemolistream&)

      .. oe:language:: python

         .. oe:api:: python

            SetDatabase(argDatabase: OEMolDatabase) -> bool
            SetDatabase(argStream: oemolistream) -> bool

      Sets the search database with molecules from specified database or file stream.  
      These methods cleans up any previous existing content of the search database.

   .. oe:method:: Overlay

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

         .. oe:api::

            OESystem::OEIterBase<OEROCSResult>* Overlay(const OEChem::OEMolBase&)
            OESystem::OEIterBase<OEROCSResult>* Overlay(const OEChem::OEMCMolBase&)
            OESystem::OEIterBase<OEROCSResult>* Overlay(const OESystem::OEScalarGrid&)
            OESystem::OEIterBase<OEROCSResult>* Overlay(const OEShapeQuery&)

      .. oe:language:: python

         .. oe:api:: python

            Overlay(argRefMol: Union[OEGraphMol,OEQMol]) -> Iterable[OEROCSResult]
            Overlay(argRefMol: OEMol) -> Iterable[OEROCSResult]
            Overlay(arg1: OEScalarGrid) -> Iterable[OEROCSResult]
            Overlay(argQuery: OEShapeQuery) -> Iterable[OEROCSResult]

      Method optimizes the overlay between the reference object and the molecule conformers
      in the search database.
