Protein animation
in Python
Load a protein structure or trajectory, add animations and labels, and export a video. Render cartoons, ball-and-stick models, ribbons, and molecular surfaces.
Python 3.11+ · Apple silicon · MIT licensed
Molecular representations
Cartoon, ribbon, atoms & surfaces
Animation
Movement, color & transparency
Labels & measurements
Residues, distances & interactions
States & trajectories
NMR ensembles & MD playback
PYTHON SCENES
Define each animation
in a Python script.
Create a protein object, add it to a scene, and call play() to animate it. The API follows Manim’s scene syntax. Set the duration of each animation and combine animations in one call to run them together.
Read a complete scriptProteinMotion runs as a standalone package. Use the exported videos in Manim, presentations, or a video editor.
class MyFilm(ProteinScene):
def construct(self):
p = Protein.from_file("protein.cif").cartoon()
self.add(p)
self.camera.frame(p)
helix = p.select(residues=(23, 34))
self.play(Colorize(helix, "#50e0d0"), run_time=1.5)
self.play(Write(helix.callout("α helix")))
self.focus(helix, run_time=1.5)
self.play(PlayTrajectory(p), run_time=8)Numerical properties
Color residues by B factors, RMSF, or custom values. Use cartoon thickness and a color scale to show the range.
View code and outputPlots that follow the movie
Show distance traces, contact maps, and a sequence strip alongside trajectory playback.
View code and outputDensity maps and slices
Load an MRC or CCP4 map, change its contour level, and move a slice through the volume.
View code and outputDepth of field with EEVEE
Set lens focus on selected residues and animate focus changes as the camera moves. The homepage film uses EEVEE for helix close-ups, transparent surroundings, and molecular surfaces. Install Blender separately to render the scene.
View the film and full scriptUse with an AI agent
The ProteinMotion Movies skill provides instructions and examples for writing scenes, rendering videos, and checking the results. Use it with an agent that can read local files and run Python commands.
Set up the skillExample structures and scripts
Ubiquitin, calmodulin, troponin C, and GroEL/GroES examples are included.