Back to the OMM Exhibits

An Introduction to
Chime* Scripting

Nathan Silva and David Marcey
CLU Biology Department
©David Marcey, 2001

* Jmol users: please see An Introduction to Jmol Scripting


I. Introduction
II. Display
III. Loading and Positioning
IV. The Select Command and Labeling
V. Coloring and Schemes
VI. Illustrating Bonds

VII. Animation

Note:  1) This exhibit is best viewed if the cue buttons ( ) are pressed in sequence and if the viewer does not independently manipulate the molecule on the left; 2) The Chime scripts in this exhibit are samples; the reader is encouraged to study the Chime/RasMol manual for a comprehensive list of scripting commands.


I. Introduction

Chime, a browser plugin used to view molecules in web pages, can read scripts that are contained in embedded buttons. These scripts are used to change the rendering of the molecule to illustrate important structural features.

This exhibit provides example Chime scripts that can be copied and pasted into the embed tags for buttons. Each section starts with a discussion of the uses of various renderings and ends with a table that includes an extensive list of buttons (left column) containing sample scripts (right column). These evoke particular renderings of the molecules displayed in the left frame. If you are new to Chime scripting, it is suggested that you spend time going through the exhibit in its entirety, reading the scripts to see how they can be employed in your own web pages.


II. Display

Chime uses two different units of measurement that can be used with display commands. One is the standard, atomic-resolution unit, the Angstrom (Å); 1 Å = 10-10 meters. Chime also uses a novel unit, the RasMol unit; 1 RasMol unit = 1/250 Å. The display codes (see below) can be modified to specify dimensions in either RasMol units or Angstroms by adding a numerical value after the name of a command. Angstroms are indicated by a decimal in the numerical value and RasMol units are used as a default when no decimals are employed. For example, a "wireframe 125" script specifies a wireframe display in 125 RasMol Units. This is equivalent to the script "wireframe 0.5" (0.5 Å).

The default display for most pdbs is wireframe, as shown at left. Wireframe is very useful because it clearly shows the covalent bonds (except S-S bonds) between all atoms of a molecule.
Varying the thickness of wireframe displays can provide useful alternatives in illustrating points.
Wireframe can also be displayed as a dashed line instead of a solid line (see below).

Spacefill is another commonly used display. Spacefill rendering displays the Van der Waals radius of each atom as a solid sphere by default.
Spacefill radii can be altered by a numerical specification (see below).

Dots is a display similar to spacefill in that the diameter of the spheres formed are equal to that of the Van der Waals radius. The density of dots can be modified by numerical specifications (see below). Dots combines easily with other display commands to provide useful effects. Combining wireframe and dots displays can show Van der Waals surfaces clearly for a loop or secondary structure.

So far, we have considered displays that affect all atoms of a molecule, unless particular atoms are selected (see below, The Select Command). Sometimes showing only the backbone of a molecule is desired. There are several displays that illustrate the backbone conformation of a molecule:

The backbone display shows the polypeptide backbone of a protein or the sugar-phosphate backbone of a nucleic acid as a train of bonds connecting the adjacent alpha carbons of each amino acid in sequential order. Backbones can be displayed in a dashed line (see below).

Trace is a display similar to backbone, but with smoothed transitions between the amino acids of a peptide chain or nucleotides of nucleic acids.

There are two displays that are excellent for showing secondary structure:
ribbons; cartoons. Both smooth the backbone, like trace, but display the backbone as a wide, flattened ribbon. Numerical modifications can be used to change the width of the backbone. In default mode, the width of alpha helical and beta strand secondary structure is greater than that of loops. Cartoon has the feature of indicating amino-carboxy polarity. This is quite convenient, e.g. when showing the parallel or antiparallel arrangement of b strands.

Strands is a rendering similar to ribbons and cartoons, but with the backbones displayed as a series of thin lines. Strands can be indicated with dashed lines (see below).

Surface rendering is very useful in showing binding pockets and/or non-covalent interactions, but surface calculations take significant amounts of time. Surface commands should therefore be used judiciously in molecular exhibits.

Lighting effects can be employed to change the appearance of a molecular display.
Ambient lighting intensity can be manipulated.
Specular highlights on atoms are white reflections of the "light source". The degree of specular highlighting can be changed.

