Appendix 1: Pymol Commands Downloading Pymol. Downloading a pdb file. Opening a pdb file. Using the mouse

Pymol  tips  and  tricks     Gates,  Kent  S.    Univ  of  Missouri   Appendix  1:    Pymol  Commands   • Downloading  Pymol   To  download  Pymol...
254 downloads 0 Views 186KB Size
Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

Appendix  1:    Pymol  Commands   • Downloading  Pymol   To  download  Pymol,  go  to  www.pymol.org  or  Google  ‘Pymol’.   The  program  is  called  Pymol.      Go  to  "products"  tab.    Then  the  "Pymol"  link.     Then  look  for  "educational  subscriptions"  link  or  go  directly  via   http://www.pymol.org/educational  .    Then  look  for  the  words  "register  for   educational-­‐use-­‐only  pymol"  and  the  associated  "register  here"  link.   Fill  out  an  agreement  that  specifies  academic  use,  then  you  get  a  code  that  allows   FREE  downloading  of  the  program.  

• Downloading  a  pdb  file   Go  to  www.rcsb.org  or  Google  ‘pdb’.    At  the  pdb  website,  type  into  the  search   bar  at  the  top  your  assigned  coordinates  of  “for  example,  1C83”.       On  the  left  side  of  the  page  are  several  drop-­‐down  menus.    The  second  from   the  top  is  “Download  Files”.    Click  on  this  and  it  will  drop  down  some  options.    Click   on  “PDB  text”  and  save  the  file  where  you  can  easily  find  it.  

• Opening  a  pdb  file     In  Pymol,  open  a  file  by  clicking  File  -­‐>  Open…    Locate  and  click  on  the  pdb   file  you  downloaded  from  the  web.    You  should  see  the  structure  in  the  viewer  of   Pymol.  

• Using  the  mouse   To  get  the  most  out  of  Pymol,  a  three-­‐button  mouse  is  required.    The  scroll  wheel   can  be  used  as  a  button  by  clicking  and  holding.    Try  out  the  mouse  commands  as   detailed  below  on  your  newly  loaded  protein  structure.  

  On  a  single  button  laptop  (Mac),  you  can  rotate  the  protein  simply  by  holding   down  the  button  and  sliding  your  finger  on  the  track-­‐pad.    You  can  center  the   protein  in  the  window  using  option-­‐click  and  you  can  zoom  using  control-­‐click.     You  change  the  size  of  the  “slice”  that  you  are  viewing  with  control-­‐shift-­‐click.    

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

  Std  Commands:   “reset”  (double  click  on  image  window,  “reset”  on  menu,  centers  protein  in  window)   select  all,  then  type:  “center”  (centers  structure  in  window)   hide  all   show  cartoon   show  side  chain,  resi  215   Setting→Cartoon→Side  Chain  Helper   color  gray90   color  atom  (gives  color  by  atom  identity)   show  spheres,  resi  301   color  white,  resi  301   color  gold,  resi  200-­‐221   hide  everything,  resi  301   zoom:  option,  click,  slide  on  trackpad   move  x/y  on  page:  control,  click,  slide  on  trackpad     Rendering  and  Saving:    Click  on  the  “Ray”  button  (in  the  top  right  corner  of  the   Pymol  interface).    It  will  take  a  few  seconds  to  render.  To  save  the  snapshot  (select:   File  →  Save  Image)     Rock:    Click  “rock”  button  in  the  upper  right  corner  of  the  user  interface.     Appendix  2.    Pymol  “Tricks”   •    Zoom  resi  X-­‐X  or  zoom  resi  X  (zooms  to  a  section  of  the  protein)   •    Orient  (resets  the  view  to  “normal”)   •    Center  the  image:    center   •    If  the  center  of  rotation  seems  "off"  try  these  things:    middle  click  on  the  desired   rotation  center.    You  can  also  pull  down  the  action  menu  of  one  of  the  ligands  or   crossclusters  and  click  "center".    JJT.   •    Under  the  menu:  Settings  →  Cartoon  →  Fancy  Helices  you  can  get  cool  looking   tubular  edges  to  the  helices.    A  nice  touch.   •    Altering  the  properties  of  individual  atoms  in  the  structure:    Control  click…  a   menu  appears  on  top  of  the  atom.    In  this  menu,  under  heading  of  “atom”  you  can   color,  show,  label,  etc.   •    Measuring  distances  in  the  structure.    Under  the  Wizard  menu,  select   “measurement”.    Then  click  sequentially  on  the  two  atoms  of  interest.    A  yellow   “ruler”  appears  between  them.    This  function  stays  on  until  you  click  “done”  in  the  

 

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

