OEMolStyleColorer¶
class OEMolStyleColorer
This class represents OEMolStyleColorer.
The OEMolStyleColorer class is the abstract interface for
coloring a 3D molecule within OEChem. The OEMolStyleColorer
is set within a OE3DMolStyle utilizing
OE3DMolStyle.SetAtomColorer
, OE3DMolStyle.SetAtomLabelColorer
,
OE3DMolStyle.SetGridContourColorer
, OE3DMolStyle.SetProteinColorer
,
OE3DMolStyle.SetProteinColorer
, and OE3DMolStyle.SetSurfaceColorer
.
The OEMolStyleColorer can be applied to the initial molecule, but can also
applied to its conformers and atoms. The hierarchy between the different OEMolStyleColorers
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.
Constructors¶
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)
Default and copy constructors.
operator<¶
bool operator<(const OEMolStyleColorer &rhs) const
operator=¶
OEMolStyleColorer &operator=(const OEMolStyleColorer &rhs)
operator==¶
bool operator==(const OEMolStyleColorer &rhs) const
AddColor¶
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)
Adds OEColor to OEMolStyleColorer.
GetColor¶
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
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.
GetColorScheme¶
unsigned int GetColorScheme() const
Returns a integer that specifies the color scheme set in the OEMolStyleColorer.
GetDataTypes¶
unsigned int GetDataTypes() const
Returns a integer that specifies the data type set in the OEMolStyleColorer.
GetDefaultColor¶
OESystem::OEColor GetDefaultColor() const
Returns the OEColor set as the default color in the OEMolStyleColorer.
GetNumColors¶
unsigned int GetNumColors() const
Returns the number of colors set in all of the maps of the OEMolStyleColorer.
GetPropertyName¶
std::string GetPropertyName() const
Returns a string that specifies the color scheme name set in the OEMolStyleColorer.
GetValues¶
bool GetValues(std::vector<int> &vals) const
bool GetValues(std::vector<double> &vals) const
bool GetValues(std::vector<std::string> &vals) const
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.
SetDefaultColor¶
void SetDefaultColor(const OESystem::OEColor &col)
Sets an OEColor as the default color in the OEMolStyleColorer.
See also