.. oe:namespace:: OEChem

.. meta::
   :keywords: OEMolStyleColorer, OE3DMolStyleColorer, MolStyleColorer, StyleColorer

.. _OEChem_OEMolStyleColorer:

.. oe:class:: OEMolStyleColorer

   .. oe:api::


      class OEMolStyleColorer
      
   This class represents `OEMolStyleColorer`. 

   The :ref:`OEMolStyleColorer <OEChem_OEMolStyleColorer>` class is the abstract interface for 
   coloring a 3D molecule within *OEChem*. The :ref:`OEMolStyleColorer <OEChem_OEMolStyleColorer>` 
   is set within a :ref:`OE3DMolStyle <OEChem_OE3DMolStyle>` utilizing 
   :oe:meth:`OEChem::OE3DMolStyle::SetAtomColorer`, :oe:meth:`OEChem::OE3DMolStyle::SetAtomLabelColorer`, 
   :oe:meth:`OEChem::OE3DMolStyle::SetGridContourColorer`, :oe:meth:`OEChem::OE3DMolStyle::SetProteinColorer`, 
   :oe:meth:`OEChem::OE3DMolStyle::SetProteinColorer`, and :oe:meth:`OEChem::OE3DMolStyle::SetSurfaceColorer`. 
   The :ref:`OEMolStyleColorer <OEChem_OEMolStyleColorer>` can be applied to the initial molecule, but can also 
   applied to its conformers and atoms. The hierarchy between the different :ref:`OEMolStyleColorers <OEChem_OEMolStyleColorer>` 
   dictates that the settings specified on the atom supersede those set on the conformer, and likewise, the settings 
   specified on the conformer will override those on the molecule. 
      
   .. oe:method:: Constructors

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

         .. oe:api::

            OEMolStyleColorer()
            OEMolStyleColorer(unsigned int colorScheme)
            OEMolStyleColorer(const char* propertyName)
            OEMolStyleColorer(const OESystem::OEColor& col)
            OEMolStyleColorer(const OEMolStyleColorer& other)
            OEMolStyleColorer(const std::string& propertyName)
            OEMolStyleColorer(unsigned int colorScheme,
                              const OESystem::OEColor& defaultColor)
            OEMolStyleColorer(const char* propertyName,
                              const OESystem::OEColor& defaultColor)
            OEMolStyleColorer(const std::string& propertyName,
                              const OESystem::OEColor& defaultColor)

      .. oe:language:: python

         .. oe:api:: python

            OEMolStyleColorer() -> OEMolStyleColorer
            OEMolStyleColorer(col: OEColor) -> OEMolStyleColorer
            OEMolStyleColorer(other: OEMolStyleColorer) -> OEMolStyleColorer
            OEMolStyleColorer(colorScheme: int) -> OEMolStyleColorer
            OEMolStyleColorer(colorScheme: int, defaultColor: OEColor) -> OEMolStyleColorer
            OEMolStyleColorer(propertyName: str) -> OEMolStyleColorer
            OEMolStyleColorer(propertyName: str, defaultColor: OEColor) -> OEMolStyleColorer

      Default and copy constructors.

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

      .. oe:api::

         bool operator<(const OEMolStyleColorer &rhs) const

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

      .. oe:api::

         OEMolStyleColorer &operator=(const OEMolStyleColorer &rhs)

      Assignment operator.


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

      .. oe:api::

         bool operator==(const OEMolStyleColorer &rhs) const

   .. oe:method:: AddColor

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

         .. oe:api::

            bool AddColor(int value, const OESystem::OEColor& col)
            bool AddColor(double value, const OESystem::OEColor& col)
            bool AddColor(unsigned int value, const OESystem::OEColor& col)
            bool AddColor(const std::string& value,
                          const OESystem::OEColor& col)

      .. oe:language:: python

         .. oe:api:: python

            AddColor(value: int, col: OEColor) -> bool
            AddColor(value: float, col: OEColor) -> bool
            AddColor(value: str, col: OEColor) -> bool

      Adds OEColor to OEMolStyleColorer.

   .. oe:method:: ClearColors

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

         .. oe:api::

            void ClearColors()

      .. oe:language:: python

         .. oe:api:: python

            ClearColors() -> None

      Clears all of the color maps in the OEMolStyleColorer.

   .. oe:method:: GetColor

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

         .. oe:api::

            OESystem::OEColor GetColor() const
            OESystem::OEColor GetColor(int val) const
            OESystem::OEColor GetColor(double val) const
            OESystem::OEColor GetColor(unsigned int val) const
            OESystem::OEColor GetColor(const std::string& val) const
            OESystem::OEColor GetColor(double val, double scaleMin,
                                       double scaleMax) const

      .. oe:language:: python

         .. oe:api:: python

            GetColor() -> OEColor
            GetColor(val: int) -> OEColor
            GetColor(val: float) -> OEColor
            GetColor(val: str) -> OEColor
            GetColor(val: float, scaleMin: float, scaleMax: float) -> OEColor

      Returns a OEColor set in the OEMolStyleColorer. The function with no arguments will 
      return the default color set in the OEMolStyleColorer. The functions with arguments 
      will search for the color in the repected map based of the inputted value.

   .. oe:method:: GetColorScheme

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

         .. oe:api::

            unsigned int GetColorScheme() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorScheme() -> int

      Returns a integer that specifies the color scheme set in the OEMolStyleColorer.

   .. oe:method:: GetDataTypes

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

         .. oe:api::

            unsigned int GetDataTypes() const

      .. oe:language:: python

         .. oe:api:: python

            GetDataTypes() -> int

      Returns a integer that specifies the data type set in the OEMolStyleColorer.

   .. oe:method:: GetDefaultColor

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

         .. oe:api::

            OESystem::OEColor GetDefaultColor() const

      .. oe:language:: python

         .. oe:api:: python

            GetDefaultColor() -> OEColor

      Returns the OEColor set as the default color in the OEMolStyleColorer.

   .. oe:method:: GetNumColors

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

         .. oe:api::

            unsigned int GetNumColors() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumColors() -> int

      Returns the number of colors set in all of the maps of the OEMolStyleColorer.

   .. oe:method:: GetPropertyName

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

         .. oe:api::

            std::string GetPropertyName() const

      .. oe:language:: python

         .. oe:api:: python

            GetPropertyName() -> str

      Returns a string that specifies the color scheme name set in the OEMolStyleColorer.

   .. oe:method:: GetValues

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

         .. oe:api::

            bool GetValues(std::vector<int>& vals) const
            bool GetValues(std::vector<double>& vals) const
            bool GetValues(std::vector<std::string>& vals) const

      .. oe:language:: python

         .. oe:api:: python

            GetValues(vals: OEIntVector) -> bool
            GetValues(vals: OEDoubleVector) -> bool
            GetValues(vals: OEStringVector) -> bool

      Returns a boolean indicating if the specified map has any data. The map that is 
      searched is indicated by the data being stored in the vector. This data is pushed 
      into the reference vector.

   .. oe:method:: SetDefaultColor

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

         .. oe:api::

            void SetDefaultColor(const OESystem::OEColor& col)

      .. oe:language:: python

         .. oe:api:: python

            SetDefaultColor(col: OEColor) -> None

      Sets an OEColor as the default color in the OEMolStyleColorer.

   .. seealso::

         * :ref:`OE3DMolStyle <OEChem_OE3DMolStyle>`

