Chimera Movie Making

Tom Goddard
October 3, 2012

This tutorial shows how to make animations using Chimera for use on web sites, in journal articles, and talks. We will use maltotriose binding protein, PDB 2gha, and Chimera 1.7 snapshot version from September 2012 for our examples.


Spinning a molecule

  • Open 2GHA.pdb.
  • Delete chain B.  Select / Chain / B  and  Actions / Atoms / Delete 
  • Color ribbon.  Presets / Interactive 1 (ribbons) 
  • Highlight ligand.  Select / Structure / Ligand  and  Actions / Atoms / Sphere 
  • Clear selection.  Select / Clear Selection 
  • Rotate 360 degrees.  Favorites / Command Line 
    • turn y 1 360
  • Record “spin” movie.
    • movie record ; turn y 1 360 ; wait ; movie encode
  • Semicolons separate commands on one line.
  • movie record starts capturing images.
  • wait prevents going to the next command until motion finishes.
  • movie encode writes the images to a movie file.

Special effects: silhouette edges, shadows, background color

  • Background white. Command set bg white *
    *as of Chimera 1.9, set bgcolor white
  • Silhouette edges.  Tools / Viewing Controls / Effects 
  • Enable shadows.
  • Background gradient.  Favorites / Preferences,
    category Background, background method gradient
  • Gray gradient. Click background gradient color well.
  • Set window size. Command windowsize 640 480.
  • Record movie, 2 degree steps, supersample to smooth edges.

    movie record supersample 3 ; turn y 2 180 ; wait ; movie encode

Movies with several motions: command scripts

movie record
turn y 2 180
movie encode
movie record
turn y 2 180
scale 1.02 80
turn y 2 180
movie encode ~/Desktop/spin3.mp4
movie record
turn y 2 180
scale 1.02 80
movie crossfade 25
transp 80,r ; set flat
turn y 2 180
movie encode ~/Desktop/spin5.mp4

What to show in an animation: morphing example

Many of the commands useful in making movies are demonstrated on the Movie Command Examples page on the Chimera web site under Documentation.

Morphing is one of the most useful kinds of animation, making it easier to see differences between two conformations of a molecule.

Structure superposition. Morph movie.

Saving your work: use a session file to set up the initial scene

To save your movie making work, save a Chimera session that sets up the scene, and use a command script that records the movie.

A fancier movie example

Includes titling (2dlabel), ligand fly in (savepos / reset), hydrogen bond display (hbond), surface display (surf).

Other example animations are on the Chimera Animation Gallery web page.

How to put an animation in a web page


<video width="640" height="480" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
  Your browser does not support the video tag.