Any molecular visualization program allows the user to save individual views of a structure into a set of image files. These image files can then be converted into one movie file. The difference between programs lies in the ease of automation, and the level of control over the creation of image files. With PyMOL, thanks to the underlying Python-based language, you easily perform simple tasks. For example, it is easy to create a movie of a rotating or a rocking molecule. Furthermore, with some more effort you can create complex sequences of images that zoom in to specific regions, highlight interesting aspects, or convey the sense of dynamics in the system. Using external tools to manipulate the geometry of molecules (e.g. molecular dynamics) or interpolate between two experimental structures (e.g. morphing between the R and T state of hemoglobin) one can create animations that provide an approximate representation of conformational changes when a ligand binds to the protein.
Fortunately, there are several excellent tutorials online that demonstrate how to create movies with PyMOL. We will learn how to create a simple movie of a small rotating helical peptide. This is a low-cost movie: you need PyMOL (free), ImageMagick (free), a movie player (free), and an operating system (free if you choose wisely). To make thinks little more interesting, we will first custom-build the peptide.
You get to direct a movie that rotates the peptide! To be a successful movie director, you need attractive actors ... and think about the message that you want to deliver to your audience. We worry about getting attractive actors first.
OK, on with our Molecular Hollywood! To be a successful movie director, you also need to know how to "speak the speak". Few key words to remember are "states" and "frames". After you figure this out, all you have to do is to yell, "mrock" or "mroll", and shoot.
Converting a sequence of images into a movie can be achieved by many different means depending on the operating system and the available software. A free cross-platform converter and editor is provides by the ImageMagick suite of programs (thanks to J. Cristy, ImageMagick Studio LLC). In particular, the mogrify program can annotate a sequence of images, and the convert program will create an MPG movie with the help of the free mpeg4encode program. Under Windows, open a Command Prompt from Accessories. Navigate to the directory where the PNG files are (C:\"Documents and Settings"\blake.gillespie\Desktop\PNG), and type something like:
Somehow, the ImageMagick installation here does not recognize the PNG files … Arghhh!. A temporary workaround is to use the Photoshop to convert the PNG files into JPG via the Web Photo Gallery in the File, Automate menu. Define the source and destination directories for images, and hit OK. Wait until the conversion is done, then navigate to the directory that contains the JPG files (e.g. JPG/images) and type:
This was a pretty good start, your inner critic probably says now. But you can do a lot more. With only little more practice, you could create movies like this this protein helix or this DNA double helix. Somewhat more complex examples can be seen at Cooperativity in Proteins page.
To work with more advanced movies, the following resources will be helpful: