Measuring distances

Measure distances interactively

  • ‘2’ (or Mouse ‣ Label ‣ Bonds)
  • click tip of LID and tip of NMP domain
  • play the trajectory: label changes dynamically
  • If you want to change the color of the dashed line that connects two atoms, use Graphics ‣ Colors, under Categories select Labels and for Names select Bonds and pick a Colors.

Time series of distances

  • Graphics ‣ Labels - Atoms: select Bonds - select (highlight) bond in bond list widget - tab Graph (Show preview, click on bond) - Graph... to plot the distance as a function of time
  • try different distances between residues (use the CA) and plot together: which change, which don’t?
    • What would be good distances to report on conformational changes, e.g. for FRET?
    • Try also [Beckstein2009]
      • I52-K145
      • A55-V169
      • A127-A194

Advanced: setting labels with Tcl commands

VMD comes with a full-blown scripting language, namely Tcl with VMD-specific extensions (which are described in the VMD Users Guide).

These commands are entered as text commands on the Tcl command line. Open Extensions ‣ Tk console.

The label command has the syntax for adding a new Bonds

label add Bonds $molID1/$atomID1 $molID2/$atomID2

where $molID refers to the molecule number (e.g., 0) and $atomID is the internal atom index that VMD assigns to each atom. Getting this atom index is a bit convoluted and uses the atomselect command. In the following example, we create a bond distance between the CB atoms of residues Ile52 and Lys145:

set molID1 0
set molID2 0
set atomID1 [[atomselect $molID1 "protein and resid 52 and name CB"] list]
set atomID2 [[atomselect $molID2 "protein and resid 145 and name CB"] list]

# show the atom indices (optional)
puts "Ile 52 CB:  $atomID1"
puts "Lys 145 CB: $atomID2"

# create the label
label add Bonds $molID1/$atomID1 $molID2/$atomID2

The bond label between I52 and K145 should appear now.