ProteinMotion
Reference navigation

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.

Molecular structures

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.

Threading

proteinmotion.thread

Thread actual cartoon, ribbon, or ball-and-stick geometry into view, with optional legacy wire mode.

Text and labels

proteinmotion.annotations

Write text, label amino acids and nucleotides, 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α or C1′ 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.

DNA and RNA bases

proteinmotion.nucleic

Choose nucleotide base shapes and animate transitions between styles.

Studio looks

proteinmotion.looks

Studio looks for readable molecular movies.

Reusable styles

proteinmotion.styles

Reusable styles for readable molecular movies.

Animation groups

proteinmotion.timeline

Animation groups for readable molecular movies.

Torsions

proteinmotion.torsions

Measure, set, and animate backbone and side-chain torsion angles in degrees.

Ramachandran plots

proteinmotion.ramachandran

Plot φ and ψ over favored and allowed regions from high-resolution structures.

Structure morphs

proteinmotion.conformations

Match two experimental structures of one protein, morph between them, and measure domain motions.

Alphabetical index

NameDescription
AnimateclassBuild a fluent protein or camera animation through the .animate property.
AnimationclassBase class for animations evaluated by the scene timeline.
AnimationGroupclassCompose actions with independent durations and start offsets in seconds. Animation.during(seconds, delay=...) is shorthand.
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.
BaseStyleclassCrossfade nucleotide bases between slabs, rings, sticks, ladder, or none.
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.
ConcealclassClose the open cutaway.
ContactMapclassA live binary backbone 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.
domain_motion()functionHow a domain turns and shifts between two structures, after superposing on a fixed part.
DomainMotionclassRigid motion of a domain between two structures, as a screw in the source's model frame.
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.
HeatmapclassA matrix of colored cells with a color bar; rows and columns can be residues.
HideAtomsclassFade ball-and-stick detail atoms back into the cartoon, ribbon, or surface.
HideSideChainsclassFade amino acid side chains back into the cartoon.
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.
match_structures()functionPair chains, residues, ligands, and atoms of two structures of the same protein.
MolecularStyleclassReusable representation name and keyword options for Protein.set_style() and Representation().
MorphclassInterpolate matching atoms to a protein or coordinate array.
NucleicAcidclassA DNA/RNA structure with base colors, nucleotide cartoons, surfaces and the Protein animation API.
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.
RamachandranPlotclassA live φ/ψ plot: one point per residue over favored and allowed regions.
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, with optional nucleotide base styles.
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.
RevealclassOpen a view-dependent cutaway onto a region: geometry in front of it fades inside a window that follows the camera.
RotateclassRotate a protein around its molecular centroid.
RotateTorsionsclassTurn torsions by amounts in degrees, for example a full side-chain rotation.
ScenealiasAlias for ProteinScene.
SecondaryStructureclassBlend the cartoon to new helix, strand, and coil states.
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.
SetTorsionsclassAnimate backbone and side-chain torsions to new values in degrees; atoms rotate about bonds, so bond lengths and angles stay fixed.
ShowAtomsclassGrow atoms in as ball-and-stick detail over a cartoon, ribbon, or surface.
ShowSideChainsclassGrow amino acid side chains from the cartoon as ball-and-stick detail.
smooth()functionApply quintic easing with zero endpoint speed and acceleration.
StructureMatchclassAtom correspondence between two structures, with the residue and chain pairs behind it and the rigid core they share.
StructureMorphclassMorph between two experimental structures of the same protein, moving residues along screw paths.
StudioLookclassStudio lighting, material, and global effects presets with explicit per-setting overrides.
TextclassDraw shaped vector text over the protein image.
TextGroupclassVertically arrange Text objects and animate a caption as one object. Child positions are ignored.
TextStyleclassReusable typography for Text(style=...). Sizes use 1080p design pixels.
there_and_back()functionMove smoothly from 0 to 1 and back to 0 over one clip.
ThreadclassThread the actual cartoon or atoms and bonds into view with eased travel over the full clip.
TimeSeriesPlotclassA vector trace with a cursor linked to scene time or a protein trajectory.
TorsionAnglesclassφ, ψ, ω, and χ1–χ5 in degrees for a set of residues; NaN where a residue lacks a torsion.
TorsionMarkerclassA live protractor for one torsion: its bond, an arc around the bond, and the current angle.
TrajectoryclassA random-access sequence of coordinate frames in ångströms.
UnthreadclassReverse Thread, pulling actual molecular geometry out of view along curved paths.
UnwriteclassErase glyph fills and then their outlines.
WriteclassDraw text outlines and then fill the glyphs.