.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

..  _OEChem_OEIsValidSubSearchDatabase:

.. oe:function:: OEIsValidSubSearchDatabase

   .. attention::

      |TWOLANGUAGE|

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

      .. oe:api::

         bool OEIsValidSubSearchDatabase(oemolistream& ifs)
         bool OEIsValidSubSearchDatabase(const std::string& filename)

   .. oe:language:: python

      .. oe:api:: python

         OEIsValidSubSearchDatabase(filename: str) -> bool
         OEIsValidSubSearchDatabase(ifs: oemolistream) -> bool

   Returns ``true`` if the given molecule stream or the file is a valid
   substructure search database that was created by the
   :oe:func:`OEChem::OECreateSubSearchDatabaseFile` function.

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

      .. oe:api::

         bool OEIsValidSubSearchDatabase(oemolistream& ifs,
                                         const OESubSearchScreenTypeBase *)
         bool OEIsValidSubSearchDatabase(const std::string& filename,
                                         const OESubSearchScreenTypeBase *)

   .. oe:language:: python

      .. oe:api:: python

         OEIsValidSubSearchDatabase(filename: str,
                                    arg2: OESubSearchScreenTypeBase) -> bool
         OEIsValidSubSearchDatabase(ifs: oemolistream,
                                    arg2: OESubSearchScreenTypeBase) -> bool

   Returns ``true`` if the given molecule stream or the file is a valid
   substructure search database that was created by the
   :oe:func:`OEChem::OECreateSubSearchDatabaseFile` function.
   These functions also check if the database stores substructure search
   screens with the given type.

   .. seealso::

      * :ref:`OESubSearchScreenTypeBase <OEChem_OESubSearchScreenTypeBase>` class

   .. admonition:: Code Example

      * :ref:`section_example_oechem_searchfastss` example
