Atom selections



Many of the commands in Wit!P use atom selections as one or more of their arguments. We have already encountered a simple example of an atom selection in one of the preceding sections: after reading the file 4apr.pdb we used the following command
Wit!P> display find / /4apr
to "find" the molecule (i.e. to bring it to the center of the visible extent of the universe). In this command "display" and "find" are keywords, "/" denotes a display object (the root of the display tree), and "/4apr" is an atom selection (all atoms in the molecular data tree with root /4apr).

In the previous section, we have learned that 4apr contains two chains, E (enzyme) and I (inhibitor). An easy way to find the inhibitor is to

Wit!P> display find / /4apr/*/I
Wit!P> color green /4apr/*/I
This time, the display find command will translate the root of the display tree to bring the average position of atoms in the atom selection /4apr/*/I (all atoms in chain I) to the center of the visible extent of the universe. The color command then changes the atom colors of atoms in the same atom selection to green. The asterisk ("*") in the atom selection is a wild-card, which matches any sequence of arbitrary characters (the chain I is stored at level 3 of the molecular data tree, and the asterisk matches the "A" for the asymmetric unit at level 2). An isolated asterisk between to slashes ("/") may be omitted in atom selections. In our example the following atom selections are all equivalent: If you have tried to enter the atom selection through the menu you will have encountered a small difficulty: only level 1 nodes are offered as choices in the atom selection menu. There is no function in the menu which lets you descend into the molecular data tree to specify the I chain, and so you are forced to use the keyboard to enter the atom selection (Sorry for the inconvenience; this "bug" might be fixed in a future version of the program). But consider that using the keyboard for the atom selection has its immediate reward: since the next command uses the same atom selection, the atom selection may be recycled if you enter the commands like this:
Wit!P> display find /
[0 atoms selected] which atoms? /4apr/*/I
Wit!P> color green
[0 atoms selected] Atoms:
then hit CurUp twice (once, if you entered color green through the menu) to "recall" the atom selection string and hit Enter to send it to the command parser).

The binding site of 4apr is partly covered by a two stranded beta structure (the so-called "flap"), which runs from residue THR_72 to ILE_86  of chain E (I know this, because my trained eye immediately spotted the "flap"; finding out the reside names was a piece of cake, with Shift-Atompick). Let's change the color of the "flap" to yellow:

Wit!P> color yellow /4apr/A/E/thr_72-ile_86
The dash ("-") in thr_72-ile_86 makes this a range (everything between THR_72 and ILE_86. Since residue numbers 72 and 86 are unique, it would have been O.K. to use ////*_72-*_86 for the atom selection. But don't be too lazy: ////*72-*86 would have failed, because both wild-card strings match several residues (you may convince yourself of this with the list ////*72 and ////*86 commands) and the range would extend from the first match for *72 (THR_72) to the last match for *86 (ILE_286), which is a lot more than what was intended.

Comma means "or": thus, to color all atoms in the aromatic residues (Phe, Trp, Tyr) magenta, the following command may be used:

Wit!P> color magenta ////phe*,trp*,tyr*
(Note: the "," in atomselections may not be followed by a space " " or slash "/").

The -atom restrictor may be used to restrict the current atom selection to atoms with a given property. Frequently used properties are name and symbol. E.g. to restrict the display to the backbone atoms of chains E and I, enter

Wit!P> display only ///E,I -atom name n,ca,c,o -done
(the -done token acts as a "parenthesis" and is needed to close the -atom restrictor). The -atom restrictor is especially useful when one wants to address all atoms of a given chemical type, irrespective of level at which the atom occurs in the molecular data tree. E.g.
* -atom symbol O
could be used to select all oxygen atoms. Without -atom the more complex selection
//O* ///O* ////O* /////O*
would have to be used, and this would work only if the molecular data tree does not contain a residue (or chain...) with a name starting with O and if the maximal level at which oxygens occur is 5. Also, the more complex atomselection relies on the convention that all oxygens have names beginning with O. Did you notice, that we just introduced another form of "or"? The spaces " " in the previous atom selection mean "or", i.e. the selection addresses atoms with names that begin with //O or ///O or ////O or /////O.

The enzyme has two disulfide bridges, which we can't see of course, since we are currently displaying only backbone atoms. To turn on side chain atoms of cystines enter

Wit!P> display on * -atom name cys*/cb,sg -done
which selects all atoms with names ending in cys*/cb or cys*/sg. (Can you locate the two disulfide bridges? If not, try
Wit!P> cpk on * -atom name cys*/cb,sg -done
to make the display of the bridges a bit more prominent. Remember that you may use the CurUp (cursor-up) key to recall the atom selection from the previous command). Since all of the selected atoms occur at level 5, the simpler selection ////cys*/cb,sg could have been used. The form with the -atom restrictor has the advantage that it works irrespective of the level at which cystines are store in the molecular data tree.

Another often useful operator is -connected, which like the -atom restrictor acts on the current atom selection. When used at the end of a selection, -connected expands the current selection to include all atoms that are connected directly or indirectly to an atom in the initial selection. To see the -connect expander in action, type (or select from the menu)

Wit!P> display on<
[0 atoms selected] Atoms: (now pick, i.e. righ-click, any atom of the inhibitor)
[1 atoms selected] Atoms: -connected
This will turn display on for all (and only) inhibitor atoms, since the inhibitor consists of a single, connected piece, without covalent bonds to the rest of the 4apr structure. The -rzone restrictor may be used to turn on the display of all atoms in residue of the enzyme which are within a given threshold (7.5 A, for example) of the inhibitor:
Wit!P> display on ///E -rzone 7.5 ///I -done
The -rzone restrictor always includes whole residues, i.e.. if an atom is included in the selection, all atoms with the same parent node in the molecular data structure will be included as well (restriction to atoms within the given cutoff precedes expansion to whole residues). The -zone restrictor is very similar, but it does not have this residue closure property of the -rzone restrictor. To see the difference
Wit!P> display only * -rzone 7.5 ///I -done
Wit!P> color cyan ///E -zone 7.5 ///I -done
Each displayed residue of the enzyme has at least one atom colored in cyan (the -zone 7.5 atoms), but some displayed enzyme atoms are non cyan (i.e. they are included in the -rzone selection, but not in the -zone selection).

And finally let's very briefly touch -not, -and, and -or :

Wit!P> display off *
Wit!P> display on * -not ///i -done
Wit!P> label symbol * -zone 3.5 ////*_12/CA -done -or * -zone 5.5 ////*87/CA -done -done
Wit!P> label residue ////pro* -rzone 1.6 ////val*/C -done -and /////CA
(Undisplay the lot, then turn everything except the inhibitor back on. Label atoms within 3.5 A of CA of Gly12 or within 5.5 A of CA of Leu87 with the chemical symbol. Label CA's of prolines following a valine with the residue name. I'll let you ponder this for a while...).

Fortunately, atom selections with the complexity of the last two examples are rarely needed.

There is one atom selection operator (-set) that remains to be explained in a later section (when we come to the topic of defining and using atomsets).


If your not too exhausted, you may move on to the next topic now.



A.Widmer, NIBR/CPC/CSG-SB