Two useful types of selection mechanisms available in VMD are:
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. On a cautionary note, the distance search method is not very efficient, making these selections rather slow. Some selections may be sped up by short circuiting.
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 35which 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 ....