.. oe:language:: python java csharp

.. oe:namespace:: OEChem

.. meta::
   :keywords: OESetOEGraphMol

.. oe:function:: OESetOEGraphMol

   .. oe:language:: java

      .. oe:api:: java

         boolean OESetOEGraphMol(OEBase obj, String tag, OEGraphMol mol)

   .. oe:language:: python

      .. oe:api:: python

         OESetOEGraphMol(obj, tag, mol)

   .. oe:language:: csharp

      .. oe:api:: csharp

         boolean OESetOEGraphMol(OEBase obj, String tag, OEGraphMol mol)

   .. oe:language:: csharp java python

      Attaches a copy of the :ref:`OEGraphMol <OEChem_OEGraphMol>` ``mol`` to
      the :ref:`OEBase <OESystem_OEBase>` ``obj`` using the ``tag`` as
      :ref:`generic data<chapter_genericdata>`.

      .. oe:language:: python

         .. note::

            Python toolkit users can use ``obj.SetData(tag, mol)``
            directly.

      .. seealso::

         * The :ref:`section_attaching_other_objects` section for example code
         * :oe:func:`OEChem::OEGetOEGraphMol`

   .. oe:language:: c++

      This function is provided in CSharp, Java and Python wrappers and
      is not needed in C++.  Use the templated
      :oe:meth:`OESystem::OEBaseDataT::SetData` method instead.
