PYMOL Tutorial This tutorial is taken from the pymol introduction and should introduce you to using pymol to visualize pdb files. You can also take a look at the user manual for more information.

Installation

Download the installation from the repository, save it to disk, run 7-zip file manager to uncompress it.

Running the program

You should be able to run the PymolWin.exe program
  1. Go to the Protein Data Bank and retreive the pdb file 1VA9 and save it to they pymol directory.
  2. You will see a PyMOL Tcl/Tk Gui and a black window with a prompt in the bottom left corner
    PyMOL>
    
  3. Many of the commands you can issue in this window are the same as those you could issue from a linux prompt. Type the following:
    pwd
    
    This will show you the current directory for pymol. You can also type other command like "ls" in this window.
  4. Now load the pdb file into pymol
    load 1VA9.pdb
    
  5. You should see a ball and sticks representation of the protein. Type
    hide all
    
    to get rid of the ball and sticks. Type
    show cartoon
    
    to get the secondary structure version.
  6. Now lets change the color
    color orange
    
  7. Now display the sequence. Go to the top of the PyMOL Tcl/Tk GUI, and Display->Sequence
  8. Lets say that you know that there is a conserved region between amino acids 20 and 30, type
    select foo, resi 20-30
    
  9. Now you can recolor these residues with something like
    color blue, foo
    
  10. Now you will want to turn on stereo mode to look at the thing. Got othe top again and Display->Stereo

    Put your finger up close to your nose, then move it away until you see three versions of the protein. The middle one should be in 3D. This takes practice, so dont give up. It helps to be squarely in front of the monitor. Try rotating it so you get the full effect.

  11. You can also select residues from the sequence list. Click on 3 or 4 adjacent residues, then type
    show spheres, sele
    
    This should show the selected residues as spheres
  12. Lets get rid of the stereo with Display->Stereo
  13. Now lets create a png file
    png foo.png
    
    Take a look at the file foo.png on your desktop.
  14. You can put any of these commands into a pml file and execute them to create a picture. Download 1KMY.pdb and 1KMYsetup.pml to your desktop.
  15. load 1KMY.pdb
  16. Now run the pml file by typing
    @1KMYsetup.pml
    
    Now lets take a look at the command file
    load 1KMY.pdb,main
    
    Loads in the pdb file and labels it with main
    hide all
    
    show cartoon, all
    
    #colour and mark the iron ligands and iron
    color orange
    color marine, (resi 1:134)
    show spheres, (elem Fe)
    color pink, (elem Fe)
    show sticks, (elem Fe)
    show sticks, (resi 300)
    color yellow, (resi 300)
    show sticks, (resi 260,210,146)
    color blue, (resi 260,210,146)
    
    Color different residues and elements and change their display formats. Display the sequence with "Display/sequence" and then select a region and change its color.
  17. You can also align different proteins using RMSD
    align mobile = 1VA9, target = 1KMY, object = BOTH
    
  18. you can also log your commands to a file
    log_open logl.pml
    
  19. You can also input python code (be careful to put a space in the front of lines in the for loop
    for a in range(1,6): \
     b=6-a \
     print a,b
    
  20. But what you really want to do is make a movie
    1. First load the protein
      load 1VA9.pdb
      
    2. Now tell the system how many frames you want to create
      mset 1 x30
      
    3. Roll the protein
      util.mroll 1,30,1
      
    4. Set the viewport size
      viewport 320,240
      
    5. enable raytracing
      set ray_trace_frames=1
      set cache_frame=0
      
    6. create a directory for the frames, and make that your current directory
      os.mkdir("mv")
      cd mv
      
    7. Now render the frames
      mpng 1va9
      
    8. You should be able to see a bunch of png files in the mv directory. You can step through them to see the animation.
    9. Now download a program to turn the frames into a movie. We will use VideoMach, but you can also use imagemagick. Install VideoMach, than run it.
    10. Run Open-> and select all of the png files you just produced. Go to Tools/Options and change the frame rate to 0.1 frames per second.
    11. You can then run SaveAs to save it as a mpg file.
    12. Then run the mpg file to see your video.
  21. Now you can experiment with other movie features like
    util.mrock(start, finish, angle, phase, loop-flag)
    mset 1, x60
    util.mrock 1,60,180
    
    util.mroll(start, finish, loop-flag)
    
    translate
    rotate
    
    There are also a bunch of neat tools in this rTools package.
    

    And here are some sample movies to give you some ideas.