.. include:: ../../toolkit-substitutions

.. oe:namespace:: OESpruce



.. _OESpruce_OEHeterogenMetadata:

.. oe:class:: OEHeterogenMetadata

   .. attention::

      |TWOLANGUAGE|

   .. oe:api::


      class OEHeterogenMetadata

   This class stores metadata for a heterogen molecule, including its title, ID,
   SMILES representation, heterogen type (as defined in the
   :oe:constns:`OESpruce::OEHeterogenType` namespace), and any user-specified
   tautomers. A map of ``OEHeterogenMetadata`` objects keyed by SMILES can be
   passed to :oe:func:`OESpruce::OEProtonateDesignUnit` to guide protonation of
   specific heterogen components.
   
   The title is the string used to map to the name in the molecule file, 
   historically a 3-character string in PDB file format e.g. LIG, 5HA (from wwPDB 3TPP), 
   but can now be a 5 character string using the new mmCIF format 
   and updated wwPDB conventions.
   
   The ID is meant for users who want to then title the ligand molecule, the 
   ligand name in the design unit title and output design unit filenames with 
   an internal compound ID, e.g. "OE-000123".


   .. oe:method:: Constructors

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

         .. oe:api::

            OEHeterogenMetadata()
            OEHeterogenMetadata(const OEHeterogenMetadata &)

      .. oe:language:: python

         .. oe:api:: python

            OEHeterogenMetadata() -> OEHeterogenMetadata
            OEHeterogenMetadata(arg2: OEHeterogenMetadata) -> OEHeterogenMetadata

      Default and copy constructors.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEHeterogenMetadata &operator=(const OEHeterogenMetadata &)

      Assignment operator.

   .. oe:method:: AddTautomer

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

         .. oe:api::

            void AddTautomer(const std::string& tautomer)

      .. oe:language:: python

         .. oe:api:: python

            AddTautomer(tautomer: str) -> None

      Add a tautomer using a Smiles string.

   .. oe:method:: AddTautomers

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

         .. oe:api::

            void AddTautomers(const std::vector<std::string>& tautomers)

      .. oe:language:: python

         .. oe:api:: python

            AddTautomers(tautomers: OEStringVector) -> None

      Add a set of tautomers of the ligand using a `std::vector` of Smiles strings.

   .. oe:method:: ClearTautomers

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

         .. oe:api::

            void ClearTautomers()

      .. oe:language:: python

         .. oe:api:: python

            ClearTautomers() -> None

      Clears all tautomer strings.

   .. oe:method:: GetID

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

         .. oe:api::

            std::string GetID() const

      .. oe:language:: python

         .. oe:api:: python

            GetID() -> str

      Returns the stored ID string for the ligand.

   .. oe:method:: GetSmiles

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

         .. oe:api::

            std::string GetSmiles() const

      .. oe:language:: python

         .. oe:api:: python

            GetSmiles() -> str

      Returns the stored Smiles string for the ligand.

   .. oe:method:: GetTautomers

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

         .. oe:api::

            std::vector<std::string>& GetTautomers()
            const std::vector<std::string>& GetTautomers() const

      .. oe:language:: python

         .. oe:api:: python

            GetTautomers() -> OEStringVector

      Returns a reference of the set of stored tautomers for the ligand.

   .. oe:method:: GetTitle

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

         .. oe:api::

            std::string GetTitle() const

      .. oe:language:: python

         .. oe:api:: python

            GetTitle() -> str

      Returns the ligand's title.

   .. oe:method:: GetType

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

         .. oe:api::

            unsigned GetType() const

      .. oe:language:: python

         .. oe:api:: python

            GetType() -> int

      Returns the type of heterogen of the ligand as defined in the :oe:constns:`OESpruce::OEHeterogenType` namespace.

   .. oe:method:: SetID

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

         .. oe:api::

            void SetID(const std::string id)

      .. oe:language:: python

         .. oe:api:: python

            SetID(id: str) -> None

      Sets a string of the ligand's ID.

   .. oe:method:: SetSmiles

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

         .. oe:api::

            void SetSmiles(const std::string smiles)

      .. oe:language:: python

         .. oe:api:: python

            SetSmiles(smiles: str) -> None

      Sets the Smiles string for the ligand.

   .. oe:method:: SetTitle

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

         .. oe:api::

            void SetTitle(const std::string title)

      .. oe:language:: python

         .. oe:api:: python

            SetTitle(title: str) -> None

      Sets the ligand's title.

   .. oe:method:: SetType

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

         .. oe:api::

            void SetType(const unsigned type)

      .. oe:language:: python

         .. oe:api:: python

            SetType(type: int) -> None

      Sets the type of heterogen of the ligand as defined in the :oe:constns:`OESpruce::OEHeterogenType` namespace.