measure  window  on  the  right  side  of  the  GUI.    You  can  hide  the  distance  label  by   PyMOL>hide  labels   •    Selecting  a  set  of  residues:      

select  aas,  resn  cys  

•    or    

 

 

 

select  aas,  resn  cys  +  phe  

•    or,  in  a  DNA  duplex  

 

select  aas,  resn  a  +  g  

••    To  name  a  selection,  for  example:    set_name  sele,  Alanines   •    Selecting  all  carbons:    sele  symbol  c   (coloring  carbons  gray  helps  me  because  I  can’t  see  yellow  sulfurs  against  the  green   default  color  that  Pymol  uses  for  carbons)   •    Select  all  Gly:    sele  resn  gly   •    Selecting  a  set  of  residues:      

sele  resi  1-­‐10  

•  or:        

sele  resi  1+5+7  

 

 

 

•    Selecting  all  α  and  β  carbons:  sele  name  ca+cb   •    Selecting  helices,  sheets,  loops:    sele  ss  h  OR  sele  ss  s  OR  sele  ss  “”   •    One  could  also  color  helices,  sheets,  and  loops,  e.g.:    color  purple,  ss  h   •    Hide  solvent:    hide  (solvent)   •    Change  background  color  to  white:    bg_color  white   •    Electrostatic  potential  surface:    On  the  right  menu  of  objects  and  selections  (the   GUI),  for  example:  under  the  “A”  heading  for  1C83_PTP1B_ligan,  go  to  “generate”   then  “vacuum  electrostatics”  then  “protein  contact  potential  (local)”.   •    Add  hydrogens  to  protein:    h_add  1C83   •    You  can  make  a  surface  view  partially  transparent  (0-­‐1)  so  that  you  can  see  the   cartoon  beneath:  show  surface  THEN  type:  set  tranparency=0.5    (0.1  is  less   transparent  and  0.9  is  more  transparent).   •    Spheres  can  also  be  made  transparent  (0-­‐1):  set  sphere_transparency=0.7   •    Size  of  spheres  can  also  be  changed  (0-­‐1):    set  sphere_scale=0.5  (I’m  not  sure   what  the  default  size  is…  just  have  to  play  around  with  this)   •    The  extent  of  depth-­cued  fog  (0-­‐1)  is  controlled  by:    set  fog=0.5  (In  my   experience  this  effect  is  only  striking  when  the  background  is  white.    Again,  I’m  not   sure  what  the  default  setting  is  –  zero  is  less  foggy,  one  is  more  foggy).  

 

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

•    The  use  of  antialias  reportedly  greatly  affects  the  quality  of  the  image  after  ray-­‐ tracing  (and  the  also  the  time  that  rendering  will  require).    Antialias  is  either  “on”  or   “off”.    Set  antialias=0  or  1    (before  clicking  “ray”).       •    Structural  alignment  of  two  homologous  proteins:   In  this  example,  you  are  going  to  align  PH  acylphosphatase  (1w2i)  and   bovine  acylphosphatase  (2ACY).   File  -­‐>  Open  -­‐>  1w2i_nowat.pdb   File  -­‐>  Open  -­‐>  2ACY.pdb     Pymol>  align  1w2i_nowat,  2ACY   you  should  see  the  following  in  the  text  window:     ExecutiveAlign: 446 atoms aligned ExecutiveRMS: 23 atoms rejected during cycle 1 (RMS=0.86) ExecutiveRMS: 20 atoms rejected during cycle 2 (RMS=0.63) Executive RMS = 0.541 (403 to 403 atoms)  

In  this  case,  the  RMSD  is  0.541  Å   More  often,  people  report  Ca  RMSD  values  which  can  be  determined  by:     Pymol>align  1w2i_nowat  and  name  ca,  2ACY  and  name  ca  

  •    How  to  handle  structures  that  are  dimeric,  trimeric,  etc.     Each  subunit  usually  has  a  chain  identifier  a,  b,  c…     Often  it  might  be  desirable  to  view  just  one  subunit   Type:  

 

  or       or        

-­‐  hide  everything,  all   -­‐  show  cartoon,  chain  a   -­‐  show  cartoon,  chain  a   -­‐  hide  everything,  not  chain  a   -­‐hide  everything,  all   -­‐show  cartoon,  chain  a   show  sticks,  chain  a  and  resi  213-­‐216

