.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEHighlightByBallAndStick, HighlightByBallAndStick


.. _OEDepict_OEHighlightByBallAndStick:

.. oe:class:: OEHighlightByBallAndStick

   .. oe:api::

      class OEHighlightByBallAndStick : public OEHighlightBase

   The :ref:`OEHighlightByBallAndStick <OEDepict_OEHighlightByBallAndStick>` class allows the
   customization of the **ball and stick** highlighting style that is
   associated with the :oe:const:`OEDepict::OEHighlightStyle::BallAndStick`
   constant.
   See example in :ref:`Figure: Example of highlighting using the
   'ball and stick' style<figure_OEHighlightStyle_BallAndStick>`.

   .. _figure_OEHighlightStyle_BallAndStick:

   .. figure:: ../images/OEHighlightStyle_BallAndStick.*
      :align:  center

      **Example of highlighting using the 'ball and stick' style**

   The :ref:`OEHighlightByBallAndStick <OEDepict_OEHighlightByBallAndStick>` class stores the following properties:

   .. list-table::
      :widths: 100 100 100 150
      :header-rows: 1

      * - Property
        - Get method
        - Set method
        - Corresponding namespace / class / type

      * - atom label
        - :oe:meth:`GetAtomLabelMonochrome<OEDepict::OEHighlightByBallAndStick::GetAtomLabelMonochrome>`
        - :oe:meth:`SetAtomLabelMonochrome<OEDepict::OEHighlightByBallAndStick::SetAtomLabelMonochrome>`
        - boolean

      * - ball radius scale
        - :oe:meth:`GetBallRadiusScale<OEDepict::OEHighlightByBallAndStick::GetBallRadiusScale>`
        - :oe:meth:`SetBallRadiusScale<OEDepict::OEHighlightByBallAndStick::SetBallRadiusScale>`
        - floating point number

      * - color
        - :oe:meth:`GetColor<OEDepict::OEHighlightByBallAndStick::GetColor>`
        - :oe:meth:`SetColor<OEDepict::OEHighlightByBallAndStick::SetColor>`
        - :ref:`OEColor <OESystem_OEColor>`

      * - stick width scale
        - :oe:meth:`GetStickWidthScale<OEDepict::OEHighlightByBallAndStick::GetStickWidthScale>`
        - :oe:meth:`SetStickWidthScale<OEDepict::OEHighlightByBallAndStick::SetStickWidthScale>`
        - floating point number

   .. seealso::

      * :oe:func:`OEDepict::OEAddHighlighting` function
      * :oe:constns:`OEDepict::OEHighlightStyle` namespace
      * :ref:`OEHighlightByColor <OEDepict_OEHighlightByColor>` class
      * :ref:`OEHighlightByCogwheel <OEDepict_OEHighlightByCogwheel>` class
      * :ref:`OEHighlightByLasso <OEDepict_OEHighlightByLasso>` class
      * :ref:`OEHighlightByStick <OEDepict_OEHighlightByStick>` class
      * :ref:`chapter_highlighting` chapter

   .. oe:method:: Constructors

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

         .. oe:api::

            OEHighlightByBallAndStick(const OESystem::OEColor& c,
                                      double stickWidthScale = 3.0,
                                      double ballRadiusScale = 3.0,
                                      bool monochrome = true)

      .. oe:language:: python

         .. oe:api:: python

            OEHighlightByBallAndStick(color: OEColor,
                                      stickWidthScale: float = 3.0,
                                      ballRadiusScale: float = 3.0,
                                      monochrome: bool = True) -> OEHighlightByBallAndStick

      Creates an :ref:`OEHighlightByBallAndStick <OEDepict_OEHighlightByBallAndStick>` object with the
      specified parameters.

      *color*
         The color used for highlighting.
         See also :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetColor` method.

      *stickWidthScale*
         The multiplier that can be used to increase or decrease
         the stick width of the highlighted bond(s).
         See also :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetStickWidthScale` method.

      *ballRadiusScale*
         The multiplier that can be used to increase or decrease
         the ball radius of the highlighted atom(s).
         See also :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetBallRadiusScale` method.

      *monochrome*
         Defines whether or not to change the color of the atom label
         of the highlighted atom(s).
         See also :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetAtomLabelMonochrome` method.


      .. ################################################################

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

         .. oe:api::

            OEHighlightByBallAndStick(const OEHighlightByBallAndStick& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEHighlightByBallAndStick(rhs: OEHighlightByBallAndStick) -> OEHighlightByBallAndStick

      Copy constructor.


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

      .. oe:api::

         OEHighlightByBallAndStick &operator=(const OEHighlightByBallAndStick &rhs)

      Assignment operator.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEHighlightBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEHighlightByBallAndStick

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


   .. oe:method:: GetAtomLabelMonochrome

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

         .. oe:api::

            bool GetAtomLabelMonochrome() const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomLabelMonochrome() -> bool

      Returns whether or not the color of the atom label of the highlighted
      atom(s) is changed.

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetAtomLabelMonochrome` method


   .. oe:method:: GetBallRadiusScale

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

         .. oe:api::

            double GetBallRadiusScale() const

      .. oe:language:: python

         .. oe:api:: python

            GetBallRadiusScale() -> float

      Returns the multiplier that can be used to increase or decrease
      the ball radius of the highlighted atom(s).

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetBallRadiusScale` method


   .. oe:method:: GetColor

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

         .. oe:api::

            const OESystem::OEColor& GetColor() const

      .. oe:language:: python

         .. oe:api:: python

            GetColor() -> OEColor

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetColor` method
         * :ref:`OEColor <OESystem_OEColor>` class


   .. oe:method:: GetStickWidthScale

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

         .. oe:api::

            double GetStickWidthScale() const

      .. oe:language:: python

         .. oe:api:: python

            GetStickWidthScale() -> float

      Returns the multiplier that can be used to increase or decrease
      the stick width of the highlighted bond(s).

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::SetStickWidthScale` method


   .. oe:method:: SetAtomLabelMonochrome

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

         .. oe:api::

            void SetAtomLabelMonochrome(bool monochrome)

      .. oe:language:: python

         .. oe:api:: python

            SetAtomLabelMonochrome(monochrome: bool) -> None

      Sets whether or not to change the color of the atom label
      of the highlighted atom(s).

      Example (:ref:`Figure: Example of using the SetAtomLabelMonochrome method<figure_OEHighlightByBallAndStick_SetAtomLabelMonochrome>`)

      .. oe:source:: HighlightByBallAndStick.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETATOMLABELMONOCHROME

      .. oe:source:: HighlightByBallAndStick.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETATOMLABELMONOCHROME

      .. oe:source:: HighlightByBallAndStick.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETATOMLABELMONOCHROME

      .. oe:source:: HighlightByBallAndStick.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETATOMLABELMONOCHROME


      .. _figure_OEHighlightByBallAndStick_SetAtomLabelMonochrome:

      .. figure:: ../images/OEHighlightByBallAndStick_SetAtomLabelMonochrome.*
         :align:  center

         **Example of using the SetAtomLabelMonochrome method**

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::GetAtomLabelMonochrome` method


   .. oe:method:: SetBallRadiusScale

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

         .. oe:api::

            void SetBallRadiusScale(double ballRadiusScale)

      .. oe:language:: python

         .. oe:api:: python

            SetBallRadiusScale(ballRadiusScale: float) -> None

      Sets the multiplier that can be used to increase or decrease
      the ball radius of the highlighted atom(s).

      Example (:ref:`Figure: Example of using the SetBallRadiusScale method<figure_OEHighlightByBallAndStick_SetBallRadiusScale>`)

      .. oe:source:: HighlightByBallAndStick.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETBALLRADIUSSCALE

      .. oe:source:: HighlightByBallAndStick.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETBALLRADIUSSCALE

      .. oe:source:: HighlightByBallAndStick.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETBALLRADIUSSCALE

      .. oe:source:: HighlightByBallAndStick.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETBALLRADIUSSCALE


      .. _figure_OEHighlightByBallAndStick_SetBallRadiusScale:

      .. figure:: ../images/OEHighlightByBallAndStick_SetBallRadiusScale.*
         :align:  center

         **Example of using the SetBallRadiusScale method**

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::GetBallRadiusScale` method


   .. oe:method:: SetColor

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

         .. oe:api::

            void SetColor(const OESystem::OEColor& color)

      .. oe:language:: python

         .. oe:api:: python

            SetColor(color: OEColor) -> None

      Sets the color of the highlighting.

      Example (:ref:`Figure: Example of using the SetColor method<figure_OEHighlightByBallAndStick_SetColor>`)

      .. oe:source:: HighlightByBallAndStick.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETCOLOR

      .. oe:source:: HighlightByBallAndStick.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETCOLOR

      .. oe:source:: HighlightByBallAndStick.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETCOLOR

      .. oe:source:: HighlightByBallAndStick.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETCOLOR


      .. _figure_OEHighlightByBallAndStick_SetColor:

      .. figure:: ../images/OEHighlightByBallAndStick_SetColor.*
         :align:  center

         **Example of using the SetColor method**

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::GetColor` method
         * :ref:`OEColor <OESystem_OEColor>` class


   .. oe:method:: SetStickWidthScale

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

         .. oe:api::

            void SetStickWidthScale(double stickWidthScale)

      .. oe:language:: python

         .. oe:api:: python

            SetStickWidthScale(stickWidthScale: float) -> None

      Sets the multiplier that can be used to increase or decrease
      the stick width of the highlighted bond(s).

      Example (:ref:`Figure: Example of using the SetStickWidthScale method<figure_OEHighlightByBallAndStick_SetStickWidthScale>`)

      .. oe:source:: HighlightByBallAndStick.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETSTICKWIDTHSCALE

      .. oe:source:: HighlightByBallAndStick.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETSTICKWIDTHSCALE

      .. oe:source:: HighlightByBallAndStick.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETSTICKWIDTHSCALE

      .. oe:source:: HighlightByBallAndStick.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEHIGHLIGHTBYBALLANDSTICK-SETSTICKWIDTHSCALE


      .. _figure_OEHighlightByBallAndStick_SetStickWidthScale:

      .. figure:: ../images/OEHighlightByBallAndStick_SetStickWidthScale.*
         :align:  center

         **Example of using the SetStickWidthScale method**

      .. seealso::

         * :oe:meth:`OEDepict::OEHighlightByBallAndStick::GetStickWidthScale` method
