Select Commands in Jmol and RasMol
by Eric Martz; adapted for Jmol by Bob Hanson

Display and Hide
Select vs. Restrict
General form of the select command
Expressions Further Information

Jmol Interactive Command Reference

Display and Hide

The Jmol commands Display and Hide display or hide atoms but do not select them. These commands are not Rasmol commands. One of the tasks in developing the Jmol version of Protein Explorer from the Chime version will be to incoporate these commands. Currently they are not implemented.

Select vs. Restrict

Select commands select atoms but do not display them. Pay attention to the report of "atoms selected" to see whether the command worked. After a select command, you need to apply a display representation (backbone, ball and stick, spacefill, etc.) in order to see the selected atoms. Often you will also want to apply a color or color scheme. Remember that all menu actions or commands (other than select or restrict commands) affect only the currently selected atoms. If nothing happens, you probably don't have the relevant atoms (or any atoms at all) selected!

Restrict commands select, but hide atoms not selected. All expressions which can be used in select commands can also be used in restrict commands. The command hides everything not selected, without changing what is selected. (The expression "selected" is a predefined term.) Other commonly useful restrict commands are, for example,

General form of the select command

The most general form of the select command is The expression represents a set of atoms, and can use terms of several types. Terms can be combined with parentheses and the Boolean operators and, or, not. Comma means the same as "or".


In the examples below, words in italics are comments -- do not type them!

Atom serial numbers.
Every atom in PDB file has a serial number. To find out an atom's serial number, click on it. The serial number is the first number in the report. You can select, for example:

Element names.
Type the full element name, not the 2-character symbol. You can select, for example:

Atom PDB names.
PDB files name each atom in a standardized way (up to 4 characters). Alpha-carbons are CA, beta-carbons CB, and so forth through CG, CD, CE, CZ, CH (gamma, delta, epsilon, zeta, eta). Other examples are N7 (7th nitrogen in a residue), O2P (second oxygen on a phosphorus), OE2 (second oxygen on an epsilon carbon), HD1 (1st hydrogen on a delta carbon). To find out an atom's PDB name, click on it. Its name is reported as the first word following "Atom:". You can select, for example:

Group/Residue names.
RasMol uses the broad term group to designate residues or other chemical groups. Here, we'll use the terms group and residue interchangeably.

Each residue in the PDB file is given a name of 1-3 characters in length. All amino acids use the standard 3-letter abbreviations ALA, ASN, ASP, etc. DNA and RNA nucleotides are given residue names A, T, U, G, and C. Other common residue names are HOH (water), NAG (N-acetyl glucosamine), and so forth. Uncommon ligands or moieties may be given nonstandard 3-character residue names. To find out the name of a residue, click on it: the residue name is the word after "Group:" or "Hetero:" in the message report.

Some residue names may contain digits, such as SO3 or PO4. These must be enclosed in square brackets in order to be recognized in select commands, for example "select [so3]".

Calcium or other metals are commonly given 2-character residue names the same as their element symbols, e.g. CA, MN, MG, ZN, etc. Note that in the case of calcium, "select ca" (the "residue" calcium) gives different results from "select *.ca" (all alpha carbons plus calcium). Confusingly, the atom names for both are CA. So in this case, to select only alpha carbons, "select protein and *.ca".

You can select, for example:

Group/Residue numbers
Each residue is give a residue number (not to be confused with the serial numbers of the atoms within the residue). Residues numbers are unique within each chain, and within hetero residues. Thus, "select 1" will select residue 1 in each chain plus hetero residue 1. To find out the number of a residue, click on it. The second number in the report is the residue number. You can select, for example:

Each polymer chain (polypeptide, nucleic acid, carbohydrate, etc.) has a single character name (letter or digit). In a select command, this character must be prefixed with a colon or an asterisk to signify that the letter represents a chain. Most ATOM records in the PDB file are members of a chain; sometimes all. Whether or not ligands of a chain are given the same letter as the chain to which they bind, a different chain letter, or no chain letter, varies. HETATM (hetero) atom records are considered to be a "chain" only in the sense that they are all assigned the same color by the "color chain" command. To find out what chain an atom belongs to, click on it. You could select:

Predefined terms.
Jmol and RasMol predefine the following terms which can be used in select commands.

Charged Cyclic

Summary definitions of predefined terms (equivalent expressions understood by Chime/Rasmol are in regular print; explanations are in italics):

Acidic = Asp, Glu
Acyclic = amino and not cyclic
Aliphatic = Ala, Gly, Ile, Leu, Val
Alpha = alpha carbons (don't confuse with helix)
Amino = all atoms in amino acids
Aromatic = His, Phe, Trp, Tyr
Basic = Arg, His, Lys
Buried = amino and not surface
or Ala, Leu, Val, Ile, Phe, Cys, Met, Trp
or (Hydrophobic and not Pro) or Cys
Charged = acidic or basic
Cyclic = amino and (aromatic or Pro)
Hetero = all atoms designated HETATM in the PDB file;
all hetero atoms are classified as either solvent or ligand.
Hydrogen = hydrogen or deuterium,
same as elemno=1
Hydrophobic = Ala, Leu, Val, Ile, Pro, Phe, Met, Trp
Ions = phosphate, sulfate hetero atoms
Large = amino and not (small or medium)
or Leu, Ile, Phe, Met, Trp, Tyr, Glu, Gln, His, Lys, Arg
Ligands = hetero and not solvent
Medium = Val, Thr, Asp, Asn, Pro, Cys
Neutral = amino and not (acidic or basic)
Polar = amino and not hydrophobic
or Cys, Gly, Ser, Thr, Lys, Asp, Asn, Glu, Arg, Gln, Tyr, His
Small = Ala, Gly, Ser
Solvent = water or ions
Surface = amino and not buried
or Gly, Ser, Thr, Lys, Asp, Asn, Glu, Pro, Arg, Gln, Tyr, His
or (polar and not Cys) or Pro

User-defined terms.
You can define arbitrary terms to represent groups of atoms, and then use the terms you have defined in select or restrict commands. The general form for the define command is: Typically, one selects the atoms desired, and then defines the term. For example, Once defined, you can use such terms in boolean expressions, for example (Backbone and hydrophobic are predefined terms.)

Within specified distance.
The "select within" command is one of the most powerful in RasMol. The format is Usually, one does not wish to select the atoms in the expression, in which case the command becomes something like this: The distance is in Angstroms.

Further Information

The above examples include the commonly needed cases, but not all cases recognized by Jmol and RasMol. To learn more about the select commands and command language in RasMol and Jmol, consult these documents: