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.
Topics
Spinning a molecule
Special effects: silhouette edges, shadows, background color
Movies with several motions: command scripts
What to show in an animation: morphing example
Saving your work: use a session file to set up the initial scene
Optional: How to put an animation in a web page
Spinning a molecule
Open 2GHA.pdb.
Delete chain B. Select / Chain / B and
Actions / Atoms / Delete
Morphing is one of the most useful kinds of animation, making it easier to see
differences between two conformations of a molecule.
Open 2ghb.pdb, no maltotriose ligand bound.
Delete chains B and C.
Go back to black background and opaque ribbons.
Presets / Interactive 1 (ribbons)
Show ligand as spheres again. Command repr sphere ligand
Use MatchMaker to align 2ghb to 2gha.
Tools / Structure Comparison / MatchMaker
Color 2gha ribbon pink. Command color pink,r #0
Morph 2gha → 2ghb → 2gha again using
Tools / Structure Comparison / Morph Conformations
Hide original structure of 2ghb by unchecking its “S” box
in Favorites / Model Panel
Keep 2gha shown, but undisplay everything in it except ligand:
~ribbon #0 ; ~display #0 ; display ligand
Show morph residues near ligand: disp #2 & ligand zr<5
Use MD Movie dialog File / Record Movie...
To use morph in a command script: coordset #2 1,41
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.
Save session with calculated morph.
File / Save Session As...
Save command script that records the movie.
movie record
coordset #2 1,41
wait
movie encode
For each movie you make keep 3 files: the Chimera session, the command script, and the movie (morph.py, morph.cmd, morph.mp4).
This allows you to later improve the movie, change its size, etc.
with little effort.
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
Use HTML5 video tag to embed a movie in a web page.
<html>
<body>
<video width="640" height="480" controls="controls">
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</body>
</html>
Chimera records movies in H.264 format by default.