Please turn molecule display off before proceeding with the table buttons below.

Display Commands

Buttons/Effects
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

wireframe (default = 1 RasMol unit) select all; wireframe;
wireframe 10 (10 RasMol units = 0.04 Å) wireframe 10;

wireframe 50 (50 RasMol units = 0.2 Å)

wireframe 50;
wireframe 100 (100 RasMol units = 0.4 Å) wireframe 100;
wireframe 0.5 (0.5 Å = 125 RasMol units) wireframe 0.5;
dashed wireframe wireframe dash;
spacefill (default = Van der Waals radius) wireframe off; spacefill;
spacefill 50 (50 RasMol units = 0.2 Å) spacefill 50;
spacefill 100 (100 RasMol units = 0.4 Å) spacefill 100;
spacefill 500 (500 RasMol units =2.0 Å) spacefill 500;
spacefill 0.5 (0.5 Å = 125 RasMol units) spacefill 0.5;
dots (default = ~100 dots per medium sized atom) spacefill off; dots;
dots 10 (~10 dots per medium sized atom) dots 10;
dots 100 (~100 dots per medium sized atom) dots100;
dots 250 (~250 dots per medium sized atom) dots 250;
dots wireframe combo wireframe 100; dots
backbone (default = 1 RasMol unit) dots off; wireframe off; backbone;
backbone 10 (10 RasMol units = 0.04 Å) backbone 10;
backbone 50 (50 RasMol units = 0.2 Å) backbone 50;
backbone 100 (100 RasMol units = 0.4 Å) backbone 100;

backbone 0.5 (0.5 Å = 125 RasMol units)

