2.5 An Introduction to Atom Selection
In this section it is assumed that you have the myoglobin structure mbco.pdb loaded and the views
discussed in 2.2 created. If this is not true, go back to 2.2 and repeat the process described there.
VMD has a powerful atom selection method which is very helpful when generating attractive,
informative, and complex graphics. In the previous section you used a few of these atom selection
tools. This tutorial assumes that you have already loaded the myoglobin molecule, but it isn’t
necessary to recreate all the graphical representations.
To change which atoms are used to display each representation of the molecule shown in the
display window, open the Graphics form [§ 4.4.6] and select the representation you want to change.
You can then either edit the different fields (selection, coloring method, or drawing method) or use
the Delete button to delete the view entirely. Try changing or deleting some of the views. When
finished, delete all representations for the myoglobin structure. To get the basic line drawing view
back, clear the atom selection text entry area (press Esc), enter all and press the Create New
button.
Atoms may be selected on the basis of a property, i.e. protein or not protein, water,or
nucleic backbone. They may also be selected by atom name, such as atom C, by residue name,
such as resname HEM, or by many other identifiers. Multiple atoms may be specified with one key-
word. For example, the selection name C CA N O will select the backbone atoms. (A similar effect
may be obtained with the command protein backbone.) VMD can handle regular expressions,
so that name "C.*" will select all atoms with names starting with C. VMD also understands the
boolean operators and, or,andnot, so the selection resname HEM and not name "N.*" selects all
non-nitrogen atoms in the heme group of myoglobin.
Several more abstract selection criteria are available. For instance, the selection x > 5 finds all
atoms with an x coordinate greater than 5, while mass >12 and mass < 14 selects all atoms with
mass greater than 12 and less than 14 atomic mass units. Many math functions are also provided, so
the selection sqrt( sqr(x) + sqr(y) + sqr(z) ) < 10 will select atoms in a spherical region
of radius 10
˚
A centered about the origin of the coordinate space. You can pick atoms nearby
a selection with the phrase “within <distance> of <selection>” and all residues with the same
property as a given selection as “same <property> as <selection>”.
See section § 5.3 for a full description of the selection command.
2.6 Comparing Two Structures
Let’s start from scratch by deleting everything: open the Mol form [§ 4.4.3], select every line in the
browser (there should be only one), and press the Delete button.
Start by loading the mbco.pdb structure with the Files form. Turn on just the heme, CO, and
histidines by using the selection commands resname HEM CO or resid 64 93. The dot (probably
green) in the middle is the iron and you can verify that by picking it with the mouse. Do this by
changing the “Object Mode” pull-down to “Pick”, and selecting “Atoms” for the pick mode in the
Mouse form. The label HEM154:FE should appear both on the display and in the text console.
Change the pick mode in the Mouse form to “Bonds”. To get the distance between the iron and
the oxygen of the CO, click with the left mouse button first on the iron and then on the oxygen.
The first click turned the FE label on and the second turned the O label on and drew a line
between the two atoms with the distance drawn in the middle and a bit to the right. The distance
between the two atoms is 2.94
˚
A, as compared to 2.93
˚
A in the paper; not bad. However, picking
19