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

.. oe:function:: OECreatePeptideMonomerConnectionSmiles

   .. attention::

      |PRELIMINARY-API|

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

      .. oe:api::

         std::string OECreatePeptideMonomerConnectionSmiles(const std::string& monomerSmiles)

   .. oe:language:: python

      .. oe:api:: python

         OECreatePeptideMonomerConnectionSmiles(monomerSmiles: str) -> str

   The function identifies the backbone of the amino acid represented in the input string and
   marks the backbone connections in the output smiles:

   - the hydrogen of the amino group of the backbone will be have atom mapping ``1``
   - the oxygen of the amino acid of the backbone with be have atom mapping ``2``

   For example, in case of the input smiles ``C[C@@H](C(=O)O)N``, 
   the function will return ``[H:1]N[C@@H](C)C(=O)[OH:2]``.

   If the input smiles does not represent an amino-acid or its backbone can not be 
   identified, and empty string will be returned.

   The current implementation supports the identification of backbone connection for 
   alpha-, beta-, gamma-, and delta- amino acids. 
   However, it does not identify connection point(s) on the side chain of the amino acid.

   For example, in case of the input smiles  ``C([C@@H](C(=O)[OH:2])N)S`` representing `cystine`, 
   the function will return ``[H:1]N[C@@H](CS)C(=O)[OH:2]",`` rather than ``[H:1]N[C@@H](CS[H:3])C(=O)[OH:2]``
   where `R3` could be used to form disulfide cross-links.

   When identifying the backbone of an amino acid, backbone is always selected as the shortest path
   between identified amino and carboxylic acid groups.

   For example, in case of the input smiles ``C(CC(=O)O)[C@@H](C(=O)O)N`` representing `glutamic acid`, 
   the function will return ``[H:1]N[C@@H](CCC(=O)O)C(=O)[OH:2]``, rather than ``[H:1]N[C@@H](CCC(=O)[OH:3])C(=O)[OH:2]``
   where `R3` could be used to form isopeptide bond.

   When creating a custom monomer set, side-chain interactions of amino acids, along with the 
   identification of connection points for C- and N-terminal monomers and generic non-peptidic monomers, 
   must be specified manually.

   .. seealso::

      * :oe:func:`OEChem::OEPerceivePeptideMonomerConnections` function
      * :oe:func:`OEChem::OEMonomerConnectionSmilesFromCXSmiles` function
