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.

../../_images/OEHighlightStyle_BallAndStick.png

Example of highlighting using the ‘ball and stick’ style

The OEHighlightByBallAndStick class stores the following properties:

Property

Get method

Set method

Corresponding namespace / class / type

atom label

GetAtomLabelMonochrome

SetAtomLabelMonochrome

boolean

ball radius scale

GetBallRadiusScale

SetBallRadiusScale

floating point number

color

GetColor

SetColor

OEColor

stick width scale

GetStickWidthScale

SetStickWidthScale

floating point number

Constructors

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

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.

ballRadiusScale

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(rhs: OEHighlightByBallAndStick) -> OEHighlightByBallAndStick

Copy constructor.

CreateCopy

CreateCopy() -> OEHighlightByBallAndStick

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

GetAtomLabelMonochrome() -> bool

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

GetBallRadiusScale

GetBallRadiusScale() -> float

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

GetColor

GetColor() -> OEColor

GetStickWidthScale

GetStickWidthScale() -> float

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

SetAtomLabelMonochrome

SetAtomLabelMonochrome(monochrome: bool) -> None

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

Example (Figure: Example of using the SetAtomLabelMonochrome method)

highlight = oedepict.OEHighlightByBallAndStick(oechem.OEPinkTint)
highlight.SetAtomLabelMonochrome(False)
../../_images/OEHighlightByBallAndStick_SetAtomLabelMonochrome.png

Example of using the SetAtomLabelMonochrome method

SetBallRadiusScale

SetBallRadiusScale(ballRadiusScale: float) -> None

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

Example (Figure: Example of using the SetBallRadiusScale method)

highlight = oedepict.OEHighlightByBallAndStick(oechem.OEPinkTint)
highlight.SetBallRadiusScale(4.0)
../../_images/OEHighlightByBallAndStick_SetBallRadiusScale.png

Example of using the SetBallRadiusScale method

SetColor

SetColor(color: OEColor) -> None

Sets the color of the highlighting.

Example (Figure: Example of using the SetColor method)

highlight.SetColor(oechem.OEPinkTint)
../../_images/OEHighlightByBallAndStick_SetColor.png

Example of using the SetColor method

SetStickWidthScale

SetStickWidthScale(stickWidthScale: float) -> None

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

Example (Figure: Example of using the SetStickWidthScale method)

highlight = oedepict.OEHighlightByBallAndStick(oechem.OEPinkTint)
highlight.SetStickWidthScale(5.0)
../../_images/OEHighlightByBallAndStick_SetStickWidthScale.png

Example of using the SetStickWidthScale method