next up gif contents index
Next: Conferencing Up: Tutorials Previous: Locating a binding pocket

 

Making movies

  OBJECTIVE: In this tutorial we will use spock to make a movie of a molecular modeling session.     Concepts introduced: Movie mode (§6.11.3), changing torsion angles (§6.7.13).

Start spock with 1rnt.pdb. Turn on secondary structure worms and bonds, but nothing else. We're going to simulate a modeling session here, so choose ``TOR'' under the modeling menu. Pick any adjacent backbone atoms and try to rotate about that bond by holding down the first left button while moving the mouse. Notice that the whole structure moves, not just the section you'd expect. This is because of the disulfide bonds in the structure. Choose ``Undo TOR'' from the modeling menu, and then ``Modeling tex2html_wrap_inline6800 break bond''. Find the SS bonds and break them by clicking on the adjacent atoms in order. Now we can go back to ``Modeling tex2html_wrap_inline6800 TOR'' and rotate about the torsion angle. Just give it a few spins to see it change.

Now, choose ``File tex2html_wrap_inline6800 Save history'' and use the filename movietest.sp. Quit spock.

Edit the movietest.sp file, and add a TEXT> bc=0 line to at after the last instance of a bc command in the file. This will hide the bonds, and show only the worms when we playback the file. We're almost ready to produce a movie. Remember, however, that the backbone worm isn't updated when the we are rotating about bonds (this is for speed). If we play back the history file as is, we won't see any changes! So create a file called moviescript.sp and put in the line TEXT> remake.  . This script file will get executed once for each frame of the movie, whenever the graphics scene is redrawn. The remake command will cause the worm and other objects to be updated based on the current atom coordinates. (Note that surfaces, and contours would have to be entirely rebuilt, which could also be done in the moviescript.sp file.)

Now, we are ready for spock to render the images for the movie. Run spock and load the PDB file again. Since we want PPM images for the movie, set the image output format to PPM using the ``Image options'' menu that is in the file dialog that pops up when you choose ``File tex2html_wrap_inline6800 Save image'' (§6.1.2). Press cancel to get rid of the dialog. Shrink the spock window to a fairly small size, say 400x400 for the graphics. Finally, go to the graphics menu and choose ``Movie mode''. Set the Script name to moviescript.sp, and press Ok. All that's left to do is run the history file. We do that by typing read=movietest.sp and pressing enter. Wait while spock plays back the history file, and saves all the images. This would be a good time for a cup of coffee. When it's done, quit spock.

You now have a series of image files that you want to combine into a movie. If you've installed mpeg_encode (§3), you can use it to combine the images into a MPEG file. Copy the file $SPOCK/lib/ppm2mpeg.param to the working directory with the image files. You should edit this file according to the instructions given in it. Finally, type mpeg_encode ppm2mpeg.param and mpeg_encode will make a MPEG movie of your spock session.

Alternately, on a SGI with the appropriate software, you can use the command makemovie -fqt -o moviename.qt * to make a QuickTime movie. This movie may be edited with SGI's moviemaker command. See the man pages for those programs for more information.


next up gif contents index
Next: Conferencing Up: Tutorials Previous: Locating a binding pocket

Jon Christopher
Tue Sep 14 16:44:48 CDT 1999