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

.. oe:namespace:: OEDepict


.. _OEDepict_OEAtomSVGResidueMarkup:

.. oe:class:: OEAtomSVGResidueMarkup

   .. oe:api::

      class OEAtomSVGResidueMarkup : public OEAtomSVGMarkupBase

   This class represents the :ref:`OEAtomSVGResidueMarkup <OEDepict_OEAtomSVGResidueMarkup>` atom
   SVG markup functor.  If this functor is passed to the
   :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetAtomSVGMarkupFunctor`
   method, the atoms will be not marked in the :file:`svg` image when
   calling the :ref:`OERenderMolecule <OEDepict_OERenderMolecule>` function.

   .. seealso::

      * :ref:`chapter_svg` chapter
      * :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetAtomSVGMarkupFunctor` method
      * :ref:`OEAtomSVGAtomIdxMarkup <OEDepict_OEAtomSVGAtomIdxMarkup>` class
      * :ref:`OEAtomSVGNoMarkup <OEDepict_OEAtomSVGNoMarkup>` class

   The following methods are publicly inherited from :ref:`OEAtomSVGMarkupBase <OEDepict_OEAtomSVGMarkupBase>`:

   ==================================================================== ==================================================================== ====================================================================
   :oe:meth:`CreateCopy<OEDepict::OEAtomSVGMarkupBase::CreateCopy>`     :oe:meth:`GetClassName<OEDepict::OEAtomSVGMarkupBase::GetClassName>` :oe:meth:`GetGroupId<OEDepict::OEAtomSVGMarkupBase::GetGroupId>`
   ==================================================================== ==================================================================== ====================================================================

   .. oe:method:: Constructors

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

         .. oe:api::

            OEAtomSVGResidueMarkup(const std::string prefix = "",
                                   const std::string classname = "ligand-atom",
                                   const char separator = '-')

      .. oe:language:: python

         .. oe:api:: python

            OEAtomSVGResidueMarkup(prefix: str = "",
                                   classname: str = "ligand-atom",
                                   separator: str = '-') -> OEAtomSVGResidueMarkup

      Creates an :ref:`OEAtomSVGResidueMarkup <OEDepict_OEAtomSVGResidueMarkup>` object.

      prefix
         The string that will be added at the beginning of each atom
         :oe:cls:`group id <OEDepict::OESVGGroup>`.
         For information about valid ids see
         :oe:func:`OEDepict::OEIsValidSVGGroupId` function.
         By default, no prefix will be added.

      classname
         The :oe:cls:`class name <OEDepict::OESVGClass>` that is going to
         be used to mark atoms.  For information about valid names see
         :oe:func:`OEDepict::OEIsValidSVGClassName` function.

      separator
         The character used to separate the components
         (residue name, chain id, residue number, atom name)
         of the :oe:cls:`group id <OEDepict::OESVGGroup>`

      By default, the following will be showed in :file:`svg` image for
      marking of the first atom of  molecule ``NC(CCCNC(N)=N)C(O)=O``
      with residue information:

      By default, the :file:`svg` image for the first atom of molecule
      ``NC(CCCNC(N)=N)C(O)=O`` with residue information will be marked as
      follows:

      ::

          <g id='ARG-A-1-_N__' class='ligand-atom'>
          ..
          list of drawing elements
          ..
          <circle ... >
          </g>

      If there is no residue information attached to the atom the ``UNK``
      label will be used for the residue name. The residue information
      can be perceived by calling the :oe:func:`OEChem::OEPerceiveResidues`
      function.

      Since a valid :oe:cls:`group id <OEDepict::OESVGGroup>` can not have
      a space character, each space character of the atom name
      (returned by :oe:meth:`OEChem::OEAtomBase::GetName`) is replaces by
      an ``_`` (underline).

      The transparent circle will be drawn with the atom position
      :oe:meth:`OEDepict::OE2DAtomDisplay::GetCoords` center.
      This can be used to manipulate the generated :file:`.svg` image
      and associate event with the SVG groups.

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEAtomSVGMarkupBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEAtomSVGMarkupBase

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEAtomSVGResidueMarkup <OEDepict_OEAtomSVGResidueMarkup>`
      object is dynamically allocated and owned by the caller.

   .. oe:method:: GetClassName

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

         .. oe:api::

            std::string GetClassName(const OEChem::OEAtomBase &) const

      .. oe:language:: python

         .. oe:api:: python

            GetClassName(arg2: OEAtomBase) -> str

      Returns the string that specifies the
      :oe:cls:`group id <OEDepict::OESVGGroup>`
      of an atom in an :file:`svg` image.

   .. oe:method:: GetGroupId

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

         .. oe:api::

            std::string GetGroupId(const OEChem::OEAtomBase &) const

      .. oe:language:: python

         .. oe:api:: python

            GetGroupId(atom: OEAtomBase) -> str

      Returns the string that specifies the
      :oe:cls:`class name <OEDepict::OESVGClass>`
      of an atom in an :file:`svg` image.
