.. include:: ../../common/cookbook/cookbook-hyperlinks
.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEGrapheme


.. _OEGrapheme_OERamachandranPlot:

.. oe:class:: OERamachandranPlot

   .. oe:api::

      class OERamachandranPlot

   This class represents :ref:`OERamachandranPlot <OEGrapheme_OERamachandranPlot>` that stores
   data of a Ramachandran plot.

   .. only:: oehtml

      .. raw:: html

         <p align="center">
         <object data="../../_images/RenderRamachandranPlot.svg" type="image/svg+xml"  width = "400" ></object>
         <p>

         <p align="center">
         <b>Example of OERamachandranPlot depiction</b>
         <p>

      .. image:: ../images/RenderRamachandranPlot.svg
         :width: 1pt

   .. only:: oepdf

      |NOPDFIMAGE|

   .. seealso::

      * :oe:func:`OEGrapheme::OERenderRamachandranPlot` function
      * :ref:`OERamachandranAnalysis <OEBio_OERamachandranAnalysis>` class in **OEChem TK** manual

   .. admonition:: Code Example

      * `Ramachandran Plot`_ **OpenEye Python Cookbook** recipe

   .. ################################################################
      # Constructors
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OERamachandranPlot()

      .. oe:language:: python

         .. oe:api:: python

            OERamachandranPlot() -> OERamachandranPlot

      Default constructor that creates an empty :ref:`OERamachandranPlot <OEGrapheme_OERamachandranPlot>` object.

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

         .. oe:api::

            OERamachandranPlot(const OERamachandranPlot& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OERamachandranPlot(rhs: OERamachandranPlot) -> OERamachandranPlot

      Copy constructor.

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

      .. oe:api::

         OERamachandranPlot &operator=(const OERamachandranPlot &rhs)

      Assignment operator.


   .. oe:method:: AddMolecule

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

         .. oe:api::

            bool AddMolecule(const OEChem::OEMolBase& mol)

      .. oe:language:: python

         .. oe:api:: python

            AddMolecule(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Adds the molecule to the plot with default style.

      *mol*
         The macro-peptide of which backbone dihedral phi (:math:`\phi`) and
         psi (:math:`\psi`) angle pairs are added to the plot.
         The residues of the molecule have to be perceived beforehand.

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

         .. oe:api::

            bool AddMolecule(const OEChem::OEMolBase& mol,
                             const OEPlotMarker& outmarker,
                             const OEPlotMarker& inmarker)

      .. oe:language:: python

         .. oe:api:: python

            AddMolecule(mol: Union[OEGraphMol,OEMol,OEQMol],
                        outmarker: OEPlotMarker, inmarker: OEPlotMarker) -> bool

      Adds the mol to the plot with the given style.

      *mol*
         The macro-peptide of which backbone dihedral phi (:math:`\phi`) and
         psi (:math:`\psi`) angle pairs are added to the plot.
         The residues of the molecule have to be perceived beforehand.

      *outmarker*
         The style that is used to render data points with
         :oe:const:`OEBio::OERamaCategory::Outlier` category.

      *inmarker*
         The style that is used to render data points with
         :oe:const:`OEBio::OERamaCategory::Favored` or
         :oe:const:`OEBio::OERamaCategory::Allowed` category.


   .. oe:method:: AddRamachandran

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

         .. oe:api::

            bool AddRamachandran(const OEBio::OERamachandranAnalysis& rama,
                                 const std::string& label,
                                 const OEPlotMarker& marker)

      .. oe:language:: python

         .. oe:api:: python

            AddRamachandran(rama: OERamachandranAnalysis, label: str,
                            marker: OEPlotMarker) -> bool

      Adds the data of the given :ref:`OERamachandranAnalysis <OEBio_OERamachandranAnalysis>` object
      to the plot with the given style and interactive label.

      *rama*
         The :ref:`OERamachandranAnalysis <OEBio_OERamachandranAnalysis>` object

      *label*
         The label that will be displayed in hover mode if the
         (:math:`\phi`, :math:`\psi`) value pair stored in the
         :ref:`OERamachandranAnalysis <OEBio_OERamachandranAnalysis>` object is an
         outlier.

      *marker*
         The style that is used to render the data point on the plot.

      .. seealso::

         * :ref:`OERamachandranAnalysis <OEBio_OERamachandranAnalysis>` class


   .. oe:method:: NumDataPoints

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

         .. oe:api::

            unsigned int NumDataPoints(unsigned int ramatype,
                                       unsigned int category) const

      .. oe:language:: python

         .. oe:api:: python

            NumDataPoints(ramatype: int, category: int) -> int

      Returns the number of data points stored in the :ref:`OERamachandranPlot <OEGrapheme_OERamachandranPlot>`
      object with the given type and category.

      *ramatype*
         This value has to be from the :oe:constns:`OEBio::OERamaType`
         namespace.

      *category*
         This value has to be from the :oe:constns:`OEBio::OERamaCategory`
         namespace.
