[Chimera-users] "docking" animation

Elaine Meng meng at cgl.ucsf.edu
Wed Nov 19 10:38:37 PST 2008

On Nov 19, 2008, at 9:37 AM, Bagchi, Angshuman wrote:
> Hi,
> Could you please tell me how to produce animation in chimera.  
> Actually, I have 2 proteins and would like to represent them as they  
> are getting docked. What I mean is that I would like to move the  
> proteins and then show that as if they are getting docked.  Can this  
> be done with chimera?
> Thanks
> Ang

Hi Ang,
Yes, it can be done.  Here is how I would do it:

(1) create a Chimera session that includes saved/named positions of  
the proteins separated and the proteins docked.

(2) figure out a set of commands that does the stuff you want in your  
animation, which would include "reset" to gradually change from one  
saved position to the other; put the commands in a file.  Just opening  
the file will execute the commands.

(3) after you are happy with what the Chimera command file does, just  
put a "movie record" command at the top of it and a "movie encode"  
command at the bottom, and execute it.

Now with more details:

(1) Open the structures of the two proteins from two separate files so  
that they can be moved separately.  You can "freeze" a structure by  
deactivating it, so that the mouse moves only the other structure:

Save at least two positions, one with the proteins separated, another  
with the proteins docked together, as you want them to appear in your  
animation.  The current position is saved using the command "savepos":
You could even save multiple positions for more control over the path  
the proteins will take as they are "docked" in the animation.

There is a nice example in the online movie-making tutorial, see the  
"Ligand flying into unbound conformation" section:

Get the display how you want it: background color, ribbons, ribbon  
style, which atoms are shown, atom display style, colors, etc.  See  
"tips on preparing images":

You might also want to add a title using 2D labels (if so, leave room  
for it when you save the positions).

Save the session (File... Save session As).  It will include your  
saved positions and any 2D labels.  Now you could exit and later  
restart the session without losing your work.

(2) You could either try out commands by typing them individually, or  
by putting them in a text file (named *.com or *.cmd) and repeatedly  
opening the file after you adjust its contents and going back to the  
starting position.

The "reset" command is used to go from one saved position to another.   
It can be done abruptly in one frame or gradually over a specified  
number of frames.  See movie-related commands for links to the manual  
page of "reset" and other commands that can do things over a specified  
number of frames.  Besides the "reset," you might want to do other  
things like translate or rotate or fade in/out 2D labels with these  

There are also links to a few example movie command files on that page.

(3) Once you are happy with what the script does when you open it,  
then you can put a "movie record" command at the top and a "movie  
encode" command at the bottom.  See the example movie command files  
and the "movie" command description:

I prefer this process because at the end you have a session file and a  
command file that allow you to either reproduce the process  
efficiently, or to make some small change without a lot of duplicated  

I am told that "reset" has had some problems which were just fixed, so  
if you get a bad behavior using that command, try getting a recent  
daily build from

I hope this helps,
Elaine C. Meng, Ph.D.                          meng at cgl.ucsf.edu
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

More information about the Chimera-users mailing list