if,  during  manipulation  of  the  protein,  things  on  the  “invisible”  subunits  show  up,   just  type  “hide  everything,  not  chain  a”  again.   ((Alternatively,  it  might  be  preferable  to  open  the  .pdb  file  using  a  program  like   TextEdit  on  the  Mac.  Then,  simply  delete  the  coordinates  for  one  or  more  of  the   monomers)).   Or…..   • How  about  when  there  are  two  proteins  shown  in  the  unit  cell,  but  I  only   want  to  look  at  one  (and  get  rid  of  the  other)? – under “display” menu select “sequence on”. A bar will appear above the structure showing the amino acid sequence of all protein chains in the window. Use option-shift to select all aa for one chain. Then on the right for the (sele) go to the A (actions) menu and select “remove atoms”. Second protein… gone!  

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

  •    Pymol  has  no  ball-­and-­stick  mode;  however,  it  can  be  simulated  with  a   combination  of  spheres  and  sticks.    

>show  spheres  

 

>show  sticks  

 

>set  sphere_scale,  0.3  (0.15,  for  small  little  knobs)  

 

>set  stick_radius,  0.2  

  sticks  and  balls  will  be  the  same  color.    If  different  colors  are  desired,  this  can   be  achieved  by  creating  separate  objects  for  each.     •  How  do  I  crank-­up  the  glossiness  of  rendered  atoms?   Type–>      set  spec_power  =  200          (#  in  range  20  –  250)   And–>      set  spec_refl=1.5          (#  in  range  1.0  -­‐  2.0)   Note  that  the  shadow  options  in  the  Display  menu  of  the  external  GUI  may  modify   these  parameters.     •  Explore  the  “Actions”  menu.    For  example:  Locate the molecule name you loaded in the right hand menu bar, On the same line as your molecule, click on A (Actions) -> preset -> pretty •  Showing  entire  structure  when  only  “half”  of  the  structure  is  shown  due  to   symmetry.    (Often  in  DNA  structures).   -­‐click  on  A  (actions)  -­‐>  generate  -­‐>  symmetry  mates  -­‐>  within  5  A.     Then  go  to  the  all  heading  and  “hide  all”…  then  one-­‐by-­‐one  show  the   selections  until  you  find  the  pair  in  which  you  are  interested.     •  Generating  “symmetry  pairs”  in  a  structure  (longer  explaination  of  the  topic   above).    Many  DNA  structures  will  show  only  one  strand  of  the  duplex  because  the   structure  is  symmetrical.     View  the  molecule  in  cartoon  format.    Pymol can use the symmetry information (indicated in the text file you downloaded) to generate the symmetry related molecules. - Click on A (actions) -> generate -> symmetry mates -> within 5 Å   Zoom out a bit and you will see that Pymol generated quite a number of neighboring molecules that are all present in the crystal and related by crystallographic symmetry. I have colored the original molecule differently from the rest using the color boxes on the right side of the molecule menu. You can make the same change to all  

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

molecules by operating on the top “all” line. You can show the crystallographic unit cell by selecting S -> cell (this is typically not helpful to me. Move on to the next step to find the symmetry pair). You must manually determine what the correct biological dimer pair by undisplaying successive molecules by clicking on their names in the menu. Note that it is not always obvious which molecule is the correct pair, even to people who have studied a protein for years. You must use your best judgment. -Undisplay them all by clicking on the all entry, then turn on the original molecule and then go down the list… one will “look right”.   Displaying  the  “interaction  diagram”  for  a  ligand.    Go  near  the  bottom  of  the   “Summary”  page  in  the  pdb  (this  typically  the  first  page  you  land  on).    Find  the   window  entitled  “Ligand  Chemical  Component”.    Look  for  the  “Interactions”   heading.  Click  on  the  window  to  see  the  interaction  diagram.    At  the  bottom  of  the   image  click  “download”  to  capture  a  .png  file    that  you  can  save  and  open  with   “preview”  (on  a  Mac).    

Should you ever want to show the phosphate trace of a nucleic acid molecule: def p_trace(selection="(all)"): s = str(selection) cmd.hide('lines',"("+s+")") cmd.hide('spheres',"("+s+")") cmd.hide('sticks',"("+s+")") cmd.hide('ribbon',"("+s+")") cmd.show('cartoon',"("+s+")") cmd.set('cartoon_sampling',1,"("+s+")") cmd.set('cartoon_tube_radius',0.5,"("+s+")") cmd.extend('p_trace',p_trace)

 

 

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

  •    Building  In  Pymol.    Only  useful  for  visualizing  “thought  experiments”…  does  not   generate  reliable,  energy-­‐minimized  (realistic)  protein  structures.   (Need  a  three-­‐button  mouse  for  this,  SWITCH  MOUSE  TO  3-­‐Button  EDITING  MODE!)   Moving  waters  and  ligands:   Moving  waters  and  ligands  is  easy.  Just  remember  to  set  mouse  into   editing  mode  first!         For  atomic  waters,  just  CTRL-­‐left-­‐click  and  drag.     For  multi-­‐atom  ligands,  CTRL-­‐middle  click  on  an  atom,  and  then  SHIFT-­‐ middle-­‐click  on  that  same  atom  to  drag  it  around.     SHIFT-­‐left-­‐click  on  that  same  atom  can  be  used  to  rotate  the  entire   fragment.   Moving  entire  loops:   In  the  menus,  go  to:  Mouse  -­‐>  3  Button  Edit   In  the  menus,  go  to:  Build  -­‐>  autosculpt   Sele  resn  367-­‐370  (use  number  range  appropriate  for  your  protein)   Control-­‐shift-­‐left-­‐click  DRAG…  and  the  whole  loop  moves  while  Pymol  does  its  best   to  keep  the  bond  angles  reasonable.   Changing  the  conformation  of  a  single  side  chain.    Rotating  about  a  single  bond:   In  the  menus,  go  to:    Mouse  -­‐>  3  Button  Edit   Control-­‐right  click  on  bond  that  you  want  to  rotate.    (or  double-­‐right-­‐click)   Then  control-­‐left  click…    DRAG  the  mouse  after  “grabbing”  one  of  the  substituents   on  the  end  of  the  bond…  and  the  bond  (and  its  substituents)  will  rotate.   Moving  a  single  atom  within  a  larger  structure   In  3-­‐button  editing  mode,  double-­‐click-­‐and-­‐hold  on  the  atom…  then  drag  it  where   you  want  it!   Drawing  a  new  bond:   In  3-­‐button  editing  mode,  left-­‐click  on  two  atoms.    Then  under  the  “Build”  menu   select  “create  bond”.      

Pymol  tips  and  tricks  

 

Gates,  Kent  S.    Univ  of  Missouri  

Deleting  a  bond:   In  editing  mode,  select  the  bond  using  Ctrl-­‐right-­‐click,  then  either  “unbond  pK1,  pK2   or  hit  Ctrl-­‐D   Deleting  an  atom   In  3-­‐button  editing  mode:    left-­‐click  on  an  atom  then  hit  “Crtl-­‐D”   Building  a  carbon  chain   In  3-­‐button  editing  mode,  select  a  hydrogen  atom  by  left-­‐clicking  on  it,  then  hit:   “Crtl-­‐C”…this  adds  a  CH3  group.    Then,  select  a  hydrogen  atom  on  the  end  of  the   growing  chain  and  hit  Crtl-­‐C  again,  etc.   Manual  Docking  in  PyMOL   1.  Open  the  small  molecule  pdb  file.   2.  Go  to  the  File  menu  and  open  the  macromolecule  pdb  file.    Now  both  players  are   in  the  viewing  window.   3.  To  selectively  move  the  small  molecule  into  position:    Switch  to  3-­‐button  edit   mode,  and:   (a)  shift-­‐center  click  moves  the  molecule  in  x-­‐y  plane   (b)  shift-­‐right  click  moves  it  “in  and  out”  on  z-­‐axis   (c)  shift-­‐left  click  rotates  the  small  molecule.   (with  no-­‐shift  the  entire  ensemble  can  be  rotated  etc.)     4.  To  save  files  as  a  pdb  (instead  of  a  PyMOL  session,  for  example).    Type:  select  all   in  the  command  line.    Hit  “enter”.    Then,  in  the  A  (action)  menu  for  the  “sele”  you   just  created,  pick  “rename  selection”.    A  line  appears  in  the  viewer  and  you  can  type   in  the  name.    Hit  “enter”.    Then,  go  to:  File  menu  -­‐>  Save  Molecule  -­‐>  Find  the  one   that  you  just  named  on  the  list  and  Save  it.     •    Altering  the  properties  of  individual  atoms  in  the  structure  (color,  etc).    In  3-­‐ button  viewing  mode,  right-­‐click…  a  menu  appears  on  top  of  the  atom.    In  this  menu,   under  heading  of  “atom”  you  can  color,  show,  label,  etc.    In  3-­‐button  editing  mode,   command-­‐right-­‐click…  menu  appears.