.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEReadMDLReactionQueryFile

.. oe:function:: OEReadMDLReactionQueryFile

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

      .. oe:api::

         bool OEReadMDLReactionQueryFile(oemolistream& ifs, OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OEReadMDLReactionQueryFile(ifs: oemolistream,
                                    mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   Reads the contents of the MDL reaction file into the specified
   :ref:`OEMolBase <OEChem_OEMolBase>` object. :oe:func:`OEChem::OEReadMDLReactionQueryFile`
   is a low-level reader and as such will not call :oe:meth:`Clear<OEChem::OEMolBase::Clear>`
   on each read.

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

      .. oe:api::

         bool OEReadMDLReactionQueryFile(oemolistream& ifs, OEQMolBase& qmol,
                                         unsigned int opts = OEMDLQueryOpts::ReactionQuery)

   .. oe:language:: python

      .. oe:api:: python

         OEReadMDLReactionQueryFile(ifs: oemolistream, qmol: OEQMol, opts: int) -> bool


   Reads the contents of the MDL reaction file into the specified
   :ref:`OEQMolBase <OEChem_OEQMolBase>` object.
   The option from the :oe:constns:`OEChem::OEMDLQueryOpts` namespace
   determine how the MDL reaction is interpreted.

   .. seealso::

      .. oe:language:: c++

         * :ref:`subsection_reactions_libgen_MDL` section
         * Example program :ref:`libgen.cpp<section_example_oechem_libgen>`

      .. oe:language:: python

         * :ref:`subsection_reactions_libgen_MDL` section
         * Example program :ref:`libgen.py<section_example_oechem_libgen>`

      .. oe:language:: java

         * :ref:`subsection_reactions_libgen_MDL` section
         * Example program :ref:`LibGen.java<section_example_oechem_libgen>`

      .. oe:language:: csharp

         * :ref:`subsection_reactions_libgen_MDL` section
         * Example program :ref:`LibGen.cs<section_example_oechem_libgen>`

