# OEHighlightByBallAndStick¶

class OEHighlightByBallAndStick : public OEHighlightBase


The OEHighlightByBallAndStick class allows the customization of the ball and stick highlighting style that is associated with the OEHighlightStyle_BallAndStick constant. See example in Figure: Example of highlighting using the ‘ball and stick’ style.

Example of highlighting using the ‘ball and stick’ style

## Constructors¶

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


Creates an OEHighlightByBallAndStick object with the specified parameters.

color
The color used for highlighting. See also OEHighlightByBallAndStick.SetColor method.
stickWidthScale
The multiplier that can be used to increase or decrease the stick width of the highlighted bond(s). See also OEHighlightByBallAndStick.SetStickWidthScale method.
The multiplier that can be used to increase or decrease the ball radius of the highlighted atom(s). See also OEHighlightByBallAndStick.SetBallRadiusScale method.
monochrome
Defines whether or not to change the color of the atom label of the highlighted atom(s). See also OEHighlightByBallAndStick.SetAtomLabelMonochrome method.
OEHighlightByBallAndStick(const OEHighlightByBallAndStick &rhs)


Copy constructor.

## operator=¶

OEHighlightByBallAndStick &operator=(const OEHighlightByBallAndStick &rhs)


Assignment operator.

## CreateCopy¶

OEHighlightBase *CreateCopy() const


Deep copy constructor that returns a copy of the object. The memory for the returned OEHighlightByBallAndStick object is dynamically allocated and owned by the caller.

## GetAtomLabelMonochrome¶

bool GetAtomLabelMonochrome() const


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

double GetBallRadiusScale() const


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

## GetColor¶

const OESystem::OEColor &GetColor() const


## GetStickWidthScale¶

double GetStickWidthScale() const


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

## SetAtomLabelMonochrome¶

void SetAtomLabelMonochrome(bool monochrome)


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

highlight = OEHighlightByBallAndStick(OEPinkTint)
highlight.SetAtomLabelMonochrome(False)


Example of using the SetAtomLabelMonochrome method

void SetBallRadiusScale(double ballRadiusScale)


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

highlight = OEHighlightByBallAndStick(OEPinkTint)


Example of using the SetBallRadiusScale method

## SetColor¶

void SetColor(const OESystem::OEColor &color)


Sets the color of the highlighting.

highlight.SetColor(OEPinkTint)


Example of using the SetColor method

## SetStickWidthScale¶

void SetStickWidthScale(double stickWidthScale)


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

highlight = OEHighlightByBallAndStick(OEPinkTint)
highlight.SetStickWidthScale(5.0)


Example of using the SetStickWidthScale method