.. include:: ../../toolkit-substitutions
    
.. oe:namespace:: OEChem

.. oe:function:: OEGetHelmMonomerCodes

   .. attention::

      |PRELIMINARY-API|

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

      .. oe:api::

         std::vector<std::string> OEGetHelmMonomerCodes(const std::string& helm)
         std::vector<std::string> OEGetHelmMonomerCodes(const std::string& helm,
                                                        const std::string& chainName)

   .. oe:language:: python

      .. oe:api:: python

         OEGetHelmMonomerCodes(helm: str) -> OEStringVector
         OEGetHelmMonomerCodes(helm: str, chainName: str) -> OEStringVector

   Returns the monomer codes present in the given :term:`HELM` string.
   
   For example, in case of input  ``"PEPTIDE1{F.A}|CHEM1{[Fmoc]}$PEPTIDE1,CHEM1,1:R1-1:R1$$$"``
   it will return ``F``, ``A`` and ``Fmoc``. If a chain name is specified only monomer codes present
   in that chain are returned.  For example, in case of ``PEPTIDE1`` it will only return ``F`` abd ``A``.

   .. warning::

      The :oe:func:`OEChem::OEGetHelmMonomerCodes` function does not perform full validation or parsing of the :term:`HELM` string. 
      It is intended for quickly extracting information from an already validated :term:`HELM`.

   .. seealso::

      * :oe:func:`OEChem::OEGetHelmChainNames` function 
      * :oe:func:`OEChem::OEHelmToMol` function