(5 Mb)
(1.2 Mb)
An small animated Gif
(2.8 Mb)

What's this all about?

This page is about how I made a movie that morphs between two structures. In this case, syntenin is shown with and without a syndecan and IL5a peptide in its active site. There are other ways to do this, but this is what worked for me. for this movie, I used LSQMAN to generate a series of intermediate structures, then used Pymol to make a movie from them. This was my first experience with Pymol. I was really impressed.

Steps to Make the Movie

Generate Starting Structures

In this case, there were three starting structures involved.
  1. Syntenin with an interleukin receptor peptide
  2. Syntenin with a syntrophin peptide
  3. Unbound syntenin with both peptides "out of frame"
B.S. Kang, D.R. Cooper, Y. Devedjiev, U. Derewenda, Z.S. Derewenda.  
   Molecular roots of degenerate specificity in syntenin's PDZ2 
   domain: reassessment of the PDZ recognition paradigm.  
   Structure.  In press.
This last structure was created by pasting the two peptides into the unbound structure and then moving the peptides so they would be out of frame when the movie starts. It looked like this.

Create Morphed Structures

This involved two steps, producing the intermediate files and then renumbering them so they would play in order.

Generating the intermediate structures

I used LSQMAN to morph between the unbound and both bound forms. Since you might want to do this multiple times (ie with different start positions of the peptides) it is best to do this with a script.

NOTE: LSQMAN renames your chains A->Z.

Here is the script I used to do one of the morphings.

lx_lsqman <<end-lsq
#Read in the two files
re m1 2pdz-w.pdb
re m2 spep-w.pdb
#Tell LSQMAN to use all atoms
at no
#Fix silly nomenclature problems
nomen m1
nomen m2
a197-270 b5-8 c2-6
a197-270 b5-8 c2-6
#Morph between the two structures
A197-270 C2-6
A197-270 C2-6

This script will generate morpha_1.pdb -> morpha_30.pdb

Renumber the Files

This is actually the last line of the above script, so that renumbering is automatic. It renumber the files 01->30, so the "ls" command will put them in the right order.
ls morph?_?.pdb | awk -F "_" '{print ("mv "$0" " $1"_0"$2)}' | /bin/sh

Assign Secondary Structure

The Pymol manual says not to trust its secondary structure assignment procedure (which is slow anyway). I used DSSP and a helper script dssp2pdb to add the secondary structure to each intermediate files. I used the following script to add the secondary structure elements to all the morphed PDB files.

#Run dssp on the starting structure
dssp 2pdz-w.pdb 2pdz-w.dssp
#Get the stuff to add to each file
dssp2pdb -35 2pdz-w.dssp > tEmP
#If a morphed pdb doesn't already have it, add the secondary structure info.
for i in `ls morph*pdb`; do
 if ! [ `grep -l HELIX $i` ]; then
  cat tEmP $i > tEmP2
 mv tEmP2 $i
rm -f tEmP

Generate Movie Script

In Pymol, each morphed structure is considered one state of a molecule. Each state is loaded with the command

load file,object,state#

To automatically generate the "loading" part of the pymol script, I used the following command:

ls morph*pdb |awk '{print ("load",$0",mov,"NR)}' > load.pml
which loads each PDB into a different state of the molecule mol with these commands.
load morpha_01.pdb,mov,1
load morpha_02.pdb,mov,2
load morphb_29.pdb,mov,59
load morphb_30.pdb,mov,60

Then generate the command that will do the movie. In this case:

mset 1 -30 30 x15 30 -1 31 -60 60 x15 60 -31
Which in order

Tweak Display

Sorry, but you have to read the Pymol manual.
Here is what I did.
set_view (\
    -0.534639537,   -0.058760803,    0.843031168,\
     0.793129861,   -0.379265100,    0.476552665,\
     0.291729540,    0.923420310,    0.249373451,\
    -3.371663570,    2.114262581,  -87.563941956,\
    17.698165894,    8.629757881,   12.076782227,\
    43.687160492,  144.238052368,    0.000000000 )
select synt, ( chain a )
select spep, (chain c)
select ipep, (chain b)
select pocket, (chain a & resi 207:214 | resi 250:260)
select pocket2, (chain a & resi 208:213 | resi 251:259)
color grey, (synt & ! pocket)
show cartoon, (synt)
hide lines, (synt)
hide cartoon, (pocket2)
util.cbay (pocket)
show sticks, (pocket)
show sticks, (spep or ipep)
util.cbac (spep)
util.cbak (ipep)
set ambient = .13
set gamma = 2.0
select none

Add Background

The background was a GCO (Compiled Graphics Object). It consists of almost perpendiculat triangels. One triangle is the floor and the other is the back wall. You will have to fiddle with the coordinates of the verticies to get this to look right.

Here is a side view so you can see the two triangles clearly.

Here is the actual CGO. I called it
from pymol.cgo import *
from pymol import cmd
from pymol.vfont import plain

obj = [
COLOR, 1,1,1,
VERTEX, 25,-30,-10,
VERTEX, -30,30,11,
VERTEX, 50,50,-5,

COLOR, .0,  .0,  1,
VERTEX, 25,-30,-10,
VERTEX, -30,30,11,
VERTEX, -10,-10,100,

# then we load it into PyMOL
It is loaded into pymol with the command

Here is the whole script, load.pml

Ray trace movie -- produces PNG files

I used Pymols built in ray tracer. It is a little slow, but what can you do.
I maximized the window to get the best resolution.
set ray_trace_frames = 1
mpng peptide-frame
This creates individual frames in the PNG format.

Produce movie from static images

If anyone knows of a good way to do this in Linux, please let me know. Convert can be used to make animated GIFs and MPEGS (with pretty bad resolution--maybe it could be tweeked, so if you know how let me know.

I used a Windows Shareware program Video Mach to make an AVI. The AVI file has descent resolution and plays without a hitch in Powerpoint.