backbone 0.5;
dashed backbone backbone dash;
trace (default = 90 RasMol units) backbone off; trace;
trace 10 (10 RasMol units = 0.04 Å) trace 10;
trace 50 (50 RasMol units = 0.2 Å) trace 50;
trace 100 (100 RasMol units = 0.4 Å) trace 100;
trace 0.5 (0.5 Å = 125 RasMol units) trace 0.5;
ribbon [default = 720 RasMol units (2.88 Å) for nucleic acids, 380 (1.52 Å) for protein secondary structure, and 100 (0.4 Å) for turns and random coil] trace off; ribbon;
ribbon 10 (10 RasMol units = 0.04 Å) ribbon 10;
ribbon 100 (100 RasMol units = 0.4Å) ribbon 100;
ribbon 500 (500 RasMol units =2.0 Å) ribbon 500;
ribbon 0.5 (0.5 Å = 125 RasMol units) ribbon 0.5;
cartoon [default = 720 RasMol units (2.88 Å) for nucleic acids, 380 (1.52 Å) for protein secondary structure, and 100 (0.4 Å) for turns and random coil. Arrow heads are displayed on the C-terminus of helices and strands and the 3' end of nucleic acid backbones.] ribbon off; cartoon;
cartoon 10 (10 RasMol units = 0.04 Å) cartoon 10;
cartoon 100 (100 RasMol units = 0.4 Å) cartoon 100;
cartoon 500 (500 RasMol units =2.0 Å) cartoon 500;
cartoon 0.5 (0.5 Å = 125 RasMol units) cartoon 0.5;
strands [default = 720 RasMol units (2.88 Å) for nucleic acids, 380 (1.52 Å) for protein secondary structure, and 100 (0.4 Å) for turns and random coil. Default # of strands = 4] cartoon off; strands;
strands 10 (10 RasMol units = 0.04 Å) strands 10;
strands 100 (50 RasMol units = 0.2 Å) strands 100;
strands 500 (100 RasMol units = 0.4 Å) strands 500;
strands 0.5 (0.5 Å = 125 RasMol units) strands 0.5;
3 strands strands; set strands 3;
5 strands strands; set strands 5;
dashed strands strands dash;
ball and stick (standard) strands off; wireframe 0.15; spacefill 0.45;
ball and stick small strands off; wireframe; spacefill 50;
ball and stick medium wireframe 25; spacefill 75;
ball and stick large wireframe 50; spacefill 100;
create a surface, color it white wireframe off; spacefill off; surface molsurface white;
create a surface, color it purple wireframe off; spacefill off; surface molsurface purple;
make surface transparent (toggle) wireframe 100; spacefill off; list molsurface transparent;
molecular lipophilicity surface potential wireframe off; spacefill off; surface testSurf MLP;
electrostatic surface potential surface testSurf MEP;
Back to default spacefill list testsurf off; list molsurface off; reset;spacefill; color cpk;
Decrease ambient lighting intensity select all; spacefill; set ambient 5;
Increase ambient lighting intensity select all; spacefill; set ambient 80;
"Normal" ambient lighting intensity select all; spacefill; set ambient 40;
Turn on specular highlights; set low specular highlight intensity select all; spacefill; set specular on; set specpower 5;
set higher specular highlight intensity select all; spacefill; set specular on; set specpower 100;
set "normal" specular highlight intensity select all; spacefill; set specular on; set specpower 20;

[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

III. Loading and Positioning

Often, one needs to discuss more than one molecule (pdb file) in a molecular exhibit.
Loading a new pdb by use of a button is a simple way to do this.

Once the new pdb is loaded it is often useful to orient the molecule in 3-D by rotating it around the X,Y, or Z axes. Rotation commands are expressed in degrees so a rotation of 360 around a particular axis will show no change in the orientation of the molecule.

A molecule can also be translated along the X or Y axes.
Translation along the X axis causes the molecule to move left or right.
Translation along the Y axis causes the molecule to move up or down. Note: contrary to intuition, positive numbers for Y translation move molecules down and negative numbers move molecules up.

Translation on the Z axis is called zoom, because it brings the molecule closer to or farther away from the viewer. The zoom command is expressed in percentage. Thus, to double the zoom factor, a numerical value of 200 is used.

Rotation, translation, and zoom commands to effect a desired view can be incorporated in the initial script that embeds a pdb in an html file or in a later script that loads a new pdb.

There are other ways to move, rotate, and zoom molecules that will be discussed later, in the Animation section.

Once a particular orientation is effected, it may be useful to restore that orientation at a later point in an exhibit. The "view" command is an easy way to achieve this. Save the view as a number between 0-15. Restore that specific view number to return the molecule back to that desired position. The view restore function only affects the positioning and orientation of the molecule; it does not recall any color or display options.

Loading and Positioning Commands
Buttons/Effects
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

load pdb into molecule window zap; load 'path to the pdb file', e.g. ../pdbs/ahelix.pdb
rotate 90° on X axis rotate x 90;
rotate -90° on X axis rotate x -90;
rotate 90° on Y axis rotate y 90;
rotate -90° on Y axis rotate y -90;
rotate 90° on Z axis rotate z 90;
rotate -90° on Z axis rotate z -90;
translate to 10 on X axis translate x 10;
translate to -10 on X axis translate x -10;
translate back to 0 (center) on X axis translate x 0;
translate 10 on Y axis translate y 10;
translate -10 on Y axis translate y -10;
translate back to 0 (center) on Y axis translate y 0;
zoom to 150% zoom 150;
zoom out to 50% zoom 50;
restore original zoom zoom 100;
save view "0", rotate to new orientation, save view "1", rotate to new orientation, save view "2" view save 0; rotate x 45; rotate y 45; view save 1; rotate y -100; rotate x -100; view save 2
restore saved view "0" view restore 0;
restore saved view "1" view restore 1;
restore saved view "2" view restore 2;

[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

IV. The Select Command and Labeling

For the display commands already discussed, and for coloring and bond options to be addressed below, it is often desirable to limit rendering changes to particular atoms or sets of atoms. The select command is used to specify what atoms of a pdb file will be affected by subsequent rendering commands. There are a number of predefined sets of atoms such as "all", "backbone", "protein", "ligand", "hetero", "helix", "sheet", etc.. "Select all" selects all atoms. "Select protein" or "select amino" both select all of the amino acids in the pdb. "Select nucleic" selects all nucleic acid atoms, but "select dna" or "select rna" works on specified nucleic acid residues (DNA=a,t,g,c; RNA=a,u,g,c). "Select hetero" will select all heterogeneous atoms, including water, ions, and ligands. "Select water" will select only the water molecules, and "select ligand" will only select the ligand. The select command can also be used to select a specific chain in a pdb file, a single amino acid, or even a single atom (useful!).

In selecting atoms or residues, it is possible to discriminate between chains in a pdb file that contains multiple molecules. For example, let's say that you wish to select a single residue (#10) on one chain of a pdb file with a dimeric protein bound to DNA (four chains). Each chain will likely have a residue # 10. If the command "select 10" were used, four residues would be selected, one on each of the protein chains and one on each strand of DNA. Instead, if the desired residue (#10) is on chain A, then the script "select :a and 10" would select only residue #10 on chain A, ignoring the residue #10s on other chains.

Define is a command that is very useful when dealing with a group of atoms that do not belong to a predefined set, such as a phosphate on a ligand or the tail of an ATP molecule. The atoms of interest can be associated under one group name that can then be selected with ease. The format of the script for defining a group of atoms is "define 'name of group' 'atoms to be grouped' ".

Another type of selection is the restrict command. "Restrict" limits the display to those atoms specified in the restrict script.

Selected atoms can be labeled using the label command. Labels can be colored, and the fontsize height set (in pixels) using appropriate commands. The default label color is the selected atom's color and the default fontsize is 8 pixels.

Please load the tRNA synthase/tRNA molecule before proceeding with the table buttons below.

Select and Label Commands
Buttons/Effects
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

select all, spacefill select all; spacefill;
select amino, spacefill select all; spacefill off; select amino; spacefill;
select protein, spacefill select all; spacefill off; select protein; spacefill;
select nucleic, spacefill select all; spacefill off; select nucleic; spacefill;
select dna (i.e. a,t,g,c), spacefill select all; spacefill off; select dna; spacefill;
select rna (i.e. a,u,g,c), spacefill select all; spacefill off; select rna; spacefill;
select hetero (includes water, ions, and ligands), spacefill select all; spacefill off; select hetero; spacefill;
select water, spacefill select all; spacefill off; select water; spacefill;
select ligand, spacefill

select all; spacefill off; select ligand; spacefill;

select chain A, spacefill select all; spacefill off; select :A; spacefill;
select residue # 10, spacefill select all; spacefill off; select 10; spacefill;

select atom # 500, spacefill

select all; spacefill off; select atomno= 500; spacefill;
select residue # 10 on chain A, spacefill select all; spacefill off; select :A and 10; spacefill;
define atoms 500, 501, 502 and 503 as "part" define part atomno=500, atomno=501, atomno=502, atomno=503;
select "part", spacefill select all; spacefill off; select part; spacefill;
define amino acids residues 10, 11 and 12 of chain A as "piece" define piece :A and 10, :A and 11, :A and 12;
select "piece", spacefill select all; spacefill off; select piece; spacefill;

restrict protein

select all; spacefill off; restrict protein;
restrict nucleic select all; wireframe; restrict nucleic;
restrict ligand select all; wireframe; restrict ligand;
label atom number 4174 "oxygen" select all; spacefill off; wireframe;
select atomno=4174; label oxygen;
label atom number 4174 "protein" select all; spacefill off; wireframe;
select atomno=4174; label protein;
label atom number 4174 "4174", color label magenta, set fontsize to 15 pixels select all; spacefill off; wireframe;
set fontsize 25; select atomno=4174; label atom 4174; color label magenta;
turn labels off select all; label off;

 

[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

V. Coloring and Schemes

Coloring atoms, sets of atoms, or other selections is quite useful in crafting quality molecular exhibits. Explanatory text can be co-colored with specified structural features. Chime is quite versatile in recognizing the names of prespecified colors, HTML binhex color codes, and RGB triplet codes.

Chime "knows" the following list of specified colors: blue, yellow, cyan, green, greenblue, magenta, orange, purple, red, redorange, violet, white, and black.

HTML binhex and RGB triplet codes are similar in that the colors are made up of alphanumerical values for red green and blue. For binhex, the highest value is FF and the lowest is 00 (zeros, not O's). For RGB, the highest value is 255 and the lowest is 0. The format for binhex in Chime is [X(Red)(Green)(Blue)], e.g. "color [XFF0088]". The format for RGB triplet codes in chime is [(Red),(Green),(Blue)], e.g. "color [255,0,255]".

Thus far, the molecules have been shown in CPK (Corey, Pauling, Kultun) colors. "CPK" is the default coloring scheme of Chime - it is based on atom identity. Carbon is colored light gray, oxygen red, hydrogen white, nitrogen light blue, sulfur yellow, phosphorous orange, chlorine green, zinc brown, sodium blue, iron purple, calcium or metals dark gray, and unknown deep pink. In addition to CPK, Chime has access to some additional predefined color schemes (not all schemes are discussed here):

"Amino" is a scheme that assigns colors to amino acids based on their chemical properties, e.g. acidic, basic, hydrophobic, or polar. The colors are ASP, GLU, CYS, MET, LYS, ARG, SER, THR, PHE, TYR, ASN, GLN, GLY, LEU, VAL, ILE, ALA, TRP, HIS and PRO.

"Chain" is a scheme that colors each different chain in a multiple molecule pdb file a different color.

"Group" is a scheme that colors protein chains differentially in the amino-carboxy direction.

"Temperature" is a scheme that colors atoms according to their anisotropic temperatures, as stored as a beta value in a pdb file. Anisotropic temperature is indicative of of an atom's mobility or uncertainty of position. The more mobile, "warmer" segments are colored red, progressing to more immobile blue fragments.

"Structure" is a very useful color scheme in that it differentially colors a protein's secondary structure (a helices and b sheets). It is best to use a display command that illustrates secondary structure when using the structure color scheme (e.g. ribbons, cartoon, backbone, trace, or strands - see Display section).

It is quite effective to use consistent color schemes to show some molecular features. DRuMS is a set of seven color schemes that provides a uniform standard for coloration in molecular exhibits. The colors used in the basic DRuMS scheme are: protein, DNA, RNA, a helix and b sheet. For amino acids the DRuMS colors are: hydrophobic amino acids, polar acidic amino acids, polar basic amino acids, and polar uncharged amino acids. See the DRuMS website for further information:

DRuMS color scheme

It is sometimes necessary to go beyond the DRuMS schemes to illustrate important structural features. For example, it may be useful to distinguish between several pairs of chemically similar amino acids engaged in ionic bonding. In this case, custom colors must be used to indicate molecular identity. Fortunately, it is easy to instruct Chime to read any user-specified color code.

Please reload the tRNA synthase/tRNA molecule before before proceeding with the table buttons below.

Coloring Commands
Buttons/Effects
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

color red with name select all; color red;
color green with HTML binhex color [X00FF00];
color blue with RGB triplet color [0,0,255];
thick wireframe, color cpk select amino, nucleic; wireframe 100; color cpk;
color amino color amino;
color chain color chain;
color group color group;
color temperature color temperature;
color structure select all; cartoon; wireframe off; color structure;
color DRuMS 

select all; wireframe off; cartoon off; select protein; cartoon; select rna and backbone; trace 100; select rna and backbone; color [Xfd0162]; select protein and not helix; color [X787878]; select protein and not sheet; color [X787878]; select protein and helix; color [Xff0080]; select sheet; color [Xffc800];

  highlight C44 of RNA in magenta select protein and nucleic; cartoons off; wireframe; color cpk; select 44:b; wireframe 100;
color magenta;
highlight C44 of RNA in [66CCFF] select protein and nucleic; cartoons off; wireframe; color cpk; select 44:b; wireframe 100;
color [X66CCFF];

 

[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

VI. Illustrating Bonds

Chime recognizes by default the standard covalent bonds linking atoms in a molecule. Disulfide (S-S) bonds can also be displayed in Chime by the use of the "ssbonds" command. The color of the bond is that of the two linked atoms, but it can be changed with the "color ssbonds" command. Similarly, "hbonds" and "color hbonds" tells Chime to show and color hydrogen bonds that are specified in the pdb file.

You may wish to illustrate a connection or bond that is not specified in a pdb file. Such arbitrary bonds can be indicated using the "monitor" command. "Monitor" forms a dashed line between any two specified atoms and indicates the distance (in Å) between them. The distance display can be removed by "set monitor off".

Bond Commands
Buttons/Effects
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

load new pdb, orient it zap; load ../pdbs/1acx.pdb; rotate y 90; zoom 150;
show S-S bonds select cys88, cys83;
wireframe 100; ssbonds on;
color S-S bonds purple, thicken S-S bonds color ssbonds [XFF00FF]; ssbonds 50
remove S-S bonds ssbonds off;
make an arbitrary bond between atom #509 and #638 monitor 509 638;
remove distance label set monitor off;
restore distance label set monitor on;
remove arbitrary bond monitor off;
load new pdb, show hydrogen bonds load ../pdbs/1dc7.pdb; hbonds on;
color hydrogen bonds green, thicken hbonds color hbonds [X33FF00]; hbonds 50
remove hydrogen bonds hbonds off;


[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

VII. Animation

Animations are sometimes superior to the rotations and translations discussed previously because animations can cause the molecule at hand to move or change position in a smooth fashion. Coupled with creative displays and coloration, animation commands can be employed to great effect in illustrating key points of molecular structure.

One of the most essential animation commands is "move". "Move" is followed by a set of numbers that quantify a set of animation parameters. Here we describe the use of the first nine such parameters, i.e.: "move _ _ _ _ _ _ _ _ _ ", where each of the nine spaces specifies the degree of an animation parameter.
The parameters for each space following a "move" command (in order) are:
1
2
3
4
5
6
7
8
9
Xrot YRot ZRot Zoom XTrans YTrans ZTrans Slab TotalTime
The first three parameters are rotations around the X, Y and Z axes. Fourth is the zoom modifier, expressed in positive (zoom in) or negative (zoom out) numbers. Note that in a "move" command, zoom values are not expressed in percentages of the original, unlike the use of "zoom" as a stand alone script command. The next three parameters (5,6 and 7) deal with translation along the three axes (7, Z translation, is not functional - always use zero in that slot). Note: contrary to intuition, positive numbers for Y translation move molecules down and negative numbers move molecules up. 8th is the slab parameter. Slab "slices" the molecule, i.e. removes atoms down to a specified depth so that interior features may be easily observed. Parameter 9 is the amount of time (in seconds) to take in performing the previous move commands. It is important to allow sufficient time for the animation so as not to disorient the viewer. Contrariwise, too long an animation can prove tedious. There are two other move parameters, Frames/Second and MaximumAcceleration that can be specified in the 10th and 11th positions (not considered here).

"Move" is used in some of Chime's most impressive animations and provides great versatility, especially when coupled with "delay". "Delay" pauses the Chime script for a specified amount of time before the next command is executed. "Delay" is specified in seconds, e.g. "delay 5" causes a pause of five seconds. In addition to use in animations, "delay" can be an effective tool in a variety of display and coloration contexts.

The "spin" command evokes a continuous animation. SpinX, spinY, and spinZ are used to spin a molecule around a particular axis. The spin command is followed by a value that specifies the rate of spinning in degrees/second. Spiny is often used when loading a molecule. Caution must be used in spinning a molecule because when later "move" commands are executed, they will take effect from whatever arbitrary position the molecule happens to be in (spinning). This can be acceptable, but can also muddy a point because the molecule will not be oriented correctly. One solution is the use of a "view restore" (see Loading and Positioning, above) command just prior to "move", but this approach can lead to a jarring reorientation of the molecule. We have found it useful, in the initial loading of a pdb, to follow a "spiny=20" command with a "startspin=false" command, which disables the spinning of the molecule. A later Chime script can be used to start the molecule spinning, using the "spin" command. A new (9/2001) Chime resource, MoveTo, is quite useful in smoothly restoring a molecule to a desired orientation. See the MoveTo home page of Carlson and Wells.

Changes in display (e.g. wireframe thickness), separated by brief delays, can be used to "build up" or "dissolve" molecules to provide smooth, animated transitions in rendering.

Blinking can be used to draw attention to particular molecular features (e.g. bonding partners). Blinking is achieved by causing the feature to flash on and off or to expand and contract a few times, using appropriate display commands separated by delays.

Animation Commands
Buttons
code for button = <embed type = "application/x-spt" width=15 height=15 button=followed target="molecule" script="Chime Scripts Here"></embed>

Chime Scripts in buttons

Cut and paste in " " in button code

load new pdb zap; load ../pdbs/synth3atp.pdb;
rotate x 90º, pause for a second, rotate back

move 90 0 0 0 0 0 0 0 3; delay 1; move -90 0 0 0 0 0 0 0 3;

rotate y 90º, pause for a second, rotate back move 0 90 0 0 0 0 0 0 3; delay 1; move 0 -90 0 0 0 0 0 0 3;
rotate z 90º, pause for a second, rotate back move 0 0 90 0 0 0 0 0 3; delay 1; move 0 0 -90 0 0 0 0 0 3;
zoom in 100, pause for 2 seconds, zoom out move 0 0 0 100 0 0 0 0 5; delay 2; move 0 0 0 -100 0 0 0 0 5;
translate x 25, pause for a second, translate back move 0 0 0 0 25 0 0 0 5; delay 1; move 0 0 0 0 -25 0 0 0 5;
translate y 25, pause for a second, translate back move 0 0 0 0 0 25 0 0 5; delay 1; move 0 0 0 0 0 -25 0 0 5;
slab 5 , rotate y 45º,pause for half a second, rotate back, slab off move 0 0 0 0 0 0 0 15 3; move 0 45 0 0 0 0 0 0 3; delay .5; move 0 -45 0 0 0 0 0 0 3; slab off;
select amino acid 509, simultaneous rotation of all 3 axis plus zoom and translation, pause for a few seconds, return to original oreientation/display select 509; wireframe 75; dots 100; move 92 -47 5 63 7 -13 2 0 5; delay 2; move -92 47 -5 -63 -7 13 -2 0 5; delay 1; wireframe; dots off;
spin on

view save 2; spin on;

spin off

spin off; delay 1; view restore 2;

spin 360º in 8 seconds move 0 360 0 0 0 0 0 0 8;
building up using wireframe display only select all; wireframe 1; delay .3; wireframe 5; delay .3; wireframe 10; delay .3; wireframe 20; delay .3; wireframe 40; delay .3; wireframe 60; delay .3; wireframe 100; delay .3; wireframe 160;
building up using both wireframe and spacefill displays select amino, nucleic; wireframe 1; delay .3; wireframe 5; delay .3; wireframe 10; delay .3; wireframe 20; delay .3; wireframe 40; delay .3; wireframe 60; delay .3; wireframe 100; delay .3; wireframe off; spacefill 125; delay .3; spacefill 200; delay .3; spacefill 250; delay .3; spacefill;
dissolving to show or emphasize a particular group or residue

move 92 -47 5 63 7 -13 2 0 5; select water; spacefill off; select 509; delay .5; spacefill 200; delay .3;
wireframe 200; spacefill off; delay .3; wireframe 150; delay .3; select protein, nucleic, ligand; spacefill 300; select 509; color cpk; spacefill off; wireframe 150; delay .3; select protein, nucleic, ligand; color [XCCCCCC]; spacefill 150; trace 150; wireframe off; select 509; color cpk; spacefill off; wireframe 150; delay .3; select protein, nucleic, ligand; color [XCCCCCC]; spacefill off; trace 100; select 509; color cpk; spacefill off; trace off; wireframe 100; delay .3; select protein, nucleic, ligand; color [XCCCCCC]; trace 50; select 509; color cpk; spacefill off; trace off; wireframe 100; delay .5; move -92 47 -5 -63 -7 13 -2 0 5

blinking H bond move 0 0 0 100 0 15 0 0 5; select 506; wireframe 150; color cpk; move 0 75 0 0 0 0 0 0 3; monitor 3969 3949; set monitor off; delay .5; select atomno=3969, atomno=3949; spacefill 300; delay .5; spacefill off; delay .5; spacefill 300; delay .5; spacefill off; delay .5; spacefill 300; delay .5; spacefill off

[I. Introduction] [II. Display] [III. Loading and Positioning]
[IV. The Select Command and Labeling]
[V. Coloring and Schemes]
[VI. Illustrating Bonds] [VII. Animation]

Back to Introduction

Back to the OMM Exhibits

Feedback to David Marcey: marcey@clunet.edu