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

.. oe:namespace:: OEChem

..  _oechem_oemakesubsearchtargetscreen:

.. oe:function:: OEMakeSubSearchTargetScreen

   .. attention::

      |TWOLANGUAGE|

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

      .. oe:api::

         bool OEMakeSubSearchTargetScreen(OESubSearchScreen& screen,
                                          OEMolBase& mol,
                                          const OESubSearchScreenTypeBase* stype)
         bool OEMakeSubSearchTargetScreen(OESubSearchScreen& screen,
                                          OEMolBase& mol,
                                          const unsigned stype = OESubSearchScreenType::Default)

   .. oe:language:: python

      .. oe:api:: python

         OEMakeSubSearchTargetScreen(arg1: OESubSearchScreen,
                                     arg2: Union[OEGraphMol,OEMol,OEQMol],
                                     arg3: OESubSearchScreenTypeBase) -> bool
         OEMakeSubSearchTargetScreen(arg1: OESubSearchScreen,
                                     arg2: Union[OEGraphMol,OEMol,OEQMol],
                                     stype: int) -> bool

   Generates a substructure search screen of a molecule with the given type.

   screen
     The :ref:`OESubSearchScreen <OEChem_OESubSearchScreen>` object that is generated.

   mol
     The molecule of which properties are encoded into the generated screen.

   stype
     The type of the screen (either from the :oe:constns:`OEChem::OESubSearchScreenType` namespace
     or an internal screen type, :ref:`OESubSearchScreenTypeBase <OEChem_OESubSearchScreenTypeBase>`).

   The :ref:`OEMakeSubSearchTargetScreen <OEChem_OEMakeSubSearchTargetScreen>` function also prepares the
   molecule for the substructure search by doing the following.

   * suppresses explicit hydrogens
   * perceives the atom and bond properties of the molecule that are necessary to
     successfully execute the substructure search
     (see also the :ref:`OEPrepareSearch <OEChem_OEPrepareSearch>` function)

   The :ref:`OEMakeSubSearchTargetScreen <OEChem_OEMakeSubSearchTargetScreen>` function returns ``true``
   if the screen was successfully generated and ``false`` otherwise.

   .. seealso::

      * :oe:func:`OEChem::OEMakeSubSearchTargetScreen` function
      * :oe:func:`OEChem::OEScreen` function
