.. # split from OEMedChemFunctions.rst:90

.. ################################################################
   #
   ################################################################

.. oe:namespace:: OEMedChem

.. meta::
   :keywords: OEApplyChEMBL24SolubilityTransforms ApplyChEMBL24SolubilityTransforms

.. oe:function:: OEApplyChEMBL24SolubilityTransforms

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

      .. oe:api::

         OESystem::OEIterBase<OEChem::OEMolBase>* OEApplyChEMBL24SolubilityTransforms(OEChem::OEMolBase& input,
                                                                                      int context = OEMatchedPairContext::Bond2,
                                                                                      unsigned int requireNumPairs = 5u)

   .. oe:language:: python

      .. oe:api:: python

         OEApplyChEMBL24SolubilityTransforms(input: Union[OEGraphMol,OEMol,OEQMol],
                                             context: int,
                                             requireNumPairs: int = 5) -> Iterable[Union[OEGraphMol, OEMol, OEQMol]]

   Given an input molecule, apply transformations derived from solubility data obtained from the
   [ChEMBL24-2018]_ database. The context argument controls the amount of chemistry information
   that should be included for the transformation reaction, see :oe:constns:`OEMedChem::OEMatchedPairContext`.
   This function supports only the :oe:const:`OEMedChem::OEMatchedPairContext::Bond0` or
   :oe:const:`OEMedChem::OEMatchedPairContext::Bond2` context values.  The ``minMMPThreshold`` argument will only
   apply transformations that meet or exceed the specified number of matched pairs.  Use a ``minMMPThreshold``
   value of ``0`` to apply all transformations regardless of the number of matched pairs associated with them.

   .. note::

      This function does not perform any validation or filtering on the input molecule to be transformed.
      The caller is expected to perform validity and/or size checking to ensure sensible inputs are provided.

   In the examples below, the input structures are transformed by the ChEMBL solubility transforms and exported
   to a file format that supports SD data.  Each transformed structure will contain information about the
   solubility transform (as SMIRKS) that generated it, and the matched pair information associated with each
   transform (ChEMBL identifiers and solubility data).  The added annotation data will contain the data fields,
   ``OEMMP_normalized_value (uM)``, ``OEMMP_published_value``, ``OEMMP_examples (SMILES)``, and ``OEMMP_transform (SMILES)``
   for subsequent analysis.

   .. oe:source:: ChEMBLSolubilityUsage.cpp
      :language: c++
      :frag:     SNIPPET-OEAPPLYCHEMBLSOLUBILITY-EXAMPLE

   .. oe:source:: ChEMBLSolubilityUsage.py
      :language: python
      :frag:     SNIPPET-OEAPPLYCHEMBLSOLUBILITY-EXAMPLE

   .. oe:source:: ChEMBLSolubilityUsage.java
      :language: java
      :frag:     SNIPPET-OEAPPLYCHEMBLSOLUBILITY-EXAMPLE

   .. oe:source:: ChEMBLSolubilityUsage.cs
      :language: csharp
      :frag:     SNIPPET-OEAPPLYCHEMBLSOLUBILITY-EXAMPLE

