Changing the Display of a Portion of Your Molecule
Contributors

This Jmol Training Guide was created with funding from NIH Grant #1 R25 RR022749-01 and NSF-DUE #1323414 using the Jmol e-Poster Creator from the MSOE Center for BioMolecular Modeling

version 1.0
The Select Command and Boolean Operators in Jmol

Unless otherwise indicated, this section of the Training Guide uses the protein Top 7 based on PDB file 1qys.pdb. Please see Getting Started with Jmol for information on how to download and open PDB files.

The Select Command

Thusfar, every command we have typed into the Command Line has affected the entire protein. However, we can specify parts of a molecule that we want to display differently by using the Select command. Below is a description of commonly used Select commands along with a Jmol button. When using the select command, Jmol will respond with "# atoms selected", where # will be the number of atoms selected. The display will NOT change until you supply additional commands, and those commands will ONLY operate on the parts of the molecule you have selected. To change another part of the molecule, you have to enter a new select command.

Please click the button after each description to see how Top 7 from 1qys.pdb will look with the selected area colored red. (Following the select command, a second command "Color red" is entered. This will color the selected portions of the molecule.)

All

Select all is the default Jmol selection. With select all, every atom contained in a PDB file is selected and will be affected by future commands.

Note: When a select command is executed, Jmol displays the number of atoms selected in the Jmol Console Window. You should get a feel for whether the number of atoms selected is what you expected.

To select every atom, type:

select all

To color this selection red, type:

color red

Select All

Note: The Jmol buttons of Top 7 shown below have been reset before each set of commands. To do this, use the select all command followed by color gray.

Backbone

With select backbone, only the backbone atoms will be affected by future commands.

To select the backbone, type:

select backbone

To color this selection red, type:

color red

Select Backbone

Note: The sidechains are not colored red.

Sidechain

With select sidechain, only the atoms that are part of sidechains in a protein will be affected by future commands.

To select the sidechains, type:

select sidechain

To color this selection red, type:

color red

Select Sidechain

Hydrophobic

With select hydrophobic, only the hydrophobic amino acids in a protein will be affected by future commands.

To select hydrophobic, type:

select hydrophobic

To color this selection red, type:

color red

Select Hydrophobic

Helix

With select helix, all atoms that are part of alpha helices will be affected by future commands.

To select alpha helices, type:

select helix

To color this selection red, type:

color red

Select Helix

Note: Jmol does not recognize "helices" (plural) but only "helix" (singular).

Sheet

With select sheet, all atoms that are part of beta pleated sheets will be affected by future commands.

To select beta pleated sheets, type:

select sheet

To color this selection red, type:

color red

Select Sheet

Nucleic

With select nucleic, all atoms that are part of nucleic acids (DNA, RNA) will be affected by future commands.

To select nucleic acids, type:

select nucleic

To color this selection red, type:

color red

Select Nucleic

Note: The Top 7 protein does not contain any nucleic acids and therefore nothing is colored when the select nucleic command is used. A zinc finger protein based on the file 1zaa.pdb does contain nucleic acids and therefore will have areas colored red. Click the button below to see select nucleic on a zinc finger protein.

Select Nucleic – Zinc Finger Protein

Water

With select water, all water molecules will be affected by future commands.

To select water molecules, type:

select water

To display water molecules, type:

spacefill

To color this selection red, type:

color red

Select Water

Note: Hydrogen atoms are not displayed in pdb files that are obtained via X-ray crystallography. Therefore water molecules appear as a single oxygen atom. Since the oxygen is not visually bonded to another atom, the only way water molecules can be displayed is in spacefill format.

Chain

With select :, followed by the letter of the chain you would like to select, only the chain you select will be affected by future commands.

To select chain A, type:

select :a

To color this selection red, type:

color red

Select :a

Note: The Top 7 protein is a protein with only a single chain, so all atoms are colored red with the commands used above. Hemoglobin based on the file 1a3n.pdb contains four chains so the commands above will only color a portion of the structure. Click the button below to see select :a on hemoglobin.

Select :a - Hemoglobin

Residue Number

With the Residue Number select command, you can select a specific amino acid or a range of amino acids that all future commands will affect.

To select residue number 58, type:

select 58

To color this selection red, type:

color red

Select 58

To select residues 20 through 30, type:

select 20-30

To color this selection red, type:

color red

Select 20-30

Note: You can also select an amino acid by its three letter abbreviation followed by the residue number. For example, instead of select 58 as shown above, you could also use select lys58 because the amino acid at residue number 58 in the Top 7 protein is lysine.

Atom Number

With the Atom Number select command, you can select a specific atom number or range of atoms that all future commands will affect.

To select atom number 317, type:

select atomno=317

To color this selection red, type:

color red

Select atomno=317

Range of Atoms

With an alteration to the Atom Number select command, you can select a range of atoms that all future commands will affect.

To select atom number 303 through 410, type:

select atomno>=303 and atomno<=410

To color this selection red, type:

color red

Select atomno>=303 and atomno<=410

Note: If you do not know the Residue Number, Chain, Amino Acid Type, or the Atom Number you want to select, you can click on the residue in the Display Window. Jmol will provide information on the Console Window regarding the atom you clicked. The image below decodes this information in detail:

Jmol Console Explanation

Boolean Operators

Once you are comfortable using the Select command, you can begin to link together selections by using Boolean Operators. Imagine you are working with two predefined sets, for example, helix and backbone which are illustrated in the Venn diagram below.

Helices, Backbone

  • You can select just the helices. This set includes all the alpha helices (including any backbone atoms that happen to be in alpha helices). The area with the hatched lines represents what is selected.

select helix

Helices Only

  • You can also select backbone. This set includes all the atoms that are part of the backbone (including any alpha helix atom that also happen to be backbone atoms).

select backbone

Backbone Only

Or Operator

  • You can use the or Boolean Operator to select all the amino acids that are either part of alpha helices or the atoms that are part of the backbone.

select helix or backbone

The phrase 'select helix or backbone' means 'select all atoms that are either a helix or in the backbone (or both)'.

Helix or Backbone

And Operator

  • You can use the and Boolean Operator to select all the amino acids that are both backbone amino acids as well as amino acids in alpha helices.

select helix and backbone

The phrase 'select helix and backbone' means 'select all atoms that are both part of a helix AND part of the backbone'.

Helix and Backbone

Not Operator

  • You can use the not Boolean Operator to select only the atoms that are not part of helices and not part of the backbone.

select not helix and not backbone

The phrase 'select not helices and not backbone' means 'select all atoms that are neither a helix nor part of the backbone'.

Not Helix and Not Backbone

No Atoms Selected

When using select and Boolean operators in Jmol, occasionally "0 atoms selected" will be displayed in the Console Window. This means the selection is invalid. Consider for instance, the command:

select helix and sheet

The phrase "select helix and sheet" means "select all the atoms that are BOTH helices AND sheets". In the diagram below, you'll see that these are two mutually exclusive sets of atoms. There are no atoms that fulfill this selection, and Jmol will diplay "0 atoms selected".

Helix and Sheet

Use of Parentheses

Parentheses can be used in a select command when combining operators to insure that the proper selection occurs. Here are some sample commands that are frequently used in designing models:

select :b and (his63 or his92) and (sidechain or alpha)

This selects the sidechain and alpha carbon atoms in two residues, his63 and his92, on chain b of the protein.

select (:a or :c) and sheet

this command selects the sheets in chains a and c of the molecule.

Jmol