Hints on distance and compact selection: Cartoons in PyMol

Hints on distance and compact selection:
Hydrogen bonding is done with "distance". There are some parameters to set for the dashes displaying
the distance line. You can set these parameters to make the dashes look the way you want. Here is an
example:
set dash_gap,0.2
set dash_width,3.5
set dash_radius,0.1
set dash_length,0.3
set dash_round_ends,on
"distance" draws a dashed line between the 2 atoms you select. Here I'm
naming this distance object "link1", then I can use the name to hide the
number label and color the line:
distance link1, A/127/C, A/ADP/N6
hide labels, link1
color green, link1
Notice that this compact way of selecting an atom (A/127/C) is detailed on
the pymol reference card. (We looked at this quickly in class: you can
find it with google).
The way this works is that if you begin the string with a slash (ex: color
red, /1Z6T//A/1-100) then pymol assumes you're specifying
/peptide/ligand/chain/residue/atom from the top down. Notice since we
didn't need to specify ligand, that place was empty "//". You can end the
sequence early, however, leaving off atom, residue, etc. In this case we
left off atom.
If you don't begin with a slash (ex: A/127/C), then pymol takes your string
to end at atom specification and include as many higher levels as you have
provided. In this example, the 3 specifications are chain=A, residue=127,
atom=C).
Code for hydrogen bonds in pdb file 1Z6T: Afap1 bound to ADP is below
Cartoons in PyMol
Manipulating cartoon representations in PyMol is a bit idiosyncratic; in particular, Show > Ribbon (or
show ribbon, <object>) does not do what you might expect from other programs. Important
manipulations of the cartoon representation are summarized here. To use these commands, you will
most likely want to first click Show > as > Cartoon in the Show menu for a loaded PDB. By default,
smoothing is enabled in cartoon representations so that helices and especially sheets are shown as
roughly straight, rather than bent to follow the protein backbone.
 To turn off all smoothing: set cartoon_flat_sheets, 0 and set cartoon_smooth_loops, 0. To turn
smoothing back on, set both variables to 1.
o When displaying local side chains along with a cartoon structure, it is best to set
cartoon_flat_sheets to 0 so that the cartoon and sidechain representations appear to be
connected.


cartoon automatic - reset cartoon representations to defaults.
cartoon loop - thin ribbons following the backbone, the way loops are shown in the default
representation.
 cartoon oval, cartoon arrow, cartoon rect, cartoon tube - various shapes for tracing out the
backbone, of which tube is usually the clearest.
The best way to choose secondary structure color schemes besides the two in the Color > By ss object
menu is to use selections. For example, to turn all helices blue, use color blue, ss h.
Because different proteins are best represented with different depictions, we can't give a thorough
overview of all possible knobs to twiddle. See Settings > Edit all for a complete listing of parameters
(listed alphabetically; all those related to cartoons begin with the word cartoon_) and experiment.
# Display 8 specific hydrogen bonds between Afap1 and ADP (pdb id 1z6t)
dist hb_1, A/127/N, A/ADP/N1, mode=2
hide labels, hb_1
color green, hb_1
dist hb_2, A/127/O, A/ADP/N6, mode=2
hide labels, hb_2
color green, hb_2
dist hb_3, A/159/N, A/ADP/O2B, mode=2
hide labels, hb_3
color green, hb_3
dist hb_4, A/160/N, A/ADP/O2B, mode=2
hide labels, hb_4
color green, hb_4
dist hb_5, A/160/NZ, A/ADP/O2B, mode=2
hide labels, hb_5
color green, hb_5
dist hb_6, A/161/N, A/ADP/O1B, mode=2
hide labels, hb_6
color green, hb_6
dist hb_7, A/162/N, A/ADP/O1A, mode=2
hide labels, hb_7
color green, hb_7
dist hb_8, A/438/NE2, A/ADP/O3B, mode=2
hide labels, hb_8
color green, hb_8
More generally, potential hydrogen bonds are detected with the distance
command mode 2, after setting cutoffs:
set h_bond_cutoff_center, 3.6
set h_bond_cutoff_edge, 3.2
dist Hbonds, chain A, (chain A and resname ADP), mode=2