next up previous contents index
Next: Viewing Modes Up: Selection Methods Previous: Comparison Operators   Contents   Index

Subsections

Other selections


sequence

VMD supports selection based on the one-letter amino acid sequence with the sequence selection keyword. This allows selections of the form
  sequence APD
  sequence "C..C"       (might be used to pick out zinc fingers)
  sequence AATCGGAT

Unlike the other string selection commands which take one of three types of strings, all the strings for sequence are taken as regular expressions (though strings with non-alphanumerics must still be quoted to get past the input parser). The method works by taking each of the protein and nucleic acid fragments (pfrag and nfrag) in turn and constructing the one-letter amino acid sequence. If a regular expression matches any of the sequence, the atoms in the matching residues are selected. Multiple matches are allowed, though they cannot overlap. As is usual with regular expressions, the largest possible match is made, so take care with expressions like C.*C.


within and same

Two useful types of selection mechanisms available in VMDare: within <number> of <selection> and same <keyword> as <selection>. The first selects all atoms within the specified distance (in Å) from a selection, including the selection itself. Therefore, the command:

        within 5 of name FE

selects all atoms within 5 Å of atoms named FE. One common use for this command is to limit the region of atoms shown on the screen. Another is to find atoms that may be involved in interactions. For instance:

        protein within 5 of nucleic

finds the protein atoms that are nearby nucleic acids. Some selections may be sped up by short circuiting.

A related atom selection construct is exwithin, short for 'exclusive within'. The atom selection (within 3 of protein) and not protein is equivalent to exwithin 3 of protein.

The same <keyword> as <selection> finds all the atoms which have the same `keyword' as the atoms in the selection. This can be used for selections like

        same fragment as resid 35
which finds all the atoms attached to residue id 35. Any keyword can be used, so selections like
        same resname as (protein within 5 of nucleic)
are fine, although weird. The perhaps the most useful keyword for this command is residue, so you can say same residue as ....

Finding contact residues

Suppose you want to view the atoms in ``A'' which are in contact with ``B''. Use the within <distance> of <selection> selection command. For purposes of demonstration, let A be protein, B be nucleic, and define contact as an atom in A which is within 2 Å of an atom in B. Then the selection command is

        protein within 2 of nucleic

If you want to see all the residues of A which have at least one atom in contact with B, use

        same residue as (protein within 2 of nucleic)


next up previous contents index
Next: Viewing Modes Up: Selection Methods Previous: Comparison Operators   Contents   Index
vmd@ks.uiuc.edu