.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OESetPDBData

.. oe:function:: OESetPDBData

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

      .. oe:api::

         bool OESetPDBData(OEMolBase& mol, const OESDDataPair& dp)
         bool OESetPDBData(OEMolBase& mol, const std::string& tag,
                           const std::string& value)

   .. oe:language:: python

      .. oe:api:: python

         OESetPDBData(mol: Union[OEGraphMol,OEMol,OEQMol], dp: OESDDataPair) -> bool
         OESetPDBData(mol: Union[OEGraphMol,OEMol,OEQMol], tag: str, value: str) -> bool

   Sets a PDB tag and value data pair to a molecule. Both the tag and the value must be a string.
   If an item with the same tag already exists, it is replaced with the new value.

   .. seealso::

      * :oe:func:`OEChem::OEAddPDBData` function to add multiple PDB data
      * :ref:`section_moltaggeddata_PDB` section

   .. note::

      Unicode characters are not supported neither in the data tag nor in the data value.
