ProteinMotion
Reference navigation

PYTHON API · v0.9.1

Reference manual

Classes, functions, and methods for building protein animations. Browse a module below, or search for an API name such as Protein.surface.

For installation and step-by-step examples, start with the user guides. API signatures and defaults are read from the package source.

Module index

Scenes

proteinmotion.scene

Build a timeline, evaluate frames, and export videos.

Proteins

proteinmotion.protein

Load structures, choose representations, and change coordinates or appearance.

Camera

proteinmotion.camera

Frame proteins and regions, orbit, zoom, and set depth cueing.

Animation

proteinmotion.animation

Move objects, change representations, and interpolate coordinates.

Color and opacity

proteinmotion.styling

Animate atom and residue colors and transparency.

Text and labels

proteinmotion.annotations

Write text, label amino acids, and connect labels to regions.

Selections and highlights

proteinmotion.regions

Select atoms and residues and mark regions in 3D.

Trajectories

proteinmotion.trajectory

Read and align NMR ensembles, NumPy frames, and MD trajectories.

Contact matching

proteinmotion.matching

Match ordered Cα subsets and save residue correspondences.

Backbone morphs

proteinmotion.backbone

Move matched residues and fade unmatched parts between structures.

Distances

proteinmotion.distances

Measure atoms or residues with 2D or 3D lines.

Molecular interactions

proteinmotion.interactions

Compute and display hydrogen bonds and screened Coulomb interactions.

Rate functions

proteinmotion.rates

Map animation progress to eased progress.

Rendering

proteinmotion.renderer

Render frames directly with a reusable GPU renderer.

Blender EEVEE

proteinmotion.eevee

Render through Blender with depth of field and smooth group fades.

Numerical properties

proteinmotion.properties

Map measured residue values to colors and cartoon thickness.

Plots and sequence tracks

proteinmotion.plots

Display time-series traces, contact maps, sequence strips, and color legends.

Density maps

proteinmotion.density

Read MRC/CCP4 grids, extract contours, and animate slices.

Alphabetical index

NameDescription
AnimateclassBuild a fluent protein or camera animation through the .animate property.
AnimationclassBase class for animations evaluated by the scene timeline.
AnnotationclassBase class for text and lines drawn over the image.
AnnotationAnimateclassBuild position, offset, and opacity animations for annotations.
BackboneMorphclassMove matched backbone residues in order and fade unmatched residues.
CalloutclassConnect an image label to a selected region with a line.
CameraclassA perspective camera with orbit, zoom, framing, depth cueing, and EEVEE lens focus.
charges_from_pqr()functionMatch PQR charges to the protein’s atom identities.
ColorByPropertyclassAnimate property-based residue colors and optional cartoon thickness.
ColorizeclassAnimate a tint on a whole protein or a selected region.
ColorLegendclassA horizontal color bar with numeric limits and measurement units.
ColorScaleclassA fixed linear scale mapping scalar values to RGB colors.
ContactMapclassA live binary Cα contact map with linked residue markers.
ContactMatchclassStore an ordered residue correspondence and its search report.
DeformclassInterpolate coordinates toward the result of a user-supplied function.
DensityMapclassAn immutable scalar grid with physical coordinates and optional periodic boundaries.
DensitySliceclassA trilinearly sampled map plane with a fixed color scale and animated position.
DensitySurfaceclassA cached contour mesh with animated level, opacity, and transforms.
DistanceclassDraw a distance line between two atom or residue selections.
ease_in_out_sine()functionApply sinusoidal easing that starts and ends slowly.
EEVEEclassKeep one Blender process alive while rendering multiple frames.
EEVEEOptionsclassConfigure the optional EEVEE renderer. Blender 4.5+ is installed separately.
ElectrostaticsclassCompute screened Coulomb pair energies and electrostatic potential.
FadeInclassFade a protein or annotation from transparent to its current opacity.
FadeOutclassFade a protein or annotation to zero opacity.
find_blender()functionLocate the Blender executable and explain how to install it if absent.
FocusclassAnimate the camera to a protein or selected region.
FocusPullclassAnimate lens focus to a protein, residue selection or world point.
HydrogenBondsclassDetect hydrogen bonds from donor–acceptor distance and hydrogen geometry.
InteractionclassAn immutable record for one detected molecular interaction.
InteractionHighlightclassDraw selected hydrogen-bond or electrostatic contact lines.
linear()functionReturn progress unchanged.
match_backbones()functionFind the largest ordered residue match under a contact-error limit.
MorphclassInterpolate matching atoms to a protein or coordinate array.
PlayTrajectoryclassInterpolate through coordinate states in a trajectory.
ProteinclassA molecular structure with fixed atom identities, coordinates, and display settings.
ProteinSceneclassDefine a protein animation as a sequence of play() and wait() calls.
RegionclassA selection of atoms that follows its parent protein’s coordinates.
RegionAnimateclassCreate styling animations through region.animate.
RegionHighlightclassDraw a sphere, wire box, or atom halos around a region.
RendererclassRender protein and annotation objects with a reusable GPU renderer.
RepresentationclassTransition between cartoon, ribbon, ball-and-stick, and surface.
ResidueLabelclassLabel one amino acid at its projected Cα position.
ResidueLabelsclassLabel several residues and adjust their positions to reduce overlap.
ResidueValuesclassOne measurement per topology residue, with identity checks and optional units.
RotateclassRotate a protein around its molecular centroid.
ScenealiasAlias for ProteinScene.
SequenceTrackclassA sequence with a thin strip of current structure colors or a fixed numerical property.
SetOpacityclassAnimate transparency on a whole protein or a selected region.
smooth()functionApply quintic easing with zero endpoint speed and acceleration.
TextclassDraw shaped vector text over the protein image.
there_and_back()functionMove smoothly from 0 to 1 and back to 0 over one clip.
TimeSeriesPlotclassA vector trace with a cursor linked to scene time or a protein trajectory.
TrajectoryclassA random-access sequence of coordinate frames in ångströms.
UnwriteclassErase glyph fills and then their outlines.
WriteclassDraw text outlines and then fill the glyphs.