.. include:: ../substitutions

.. oe:namespace:: OEGraphSim

.. meta::
   :keywords: OECreateFastFPDatabaseFile

.. oe:function:: OECreateFastFPDatabaseFile

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

      .. oe:api::

         bool OECreateFastFPDatabaseFile(const std::string& fpdbfname,
                                         const std::string& molfname,
                                         const OEFPTypeBase* fptype)
         bool OECreateFastFPDatabaseFile(const std::string& fpdbfname,
                                         const std::string& molfname,
                                         const OECreateFastFPDatabaseOptions& opts)

   .. oe:language:: python

      .. oe:api:: python

         OECreateFastFPDatabaseFile(fpdbfname: str, molfname: str,
                                    fptype: OEFPTypeBase) -> bool
         OECreateFastFPDatabaseFile(fpdbfname: str, molfname: str,
                                    opts: OECreateFastFPDatabaseOptions) -> bool

   Generates a binary fingerprint file for the given molecule file.

   fpdbfname
     The name of the fingerprint file. The file name has to have a ``.fpbin``
     extension.

   molfname
     The name of the molecule file.

   fptype
     The type of the fingerprint that will be generated to each molecule.

   opts
     The :ref:`OECreateFastFPDatabaseOptions <OEGraphSim_OECreateFastFPDatabaseOptions>` object that
     encapsulates properties that determine how fingerprints are generated.

   .. note::

      **GraphSim TK** currently only supports the :term:`popcount`
      search method for fingerprints with the size of multiple of ``256``.
      This means that the :oe:const:`OEGraphSim::OEFPType::MACCS166`
      fingerprint type is currently not supported.
      When using other custom fingerprint types (see
      :ref:`chapter_user_defined` section)
      the size of the fingerprint must be a multiple of ``256`` in order to
      be able to search it with the :term:`popcount` method.

   .. figure:: ../images/makefastfp.*
      :align:  center
      :width:  300pt

      **Schematic representation of fast fingerprint generation process**

   .. seealso::

      * :ref:`OEFastFPDatabaseParams <OEGraphSim_OEFastFPDatabaseParams>` class
      * Example code in :ref:`section_examples_summary_makefastfp` section
