:orphan:

.. _section_example_oechem_applytransform:

Performing a reaction
================================================================================

A program that uses a SMIRKS specification to perform reaction transformations on single molecules.
The :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>` class is designed to transform every instance of the reactant pattern
in the input molecules and can be useful for structure normalization activities.

Example
--------------------------------------------------------------------------------

.. oe:language:: python

   .. code-block:: console

      prompt> applytransform.py '[NH2:1]>>[Nh3+:1]' dbase.oeb.gz output.oeb.gz

Code
--------------------------------------------------------------------------------

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`applytransform.py <../../../../../wrappers/python/examples/oechem/applytransform.py>`

      .. literalinclude:: ../../../../../wrappers/python/examples/oechem/applytransform.py


   .. only:: oepdf

      .. oe:source:: applytransform.py
         :language: python

.. seealso::

   * :oe:cls:`OEUniMolecularRxn<OEChem::OEUniMolecularRxn>` class
   * :ref:`section_example_oechem_libgen` section
