Making Movies in Minutes with CCP4mg

Liz Potterton, Stuart McNicholas & Martin Noble*

Department of Chemistry, University of York, York Y010 5YW
*Laboratory of Molecular Biophysics, University of Oxford OX1 3QU


Simple movies are often good in a presentation or on a web page as they can convey the 3-dimensionality or some dynamic aspect of a structure better than a static picture. But creating movies can be time consuming. We have attempted with the CCP4 molecular graphics program, CCP4mg(ref 1), to make movie making as simple as creating static pictures. So creating a simple movie, like those shown below, should only take a few minutes.

Like most molecular graphics packages CCP4mg will output a series of screen snapshots; each snapshot corresponds to one frame of the movie. These frames are then compiled into a movie by another, external program. CCP4mg has a very simple interface for setting up the movie and a 'Compile' button that will create the movie file automatically.

The main question with movie making is: 'what is actually going to move?'. Some possible answers are shown below.

Moving the camera

For this, simplest sort of movie, the displayed structures do not change in the course of the movie but the camera is considered to move. Actually it looks as if the displayed structures are rotating, rocking from side to side or moving in some other simple fashion. It is usual to ensure that at the end of the movie the motion has returned to the starting point so that, when displayed, the movie can loop through multiple times without an obvious break. CCP4mg has simple options to set up 360º rotation, rocking, or motion between two views selected by the user. An example of the later is shown here. For this movie, the user needs only to indicate the required start and end view and program will interpolate between the two views.

Animating the structure

An animation might be a dynamics trajectory or a morph such as is created by the Yale Morph Server. CCP4mg can load the coordinates for each step of the animation from either separate PDB files or from the multiple 'NMR' models in one PDB file. There are a huge number of dynamics trajectory formats; if there are any you would particularly like us to support then please let us know.

It's probably best to retain the same view throughout while recording a movie, but you can also move the camera if you wish. It is possible to use any of the usual model display styles or colour schemes for the animation and, if necessary, properties such as hydrogen bonds, secondary structure assignment, surfaces or electrostatic potential will be updated. But the latter two may take a few more minutes!

Here is a simple animation movie.

Varying the electron density contour level

You can change some properties of the displayed data through the course of a movie. The most useful things to change are probably the electron density contour level or the position of a model but other things that might change are: position of text or images, size of images and transparency levels. Here is an example of changing electron density levels. In this movie the map has been clipped to cover only a small number of residues and is drawn as thin cylinders.

Moving a model

Moving a model or fragment of a model can be useful to show the relationship between different models or perhaps the sort of movement that must occur in domain motion. In the moving model movie there are two models corresponding to the two chains of the immunoglobulin 4fab. One section of the movie shows the transformation of the heavy chain on to the light chain. This section was created by saving two states of the display: one with the two chains in their usual positions and one after the chains have been superposed by the Secondary Structure Matching tool(ref 2). The program will automatically interpolate between the two positions of the heavy chain through the movie.

This movie was made in four simple stages which either moved the camera or the model or, for a short section, nothing moved. The accumulated frames were then compiled into one movie.

Movie formats and compiling the movie

The movies in this article are in animated GIF format as this is well supported by web browsers. But it is not a well compressed file format. There are a bewildering array of movie file formats and programs to handle them. These have a strong operating system dependency and some tedious associated licencing issues.

CCP4mg outputs each frame in PNG format which can be imported to any movie making program. Alternatively, if the appropriate conversion program is installed, CCP4mg will run it automatically as a background job. Currently the ImageMagick program convert and (on Linux only) mencoder are interfaced.

Future developments

These movies were made with CCP4mg v0.13.

We are working on providing a simple interface for creating more complex movies. It should be possible to create a movie with several distinct scenes and to preview and edit the movie via a visual interface. It should also be possible to create the impression of 'flying through' the structure.


1). Developments in the CCP4 molecular-graphics project. Liz Potterton, Stuart McNicholas, Eugene Krissinel, Jan Gruber, Kevin Cowtan, Paul Emsley, Garib N. Murshudov, Serge Cohen, Anastassis Perrakis and Martin Noble. Acta. Cryst. D12 2288.
2. Secondary-structure matching (SSM), a new tool for fast protein structure alignment in 3D. E.B. Krissinel and K. Hendrick. Acta. Cryst. D12 2256