ProteinMotion
Reference navigation
On this page

RegionAnimate

Create styling animations through region.animate.

python
from proteinmotion.styling import RegionAnimate

Constructor

python
RegionAnimate(region)

Parameters

ParameterDefaultDescription
regionRequiredRegion selection attached to a protein.

Notes

set_color() returns Colorize; set_opacity() returns SetOpacity. Their keyword options include residue_delay, reverse, and easing.

Methods and properties

NameDescription
set_color()methodApply a tint across all representations. None restores the base palette.
set_opacity()methodSet or animate opacity in [0, 1].
show_atoms()methodShow ball-and-stick detail over the active representation. Chained animations may also change color, opacity, or transforms.
hide_atoms()methodHide ball-and-stick detail while retaining the active representation.
python
RegionAnimate.set_color(color, **kwargs)

Apply a tint across all representations. None restores the base palette.

ParameterDefaultDescription
colorRequiredHex color or RGB values. For tint setters, None restores the representation’s base palette.
**kwargs—Additional keyword options described below or in the linked constructor.

Returns: The object or a Colorize animation.

python
RegionAnimate.set_opacity(opacity, **kwargs)

Set or animate opacity in [0, 1].

ParameterDefaultDescription
opacityRequiredOpacity in [0, 1], from transparent to opaque.
**kwargs—Additional keyword options described below or in the linked constructor.

Returns: The object or animation builder.

python
RegionAnimate.show_atoms(**kwargs)

Show ball-and-stick detail over the active representation. Chained animations may also change color, opacity, or transforms.

ParameterDefaultDescription
**kwargs—Additional keyword options described below or in the linked constructor.
python
RegionAnimate.hide_atoms(**kwargs)

Hide ball-and-stick detail while retaining the active representation.

ParameterDefaultDescription
**kwargs—Additional keyword options described below or in the linked constructor.