Chapter 4. RasMol/Chime Scripts

Table of Contents

RasMol/Chime commands
animation or anim
atom expressions
backbone
background
cartoon or cartoons
center or centre
color or colour
color (atom object)
color (bond object)
color (element)
color (model object)
comment (#)
define
delay
depth
dots
echo
exit
font
frame
hbonds
hover
isosurface
label or labels
load
loop
measure or monitor
meshribbon
model
move
moveto
pmesh
polyhedra
quit
refresh
reset
restrict
ribbon or ribbons
rocket or rockets
rotate
script or source
select
set (bond styles)
set (default color scheme)
set (highlights)
set (lighting and perspective)
set (visibility)

New Scripting Engine

The scripting engine has been completely rewritten for Jmol Release 6. As of this writing it should be considered *alpha test* code. Please supply feedback in case of bugs and/or unexpected behavior and/or with feature requests. You can do this through the jmol home page http://jmol.sourceforge.net

Jmol supports the RasMol scripting language defined by RasMol. Information about RasMol can be found at http://www.openrasmol.org/. The current URL for full RasMol documentation is: http://www.openrasmol.org/doc/rasmol.htm.

The Chime web browser plug-in was based upon the RasMol source code. Various extensions were added, including additional scripting commands. Information about Chime can be found at http://www.mdlchime.com/ The current URL for extended chime scripting commands is: http://www.mdlchime.com/chime/chimerasmol.html.

Jmol currently supports many of the RasMol/Chime scripting commands. Our goal is to eventually provide full script support. This will provide a migration path for those who wish to move to an open source solution that supports a larger number of file formats on a wider variety of hardware platforms.

Please give us feedback on what features you use and that are currently no implemented. This will help us prioritize future development.

RasMol/Chime commands

This documentation is autogenerated from the content on this website: http://www.stolaf.edu/people/hansonr/jmol/docs/.

animation or anim

Sets selected animation parameters or turns animation on or off. Note that there are four distinct animation types that can be employed using Jmol: (1) files may contain multiple stuctures that are "played" sequencially, (2) Gaussian output files may contain vibrational modes that can be animated, (3) scripts may be run through with delays and loops, and (4) the model may spin or move in a predefined way. The "animation" command only refers to method (1).

Syntax

animation ON/OFF{default: ON}

Turns on or off animation.

animation direction -1

Sets the animation direction to be from last frame to first frame.

animation direction +1

Sets the animation direction to be first frame to last frame.

animation fps [frames-per-second]

Sets the animation frames per second.

animation frame (integer >= 1)

Go to a specific frame.

animation frame 0

Overlay all frames.

animation frame NEXT

Go to next frame

animation frame -1

Go to previous frame.

animation mode loop

Sets the animation mode to restart the sequence automatically when the last frame has played.

animation mode loop [time-delay1] [time-delay2]

Allows for a time delay at the start and end of the loop.

animation mode ONCE

Sets the animation to play once through and then stop (the default mode).

animation mode PALINDROME

Sets the animation to play forward and back endlessly.

animation mode PALINDROME [time-delay1] [time-delay2]

Allows for a time delay at the start and end of the palindrome.

Definitions

[frames-per-second]

is the animation rate -- (integer)

[time-delay1]

is the time in seconds to pause on the first frame -- (integer|decimal, >=0)

[time-delay2]

is the time in seconds to pause on the last frame -- (integer|decimal, >=0)

See also: delay, exit, frame, loop, model, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

atom expressions

The Jmol commands select, restrict, define, center, and polyhedra take for parameters expressions that represent collections of atoms in one or more models. While this documentation does not attempt to define these expressions completely, several examples are given here. Note that the substructure() function takes a quoted smiles string for its argument. The first parameter of the within() function can be a decimal distance in Angstroms or one of the words group, chain, or model.

Examples:

select atomno=1;color purple;spacefill 600
select nitrogen;color yellow
select [PRO];color green
select within(5.0,[PRO]62) and not [PRO]62;color white
select within(group,within(5.0,[PRO]));color yellow
select substructure("[Fe][S]");wireframe 1.0

backbone

Shows the backbone of a protein or nucleic acid macromolecule by connecting the alpha carbons.

Syntax

backbone ON/OFF{default: ON}

Turns the backbone on or off

backbone [backbone-radius]

Backbone radius can be specified in angstroms using a decimal number (1.0, 2.0, etc.)

Definitions

[backbone-radius]

is the radius of the backbone -- (decimal, <=4.0)

See also: background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

background

Sets color of the background. For specifications, see color.

Syntax

background [RGB-color]

Sets the background of the applet window.

background HOVER [color-or-none]

Sets the background for the pop-up label box that appear when the mouse "hovers" over an atom. "NONE" results in there being no hover backgrounds. Operates globally, not on selected atoms.

background LABELS [color-or-none]

Sets the background of the atom labels that appear with the "label" command. "NONE" results in there being no label background. Operates globally, not on selected atoms.

Definitions

[RGB-color]

is a name of a color or a red, green, blue color triple in decimal with commas, for example [255,0,255], or as a single hexadecimal number, for example [xFF00FF] (brackets included) -- (color name), [r, g, b], [xRRGGBB]

[color-or-none]

is (color name), [r, g, b], [xRRGGBB], NONE

See also: backbone, cartoon or cartoons, center or centre, color or colour, color (atom object), color (bond object), color (element), color (model object), dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (default color scheme), set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

cartoon or cartoons

Cartoons are the classic shapes the are used to depict alpha helices and beta-pleated sheets.

Syntax

cartoon ON/OFF{default: ON}

cartoon [cartoon-radius]

Definitions

[cartoon-radius]

is the radius of the cartoon elements -- (decimal, <=4.0)

See also: backbone, background, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

center or centre

Sets the center of rotation to be the center of the set of atoms defined by the atom expression. This is calculated as the mean value of the coordinates of the selected atoms along each of the respective axes. If no atoms are selected then the center is set to the center of the bounding box (the default).

Syntax

center

Recenters the model on the default center.

center [atom-expression]

Centers the model on the specified atom set.

Definitions

[atom-expression]

is any expression that evaluates to a set of atoms -- (atom-expression)

See also: backbone, background, cartoon or cartoons, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

Examples:

select [CYS]32
center selected

color or colour

The color command takes several forms, depending upon the type of object being colored: an atom object, a bond object, a chemical element, or a model object. In addition, you can set the default color of any chemical element individually. This section of the guide discusses each of these in turn:

color (atom object)color (bond object)color (element)color (model object) Additional information external to this documentation can be found in relation to [Jmol color schemes] and [standard JavaScript color names and codes]. In addition, a page is in construction that lays out the [Jmol color command matrix]. In general, the color command takes the following syntax:color [object] [option]The first parameter of the color command specifies the object of that command. If no object is given, then 'color atom' is assumed, and the currently selected atoms are colored. Following that can be a rather wide variety of one- or two-word options, described below and dependent upon the kind of object being colored. Translucent/Opaque Options. The color command allows an optional color modifier of 'translucent' or 'opaque', which can be used with any object. For example: color atoms translucent orange color ribbons translucent [255, 165, 0]Setting a color sets the translucency to 'opaque' by default. Thus, 'color atoms red' and 'color atoms opaque red' are synonymous. Translucent and opaque can also be used alone with an object, even without specifying a color:color mysetofatoms translucent In that case, however, the result is complicated by color inheritance, discussed next. Color Inheritance. Many objects inherit both color and opacity from the underlying associated atom (which, themselves "inherit" their color by default from their associated chemical element). For example, by default a bond will inherit the two colors+translucencies of its endpoint atoms. If you simply 'color atoms translucent', then both the atoms and the bonds will be translucent. But if you 'color bonds opaque' or 'color bonds red' and also 'color atoms translucent' only the atoms will be translucent. The level of 'translucent' cannot be controlled; it is set at 50%. Note that the implementation of 'translucent' is not as an alpha channel. Rather, translucent objects are "screened" so that every other pixel is painted. If you put an opaque object behind a translucent object, then you will see the object in the back.But if you put a translucent object behind another translucent object, then you will not see the translucent object in the back. See also: background, color (atom object), color (bond object), color (element), color (model object), set (default color scheme),

color (atom object)

Sets the color of atom-related objects (atoms, backbone, cartoons, dots, labels, meshribbon, polyhedra, rockets, stars, strands, trace, and vectors).

Syntax

color [color-scheme]

Sets the previously selected atom set to a color based on a particular color scheme. Note that to color a specific set of atoms, you MUST select that set first, then use use the color command. You cannot script, for example, "color *.N? green".

color [atom-associated-object] [color-scheme]

Sets the color of atom-related objects based on a previously selected atom set to a specific color, a color scheme, or back to its default color (CPK), or to inherit the color of its associated atom (NONE). (In the case of "color atom", CPK and NONE both revert to the default color.)

Definitions

[color-scheme]

is to color based on a scheme. (CPK and NONE are synonymous here) -- (color name), [r, g, b], [xRRGGBB], AMINO, GROUP, CHAIN, FIXEDTEMPERATURE, FORMALCHARGE, MONOMER, PARTIALCHARGE, RELATIVETEMPERATURE, SHAPELY, STRUCTURE, CPK, NONE

[atom-associated-object]

is an object related to an atom -- ATOM, BACKBONE, CARTOON, DOTS, LABELS, MESHRIBBON, POLYHEDRA, RIBBONS, ROCKETS, STARS, STRANDS, TRACE, VECTORS

See also: background, color or colour, color (bond object), color (element), color (model object), set (default color scheme),

color (bond object)

Three types of bonds are distinguished by Jmol for coloring purposes: regular bonds, disulfide bonds, and hydrogen bonds. Each can be colored independently, and hydrogen bond colors in proteins can take on a special coloring scheme based on their connectivity.

Syntax

color BONDS [color-or-none]

Colors selected bonds a specific color or resets them to inherit the color of their associated atoms.

color SSBONDS [color-or-none]

Colors disulfide bonds a specific color or resets them to inherit their color from their associated atoms.

color HBONDS [color-or-none]

Colors hydrogen bonds a specific color or resets them to inherit their color from their associated atoms.

color HBONDS TYPE

Colors hydrogen bonds specifically in proteins based on how many residues one end is from the other. Note that to get this effect, one must first execute "hbonds ON" and then issue "color hbonds TYPE". The colors assigned are based on the number of basepairs between the interacting H atoms. This TENDS to indicate secondary structure, but is not perfect.The correlation between color and offset are as follows:

Definitions

[color-or-none]

is (color name), [r, g, b], [xRRGGBB], NONE

See also: background, color or colour, color (atom object), color (element), color (model object), set (default color scheme),

color (element)

You can use the 'color' command to specify customized default colors that are used for elements. [default Jmol element colors] color carbon limegreencolor hydrogen [x32CD32];These changes are not molecule-specific; they will continue in effect even if new molecules are loaded. However, in a page with multiple applets, each applet will have its own set of element colors.If you choose to use this feature, you should consider encapsulating your favorite colors into a script and then executing that script as a subroutine. For example:script LoadMyFavoriteColors.txt;load foo.xyz;load bar.xyz;Note:

Custom element colors are independent of and are not affected by the currently selected set of atoms.To reset custom element colors, use 'set defaultColors Jmol' or 'set defaultColors Rasmol'.'translucent' or 'opaque' cannot be specified as part of the element color specification. (You cannot 'color carbon transparent green', for instance.)At this time only elements can be custom colored. There is no support for customizing other color palettes such as those used for protein chains or groups.

Syntax

color [element-name] [RGB-color]

Definitions

[element-name]

is to color specific elements such as CARBON or HYDROGEN -- (element name)

[RGB-color]

is a name of a color or a red, green, blue color triple in decimal with commas, for example [255,0,255], or as a single hexadecimal number, for example [xFF00FF] (brackets included) -- (color name), [r, g, b], [xRRGGBB]

See also: background, color or colour, color (atom object), color (bond object), color (model object), set (default color scheme),

color (model object)

Sets the color of various objects (axes, boundbox, echo, hover, measurements, pmesh, and unitcell).

Syntax

color [model-object] [RGB-color]

Definitions

[model-object]

is AXES, BOUNDBOX, ECHO, HOVER, ISOSURFACE, MEASUREMENTS, PMESH, UNITCELL

[RGB-color]

is a name of a color or a red, green, blue color triple in decimal with commas, for example [255,0,255], or as a single hexadecimal number, for example [xFF00FF] (brackets included) -- (color name), [r, g, b], [xRRGGBB]

See also: background, color or colour, color (atom object), color (bond object), color (element), set (default color scheme),

Examples:

select [CYS]32 ;label %a: %x %y %z;color labels white;
set axes on;color axes green
set axes on;color axes [xFF00FF];

comment (#)

Comments in Jmol are preceded by a number sign, '#'.

# Anything following '#' up until the end of a statement is ignored by Jmol with the following two exceptions. (A statement is terminated by a semicolon ";" or a newline.)#jxCommands prefixed with #jx will be executed by Jmol#jc If the string '#jc' appears anywhere within a statement, then that entire statement will be assumed to be a comment and will be completely ignored by the Jmol interpreter.

Examples:

# color by polarity
color background [xffa0a0] # pink
#jx set perspectiveDepth on; #executed only in Jmol, not Chime or Rasmol
zoom 125 #jc; # zoom to 125% in Chime and Rasmol but not in Jmol
Similar comment controls exist in Chime. Commands prefixed with #! will be executed in Chime but not in RasMol. Commands containing ## will be ignored by Chime, but the portion preceding the ## will be executed in RasMol. Thus we have: # not read by Jmol, Chime, or Rasmol#jx [commands here] Jmol excecution only#! [commands here] Chime execution only[commands here] ## #jc Rasmol execution only[commands here] #jc Chime and Rasmol only [commands here] ## Jmol and Rasmol only

define

Defines the specified variable to the the atoms selected by the atom expression.

Syntax

define [variable-name] [atom-expression]

Definitions

[variable-name]

is a (string)

[atom-expression]

is any expression that evaluates to a set of atoms -- (atom-expression)

Examples:

define mygroup within(5.0,[FS4]102)
select mygroup
color atoms white

delay

Causes the screen to refresh and the script to stop executing for the specified number of seconds.

Syntax

delay [time-delay]

delay on

Definitions

[time-delay]

is in seconds -- (integer|decimal, >=0)

See also: animation or anim, exit, frame, loop, model, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

depth

Slab and Depth together control the percentage of the molecule to be displayed based on clipping planes. slab on turns slab/depth on. slab 50 shows the back 50% of the molecule. slab 25 show the back 25% of the molecule. Atoms appear solid; bonds appear hollow.

Syntax

depth [slab-percent]

Definitions

[slab-percent]

is an (integer, 0 to 100)

See also: ???,

Examples:

slab 50; depth 0;slab on; # show the back half of the molecule
slab 100;depth 50; slab on;# show the front half of the molecule
slab 75; depth 25;slab on; # show middle 50% of the molecule
slab 50;depth 50;slab on; # show a plane that is 1 pixel deep

dots

Turns dotted surface on or off for Van der Waals radii or solvent probe (if in addition set solvent ON).

Syntax

dots ON/OFF{default: ON}

See also: backbone, background, cartoon or cartoons, center or centre, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

echo

Echos a string of text to the window at the location predefined by the "set echo" command as well as to the Java Console. "echo" by itself deletes the text at the selected position (top, middle, or bottom).

Syntax

echo (string)

See also: font, hover, label or labels, set (highlights),

Examples:

set echo top left
font echo 30 serif bolditalic
color echo green
echo "I am green top left 30 serif bolditalic"

exit

Stops execution of the script current script. In the case of a script that is running as a "child" (for example, from a "source" command, execution continues with the parent.

See also: animation or anim, delay, frame, loop, model, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

font

Sets font size and information in labels and other text-bearing elements.

Syntax

font _object_with_text [font-size] [font-face]{default: SansSerif} [font-style]{default: Plain}

Definitions

[font-size]

is approximately the same as Rasmol -- (integer, 6 to 63)

[font-face]

is SERIF, SANSSERIF, or MONOSPACED

[font-style]

is PLAIN, BOLD, ITALIC, or BOLDITALIC

See also: echo, hover, label or labels, set (highlights),

frame

Sets the current animation frame (1 being the first). (Same as the model command.)

Syntax

frame (integer >= 1)

Go to a specific frame.

frame 0

Overlay all frames.

frame NEXT

Go to next frame

frame -1

Go to previous frame.

See also: animation or anim, delay, exit, loop, model, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

Examples:

model 1
model NEXT
model -1
model 0;select *;wireframe 0.1;spacefill 0.2
anim on
model 0;select *;wireframe off;spacefill off;
select */1;wireframe 0.1;spacefill 0.2;color atoms red;
select */35;wireframe 0.1;spacefill 0.2;color atoms blue

hbonds

Hydrogen bonds can be turned on or off, colored, and given custom width in angstroms.

Syntax

hbonds ON/OFF{default: ON}

hbonds [width-in-angstroms]

hbonds [width-by-Rasmol]

Definitions

[width-in-angstroms]

is a (decimal, 2.0)

[width-by-Rasmol]

is in 1/250ths of an Angstrom (deprecated) -- (integer, 500)

See also: set (bond styles), ???,

hover

Turns on and off pop-up labels that appear when the user "hovers" the mouse over the atom. If a string is given, it is used as the label. Special characters include: %a (atom name), %b (protein B-Factor), %c %s (protein chain and residue), %e (element symbol), %i (sequential number), %m (single letter amino acid code), %n (3-letter residue name), %r (PDB residue number), %U (same as %e %i). For a full list, see the example HTML page.

Syntax

hover ON/OFF/string

See also: echo, font, label or labels, set (highlights),

isosurface

Jmol can generate isosurfaces from scalar field data in files of the gaussian .cube format, which contains both atom positions and scalar data. The load command reads only the atom position data from the .cube file.A separate isosurface command is used to read the scalar field data and construct the isosurface. This surface represents the points in space where scalar values cross a specified "cutoff" value. Inside the surface, values are greater or equal to a specified positive cutoff or less than or equal to a specified negative cutoff. The default cutoff is 0.02. Note that positive and negative surfaces are created separately. You can give them distinct names and control their display properties independently. Parameters to the isosurface command control the cutoff value and the display characteristics of the surface. By reading the same .cube file more than once with different parameters, or by reading different .cube files, you can construct different isosurfaces with different shapes and sizes. By naming these individual surfaces with unique identifiers you can control display settings and color for each of the surfaces independently.The isosurface command is similar to the pmesh command in terms of options. The isosurface command takes the overall format:isosurface surfaceID cutoff [option] "filename.cube"(The filename must be in double quotes, but the extension '.cube' is not necessary.) The .cube file may be gzip-compressed. isosurfaceID is any name that you want to use later to refer to this particular surface.

Syntax

isosurface isosurfaceID{default: all isosurfaces}

Selects a specific isosurface (or all isosurfaces) for subsequent color commands.

isosurface isosurfaceID{default: all} ON/OFF{default: ON}

Turn on/off the specified isosurface.

isosurface isosurfaceID{default: all} DELETE

Delete the specified isosurface.

isosurface isosurfaceID(optional) xyz.cub.gz

Loads isosurface file "xyz.cub.gz", optionally assigned id isosurfaceID.

isosurface isosurfaceID{default: all} DOTS or NODOTS{default: NODOTS} xyz.cub.gz{default: current}

Controls whether or not dots are shown at the isosurface points.

isosurface isosurfaceID{default: all} FILL or NOFILL{default: FILL} xyz.cub.gz{default: current}

Controls whether the isosurface appears solid (the default).

isosurface isosurfaceID{default: all} MESH or NOMESH{default: NOMESH} xyz.cub.gz{default: current}

Controls whether lines between the isosurface points are drawn, given the appearance of a mesh.

Examples:

isosurface pos05 0.05 "examples/ethene-HOMO.cub.gz";isosurface neg05 -0.05 "examples/ethene-HOMO.cub.gz";
# now load some other surface further out;isosurface pos01 0.01 "examples/ethene-HOMO.cub.gz";isosurface neg01 -0.01 "examples/ethene-HOMO.cub.gz";color isosurface translucent; # make neg01 translucent
isosurface pos01 nofill mesh; # make pos01 a mesh;color isosurface translucent; # make the pos01 mesh translucent, too
isosurface neg01 dots; # make neg01 show dots, too
isosurface neg01 nofill; # only dots
isosurface nodots nomesh fill; #everybody is back to a solid ...;color isosurface opaque; # ... and opaque
isosurface neg01; #select neg01;color isosurface green;
isosurface pos01;color isosurface violet;
slab on; slab 50; # slab in order to see the inside
slab off; # all done!

label or labels

Turns on and off atom labels based on a previous selection. If a string is given, it is used as the label. Special characters include: %a (atom name), %b (protein B-Factor), %c %s (protein chain and residue), %e (element symbol), %i (sequential number), %m (single letter amino acid code), %n (3-letter residue name), %r (PDB residue number), %U (same as %e %i). For a full list, see the example HTML page.

Syntax

label ON/OFF/string

See also: echo, font, hover, set (highlights),

Examples:

select nitrogen
label %a: %x %y %z

load

Loads the specified file or URL.

Syntax

load [file name]

Jmol automatically determines file type based upon the contents of the file.

load [param-ignored] [file name]

The format parameter is ignored. This form is allowed for backward compatibility with RasMol/Chime.

Definitions

[file name]

is a model filename or URL -- (string)

[param-ignored]

is for Rasmol/chime compatibility; ignored -- (string)

See also: ???,

loop

Causes the script to restart at the beginning, with an optional time delay.

Syntax

loop [time-delay]

loop on

Definitions

[time-delay]

is in seconds -- (integer|decimal, >=0)

See also: animation or anim, delay, exit, frame, model, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

Examples:

color bonds red
delay 3
color bonds green
loop 1

measure or monitor

Renders a measurement between the specified atoms. See also set measurement.

Syntax

measure ON/OFF{default: ON}

Turns on and off the distance, angle, dihedral measurement labels while leaving the measurement line itself present.

measure [atom-number] [atom-number]

Two atoms specify a distance measurement.

measure [atom-number] [atom-number] [atom-number]

Three atoms specify an angle measurement.

measure [atom-number] [atom-number] [atom-number] [atom-number]

Four atoms specify a dihedral angle measurement.

Definitions

[atom-number]

is the sequential number assigned to the atom -- (integer, >=1)

See also: backbone, background, cartoon or cartoons, center or centre, dots, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

meshribbon

A mesh ribbon is similar to a strand, but is more the quality of a loosely woven fabric.

Syntax

meshribbon ON/OFF{default: ON}

meshribbon [mesh-ribbon-radius]

Definitions

[mesh-ribbon-radius]

is the overall radius of the mesh ribbon -- (decimal, =4.0)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

model

Sets the current model (1 being the first). (Same as the frame command.)

Syntax

model (integer >= 1)

Display a specific model.

model 0

Overlay all models.

model NEXT

Display the next model.

model -1

Display the previous model.

See also: animation or anim, delay, exit, frame, loop, move, moveto, quit, script or source, ???, ???, ???, ???, ???,

Examples:

model 1
model NEXT
model -1
model 0;select *;wireframe 0.1;spacefill 0.2
anim on
model 0;select *;wireframe off;spacefill off;
select */1;wireframe 0.1;spacefill 0.2;color atoms red;
select */35;wireframe 0.1;spacefill 0.2;color atoms blue

move

The move command provides powerful animation capabilities. It allows you to specify rotations, zooming, and translations to be performed in a specified period of time. xRot, yRot, and zRot are rotations about the cartesian axes in degrees. Zoom specifies a zoom factor (there is a good chance this is not currently implemented properly) xTrans, yTrans, and zTrans are translations in the range -100 to 100. If you do not know what slab is, just put in a zero. see the slab command for more information.

Syntax

move [x-rotation] [y-rotation] [z-rotation] [zoom-factor] [x-translation] [y-translation] [z-translation] [slab-cutoff] [seconds-total] [move-frames-per-second]{default: 30} [maximum-acceleration]{default: 5}

Definitions

[x-rotation]

is the degrees of rotation about x -- (integer)

[y-rotation]

is the degrees of rotation about y -- (integer)

[z-rotation]

is the degrees of rotation about z -- (integer)

[zoom-factor]

is a scaling factor -- (integer)

[x-translation]

is the distance offset along x -- (integer)

[y-translation]

is the distance offset along y -- (integer)

[z-translation]

is the distance offset along z -- (integer)

[slab-cutoff]

is the cutoff for the slab display -- (integer)

[seconds-total]

is the amount of time to wait -- (decimal)

[move-frames-per-second]

is the frames per second to move -- (integer)

[maximum-acceleration]

is the maximum acceleration -- (integer)

See also: animation or anim, delay, exit, frame, loop, model, moveto, quit, script or source, ???, ???, ???, ???, ???,

moveto

The moveto command rotates the molecule to a predefined orientation. The first parameter specifies the number of seconds during which the molecule should rotate smoothly from the current orientation to the new orientation. A 0 for this first parameter specifies an instantaneous reorientation. The next three parameters (x, y, and z) define the axis relative to the default orientation about which the molecule should be rotated. The fifth parameter defines the counterclockwise (right-hand) rotation in degrees about this axis. "moveto 0 0 0 0 0" rotates the model to the default orientation (equivalent to "reset"). If the fifth parameter is 0 but any one of x, y, or z is nonzero, then no reorientation occurs (because the axis has been specified, but the rotation is 0 degrees). In conjunction with "show orientation" this command allows reading and restoring specific user-specified orientations.

Syntax

moveto [time-in-seconds] [coord-value] [coord-value] [coord-value] [cw-rotation-deg]

Definitions

[time-in-seconds]

is in (seconds)

[coord-value]

is a (decimal)

[cw-rotation-deg]

is a (decimal)

See also: animation or anim, delay, exit, frame, loop, model, move, quit, script or source, ???, ???, ???, ???, ???,

Examples:

moveto 0 1 0 0 -90; #view from top
moveto 0 0 1 0 90; #view from right
moveto 0 0 1 0 -90; #view from left
moveto 2 1 0 0 90; #view from bottom with smooth 2-second transition
moveto 0 0 0 0 0; #default view with instantaneous transition

pmesh

With the pmesh command you can add one or more surfaces to a model. The pmesh command is similar to the isosurface command in terms of options. The pmesh command takes the overall format:pmesh meshID [option] "filename.pmesh"(The filename must be in double quotes, but the extension '.pmesh' is not necessary.) The .pmesh file may be gzip-compressed. meshID is any name that you want to use later to refer to the mesh. The command also sets the 'current' mesh.Note: meshes are not currently model-specific and are limited to triangles and quadrilaterals.Format of the pmesh files required by Jmol:The format of a pmesh file is relatively simple (example file):

100 3.0000 3.0000 1.0000 2.3333 3.0000 1.0000 ...(98 more like this) 81 5 0 10 11 1 0 ...(80 more sets like this) The first line defines the number of grid points defining the surface (integer, n)The next n lines define the Cartesian coordinates of each of the grid points (n lines of x, y, z floating point data points)The next line specifies the number of polygons, m, to be drawn (81 in this case).The next m sets of numbers, one number per line, define the polygons. In each set, the first number, p, specifies the number of points in each set. Currently this number must be either 4 (for triangles) or 5 (for quadrilaterals). The next p numbers specify indexes into the list of data points (starting with 0). The first and last of these numbers must be identical in order to "close" the polygon.

Syntax

pmesh pmeshID{default: all pmeshes}

Selects a specific pmesh (or all pmeshes) for subsequent color commands.

pmesh pmeshID{default: all pmeshes} ON/OFF{default: ON}

Turn on/off the specified mesh.

pmesh pmeshID{default: all pmeshes} DELETE

Delete the specified mesh.

pmesh pmeshID(optional) xyz.pmesh.gz

Loads pmesh file "xyz.pmesh.gz", optionally assigned id pmeshID.

pmesh pmeshID{default: all pmeshes} DOTS or NODOTS{default: NODOTS} xyz.pmesh.gz{default: current}

Controls whether or not dots are shown at the polygon vertices.

pmesh pmeshID{default: all pmeshes} FILL or NOFILL{default: FILL} xyz.pmesh.gz{default: current}

Controls whether the polygons are filled (the default).

pmesh pmeshID{default: all pmeshes} MESH or NOMESH{default: NOMESH} xyz.pmesh.gz{default: current}

Controls whether the edges of the polygons are drawn.

Examples:

pmesh myPlane "examples/10x10pmesh.txt"
# load a pmesh with ID myPlane
color pmesh translucent yellow
# make it translucent yellow
pmesh myWave "examples/wave.pmesh"
# load another pmesh, with ID myWave
pmesh dots
# turn on dots on all loaded pmeshes
pmesh myWave
# select pmesh myWave
color pmesh white
# color it white
pmesh myPlane mesh
# only display the mesh for myPlane
pmesh myPlane nodots
# no dots for myPlane

polyhedra

Jmol supports polyhedral representation of molecular structures. Jmol will form tetrahedrons and octahedrons.Basis. Potential polyhedra centers are defined by the currently selected set of atoms. From this set of centers, polyhedra can be formed based upon bonds (polyhedra BONDS) or upon distance (polyhedra 2.0). If you construct them based on distance, then you may specify an optional set of atoms to be considered as vertices. This set of valid vertex atoms is in the form of a standard Jmol atom expression (such as hydrogen or atomno12 and not nitrogen) and must be specified in parentheses as shown in the examples given below.Valid Polyhedra. The following three rules govern the formation of polyhedra:

If a center has exactly 4 vertices and the center is inside the 4 planes defined by the vertices when taken as triples, then a tetrahedron is constructed.If a center has exactly 6 vertices and the center is inside the 8 planes defined by the triples that define the convex surface, then an octagon is constructed.In any other situation, no polyhedron is constructed.Options. Once the polyhedra are constructed, other options apply based upon whether or not the central atom is selected. The command has a large number of options and is somewhat complicated. See the discussion below in the context of each specific parameter option.Note: Polyhedra probably do not interact well with multiple models.

Syntax

polyhedra

Sets the current polyhedra to be "all" for subsequent use by the 'color polyhedra' command.

polyhedra ON/OFF{default: ON}

Show or hide polyhedra whose central atom is selected.

polyhedra DELETE

Delete the polyhedra associated with central atoms that are selected.

polyhedra BONDS

Constructs polyhedra based upon bonding information. Selected atoms are search for centers that have exactly 4 or 6 bonds with the vertex atoms in a conforming orientation.

polyhedra [maximum-distance-in-angstroms]

Constructs polyhedra based upon distance. Centers must contain exactly 4 or 6 atoms within the specified radius, in Angstroms (a decimal number).

polyhedra [maximum-distance-in-angstroms] [atom-expression]

Constructs polyhedra based upon distance with control over which atoms are considered as vertices. Centers must contain exactly 4 or 6 atoms within the specified atom expression that are also within the specified radius in angstroms. Note that the atom expression must be specified in parentheses.

polyhedra EDGES

Highlight the edges of the polyhedra whose central atom is in the currently selected set.

polyhedra FRONTEDGES

Highlight only the front edges of the polyhedra whose central atom is in the currently selected set.(Useful when color is translucent.)

polyhedra NOEDGES

Turn off edge highlighting.

Definitions

[atom-expression]

is any expression that evaluates to a set of atoms -- (atom-expression)

Examples:

select *;polyhedra bonds; color polyhedra grey
select atomno=19; polyhedra 3.0 (hydrogen);color polyhedra yellow
select *;polyhedra 2.0 #all three
select *;polyhedra 2.0 (not within (1.1225, carbon)) #note how this disallows one of the three
select *;color polyhedra translucent; # now we can see the carbons inside
select *; polyhedra edges; # hilite the edges
color polyhedra translucent orange;
select *;polyhedra off

quit

In the current release of Jmol, quit is synonymous with exit. This is inconsistent with RasMol, where quit means to exit the program.

See also: animation or anim, delay, exit, frame, loop, model, move, moveto, script or source, ???, ???, ???, ???, ???,

refresh

Forces a screen repaint during script execution. (Unnecessary, and thus deprecated.)

See also: reset, rotate,

reset

Resets molecule to its original position: zoom 100; center; translate x 0; translate y 0;

See also: refresh, rotate,

restrict

Selects the atoms identified by the atom expression and hides all atoms and bonds which are outside the selection set. NOTE: This command cannot be reversed without reloading the model!

Syntax

restrict {default: ALL}

Restricts to all atoms;possibly not H atoms.

restrict [atom-expression]

Restricts atoms based on an atom expression.

Definitions

[atom-expression]

is any expression that evaluates to a set of atoms -- (atom-expression)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

Examples:

restrict protein
restrict solvent
restrict within(3.0,[FS4]102)

ribbon or ribbons

Ribbons offer a representation the protein backbone or nucleic acid helix using a flat band that smoothly traces the midpoints of adjacent alpha carbon atoms (or phosphorus atoms in nucleotide chains). The ribbon is perpendicular to the peptide plane.

Syntax

ribbon ON/OFF{default: ON}

ribbon [ribbon-radius]

Normally, ribbons vary in width according to the amino acid atom positions. This command sets the width of the ribbon to be a connstant value (a decimal, in Angstroms).

Definitions

[ribbon-radius]

is half of the overall width of the ribbon -- (decimal, =4.0)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, rocket or rockets, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

rocket or rockets

Creates a "rocket" cartoon.

Syntax

rocket ON/OFF{default: ON}

rocket [rocket-radius]

Definitions

[rocket-radius]

is half of the overall width of the rocket barrel -- (decimal, =4.0)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, select, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

rotate

Rotates the model the specified angle about the specified axis. Integer values specify degrees.

Syntax

rotate X/Y/Z [number-of-degrees]

Definitions

[number-of-degrees]

is the number of degrees -- (integer)

See also: refresh, reset,

script or source

Loads and executes the specified script file/url. The hash/pound/sharp character (#) character marks a comment to the end of the line. The semicolon character (;) separates multiple statements on the same line. A script file may load another script file, up to 10 deep.

Syntax

script [file-name]

Definitions

[file-name]

is any valid filename or URL -- (string)

See also: animation or anim, delay, exit, frame, loop, model, move, moveto, quit, ???, ???, ???, ???, ???,

select

Selects the atoms identified by the expression. If no expression is given then all atoms are selected.

Syntax

select {default: ALL}

Selects all atoms (possibly not H atoms).

select [atom-expression]

Selects atoms based on an atom expression. To select atoms specific to a specific model when more than one model is present, use "/n" where "n" is the model number. For example, to select all atoms of model 3, use select */3.

Definitions

[atom-expression]

is any expression that evaluates to a set of atoms -- (atom-expression)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, set (highlights), set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

Examples:

select carbon;color white
select protein;ribbons on
select *:D;color blue
select [HIS]:D;spacefill 300
select [HIS]92:D.N;spacefill 600
select [HIS]92:D.C?;color orange
select [HIS]92.N;color [255,196,196]
select elemno7;spacefill 200
select within(group, within(10.0, :a));color green;select :a;color red
select within(chain, [HIS]92);color white;
select within(chain, within(3.0,[HIS]92:D));color purple;
select within(chain,within(5.0,[HIS]92));color white # this last a bug?

set (bond styles)

This group of commands sets the appearance of various optional bond effects for the model.

Syntax

set bonds ON/OFF

In some file formats (.mol files, for example) the connection data may indicate the bond type--single, double, triple, or quadruple. The set bonds command determines whether or not multiple bonds are displayed. Use set bonds OFF when you want all bonds to appear as single bonds.

set bondmode AND

When script commands affect a set of atoms, BOTH atoms must be in the set for the bonds between them to also be affected.

set bondmode OR

When script commands affect a set of atoms, EITHER atom may be in the set for the bonds also to be affected.

set hbonds BACKBONE or SIDECHAIN

Hydrogen bonds between protein amino acid residues or nucleic acid base pairs are displayed as lines. These lines can be displayed whether or not the H atoms are present in the file, and can be drawn either between the two non-hydrogen atoms involved in the bond (O or N, typically, the default) or, alternatively, between the two backbone alpha-carbon atoms, depending upon the desired effect.

set ssbonds BACKBONE or SIDECHAIN

Sulfur-sulfur bonds in cysteine bridges of proteins are displayed as lines. These lines can either be between the two sidechain sulfur atoms (the default) or between the two backbone alpha-carbon atoms, depending upon the desired effect.

See also: hbonds, ???,

set (default color scheme)

Sets the default color scheme to be the traditional Rasmol/Chime scheme or the newer, more subtle, Jmol scheme. This command does not actually change the display for an object unless that object is currently being displayed using the default color scheme. See the Jmol Colors page for default color scheme details.

Syntax

set defaultColors JMOL

set defaultColors RASMOL

See also: background, color or colour, color (atom object), color (bond object), color (element), color (model object),

set (highlights)

This command group allows for annotation and highlighting of atoms in terms of labels and "halos."

Syntax

set display SELECTED

Sets the option ON to dispay a "halo" around atoms when they are or become selected as a way of highlighting specific atoms.

set display NORMAL

Turns off selection halos

set echo [vertical-position] [horizontal-position]{default: center for top and middle; left for bottom}

Selects which of the three possible echo positions (top, middle, or bottom) will be written to by the next "echo" command and, optionally, sets the horizontal position of that text to left, center, or right.

set echo OFF

Turns off all three echo texts.

set fontsize [font-size]{default: 8}

Sets the font size for atom labels.

set frank ON/OFF

Determines whether or not "Jmol" is indicated in the bottom right corner of the window.

set labeloffset [x-offset] [y-offset]

Sets the label offset relative to the atom being labeled.

Definitions

[vertical-position]

is one of the following: -- TOP, MIDDLE, BOTTOM

[horizontal-position]

is one of the following: -- LEFT, CENTER, RIGHT

[font-size]

is approximately the same as Rasmol -- (integer, 6 to 63)

[x-offset]

is the x-offset -- (integer)

[y-offset]

is the y-offset -- (integer)

See also: backbone, background, cartoon or cartoons, center or centre, dots, echo, font, hover, label or labels, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (lighting and perspective), set (visibility), ???, ???, ???, ???, ???,

set (lighting and perspective)

This commands in this group determine the overall lighting effects, size, and rotation for the model.

Syntax

set ambient [ambient-percent]

Sets the amount of "ambient" light filling the shadows created by the apparent light source. An ambient value of 0 creates an effect of a spotlight on a stage; a value of 100 removes the shadow entirely, creating a flat, nonrealistic effect.

set diffuse [diffuse-percent]

Sets the amount of "diffuse" light apparently emanating from the spotlight, but not hitting and reflecting off the model directly. Setting the diffuse value to 0 turns this effect off; giving the effect of the model in a black-walled room where no light reflection is possible, effectively turning off all shadows.

set perspectivedepth ON/OFF

Sets perspective depth on or off. OFF is required for proper function of absolute scale (set scale3d x).

set scale3d [viewing-distance]

Sets the absolute scale of the model by setting the viewing distance from the user to the model in arbitrary units. The actual scale will depend upon the sizes of both the applet window and the screen.

set specpower [specular-power]

Sets the density of dots in the specular reflection.

set specular [specular-percent]

Sets the size of the apparent reflection from a light source. set specular 0 turns off this effect.

Definitions

[ambient-percent]

is an (integer, 0 to 100)

[diffuse-percent]

is an (integer, 0 to 100)

[viewing-distance]

is the apparent distance from the model to the user in arbitrary units -- (integer), (decimal)

[specular-power]

is an (integer)

[specular-percent]

is an (integer, 0 to 100)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (visibility), ???, ???, ???, ???, ???,

set (visibility)

This command group turns on or off specific sets of atoms and axes/cell-related options.

Syntax

set axes [line-width-or-type]

Turns on or off displayed axes, and determines their line style and line width (as a decimal number, in Angstroms).

set boundbox [line-width-or-type]

Turns on or off a wire-frame box that contains the model, and determines the line style and line width (as a decimal number, in Angstroms) of that box.

set disablePopupMenu ON/OFF

Disables (set disablePopupMenu ON) or enables (set disablePopupMenu OFF) the pop-up menu.

set radius [probe-radius-in-angstroms]{default: 1.2}

Sets the radius of the solvent "ball" that would run around the structure defining its outline. After set radius, you must (re)issue dots ON for it to take effect, and the solvent probe option for dots must be set on using set solvent ON (below).

set showHydrogens ON/OFF

Turns on and off display of hydrogen atoms.

set solvent ON/OFF

Turns on and off display of solvent "probe" that can be displayed using dots. After set solvent ON, a subsequent dots ON

Definitions

[line-width-or-type]

is a line width or type for a drawing object -- ON, OFF, DOTTED, (integer, 1 to 19), (decimal, 2.0)

[probe-radius-in-angstroms]

is a (decimal)

[strand-count]

is the number of strands -- (integer, 0 to 20)

See also: backbone, background, cartoon or cartoons, center or centre, dots, measure or monitor, meshribbon, restrict, ribbon or ribbons, rocket or rockets, select, set (highlights), set (lighting and perspective), ???, ???, ???, ???, ???,