
OBJECTIVE: This tutorial provides a basic introduction to spock's selection facility.
Concepts introduced: atom and surface selection (§ 5.3), secondary structure calculations (§ 6.7.7).
Note: This tutorial is intended to provide an introduction to selection in spock. Users are encouraged to read the appropriate manual section (§5.3) for more details about selection.
Start spock and load the dimeric protein 1brl.pdb. You can load
this via the File
Open
PDB file menu, or by
typing
fetch=1rnt.pdb
on the command line. Rotate the molecule around until you can clearly see that there is more than one molecule here. Type
mlist
to get a list of the currently defined molecules. We see that there are two protein molecules (1 and 2) and a third molecule that contains water and a phosphate ions. (Note: there are several other ``list'' commands. See Appendix D for a full list of them).
We want to color the subunits independently, so type:
wc=2,m=1
wc=4,m=2
These two commands set the worm colors for the first and second molecules, respectively. The m= part of the command limits the coloring command to apply only to the specified molecule. Let's hide the bonds, so type
bc=0
I prefer the secondary structure representation of the backbone to the
tubular worms that are currently on, so change the worm representation
with the menu sequence ``Alter
Worms
Secondary
structure.'' Notice that instead of a nice secondary structure
representation, we just get thiner tubes. This is because there is no
secondary structure information present in this PDB file. Luckily, spock
can determine this information for us. Under the Modeling menu, choose
``Calculate secondary structure''. Wait a few seconds, and spock will
update the ribbons to a secondary structure representation.
Now let's highlight some potentially interesting sites on the worm.
Imagine you have a list of mutants and you want to know where they are.
In the
subunit, they are residues 50, 72, and 284, while in the
subunit, they are 18, 139, and 255. Let's do the
ones
first. Type
wc=5,rn=[50,72,284]
The rn= stands for residue number, and the square brackets
indicate that you're entering a list of residues, each of which should be
selected. Look at the result. Oops! This command got applied to both
subunits. This should have been just for
. Type
wc=u
to undo the worm color change, and then hit the up arrow key twice to recall the last wc=5 command. Edit it to read
wc=5,rn=[50,72,284],ch=a
The ch=a will further limit the selection to the ``A''
chain. (We could have used m=1 here again, but we're trying to
introduce various selection commands.) Not all PDB files will have chain
information, but we could see from the mlist command above that
there were A & B chain identifiers after the residue numbers. Now enter
the
chain mutants with the command
wc=5,rn=[18,139,255],ch=b.
Now let's see which of these mutants are close to a tryptophan residue. Type
wc=10,r=trp
bc=d,r=trp
to highlight all the tryptophan residues on the backbone worm, and to restore the default colors for the trp residues. The r= selection string selects on the residue name; the three letter id code for a residue type. The r= can also select residues based on membership in a pre-defined set, such as hydrophobic or polar residues. See the list of pre-defined sets in Appendix A. For now, turn on the aromatic residues in chain A with the command
bc=10,r=aromatic,ch=a.
Yuk. Let's pretend we didn't do that:
bc=u
Instead, let's turn on the bonds for the mutant sites that we've previously highlighted, by typing
bc=d,wc=5
This sets the default colors for any residue where the worm color is currently 5, demonstrating the use of color as a selection property. You can also select on atom color (ac), bond color ( bc), and several other object color properties, all described in the Quick Reference guide (Appendix D), or the Selecting on color section of the manual (§5.3.5). Rotate the molecule around a bit and take a good look.
Let's focus in a bit on the
subunit now, so type
bc=0,m=2
wc=0,m=2
set center,m=1
These commands hide the bonds and worms for the second molecule (the beta subunit), and then re-centers on the first molecule. It'd be quite helpful to have labels for the selected residues, so turn on labels under the Display menu. Notice that we get a screenful of labels. Type
wc=0
lc=0
lc=1,bc<>0
This will first turn off all worms and labels, and then turn labels back on for atoms for bonds whose bond color is not equal ``<>'' 0. The lc=1 command wasn't restrictive enough, however, because now every atom in the residues is labeled; we need to be more specific. Type
lc=u
lc=1,bc<>0,a=ca
The first command undoes the erroneous coloring command, and
then sets the label color for carbon-
atoms (a=ca) of
residues whose bonds are not currently colored 0 (hidden). Again, notice
that adding a second selection string to the end of the command further
restricts the command to apply to only those atoms which match both sets
of criteria. In practice, there's an easier way of turning on labels for
just CA atoms. Type
lc=0
lc=d,bc<>0
The lc=d command sets all atoms labels to their default colors. The default color for labels is 0 (hidden) for all atoms except CA atoms, or phosphate atoms in DNA. Use the left mouse button to pick any atom in one of the trp's currently in the display. Notice the identifying string. (I picked TRP 40A CH2, yours may differ). Let's turn on a label for this atom. In my case, I'd type:
lc=8,rn=40,ch=a,a=ch2
Your values may differ, but you should at least specify the chain ch, residue number rn, and atom name a. Alternately, notice that when you picked the bond, spock responded with the atom number as well, in my case I got ``Picked bond(317)...'' The 317 here is the atom number, so I could have used
lc=3,an=317
to select just the given atom.
Now let's say we wish to select two ranges of residues, that is all the residues from 1 to 50, and all those residues from 200 to 220. We can't use the comma operator as we've been using (i.e. rn=(1,50),rn=(200,220)) , because that would limit the command to apply to residues whose residue numbers were both 1-50 and 200-220. Since each residue only has a single residue number, no residue can satisfy both of these requirements simultaneously. Instead, we must use the ``or'' operator, which is two vertical bars: ||. Type:
wc=2,rn=(1,50)||rn=(200,220)
Notice that this command applies to both the A and B chains. What we're really interested in is just the A chain, so let's undo this coloring command.
wc=u.
To limit just to the A chain, we need the ch=A selection string. Try this:
wc=d,ch=a,rn=(1,50)||rn=(200,220)
Again, notice that part of the B chain is colored. This is because selection commands are evaluated in order from left to right, so for the last command, spock selected residues in chain A with residue numbers from 1 to 50, or residues from 200-220 (which can include 200-220 in the B chain). It's usually difficult to figure out how spock will interpret a command with mixed ``and''s and ``or''s (commas and ||'s). Therefore it's best to surround such complex commands with curly braces ({ and }). So to do what we want here, we should use the following:
wc=u
wc=d,ch=a,{rn=(1,50)||rn=(200,220)}
With the ``and'' and ``or'' selectors, you can create quite complex selection strings with ease. At this point, readers are strongly advised to read the manual section on selections (§5.3), and to browse the quick reference guide (Appendix D).
