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).
animation ON/OFF{default: ON} |
|
animation direction -1 |
|
animation direction +1 |
|
animation fps [frames-per-second] |
|
animation frame (integer >= 1) |
|
animation frame 0 |
|
animation frame NEXT |
|
animation frame -1 |
|
animation mode loop |
|
animation mode loop [time-delay1] [time-delay2] |
|
animation mode ONCE |
|
animation mode PALINDROME |
|
animation mode PALINDROME [time-delay1] [time-delay2] |
|
[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) |
An increasing number of commands, including select, restrict, define, center, connect, and polyhedra take for parameters one or more 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. New in version 10.2 is connected([optional min # bonds], [optional max # bonds], [optional atom expression]) See examples/groups.txt for many examples of using connected() with define.
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 select 95^a:L # selects chain L, residue 95, insertion code a
Shows the backbone of a protein or nucleic acid macromolecule by connecting the alpha carbons. The selection of backbone units to display depends upon the currently selected atoms and the bondmode setting.
backbone ON/OFF{default: ON} |
|
backbone [backbone-radius] |
|
[backbone-radius] | is the radius of the backbone -- (decimal, <=4.0) |
Sets color of the background. For specifications, see color.
background [RGB-color] |
|
background HOVER [color-or-none] |
|
background LABELS [color-or-none] |
|
[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 _colorRGB, NONE |
Cartoons are the classic shapes the are used to depict alpha helices and beta-pleated sheets.
cartoon ON/OFF{default: ON} | |
cartoon [cartoon-radius] |
[cartoon-radius] | is the radius of the cartoon elements -- (decimal, <=4.0) |
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).
center [atom-expression] |
|
center [xyz-coordinate] |
|
center [drawn-object] |
|
center |
|
[atom-expression] | is any expression that evaluates to a set of atoms |
[xyz-coordinate] | is an xyz coordinate -- three values, one for X, one for Y, and one for Z |
[drawn-object] | is a drawn object -- $name |
select [CYS]32 center selected
The centerAt command allows centering of the model in one of three different ways: based on an absolute coordinate position, based on an offset relative to the center of the boundbox (the overall application default), or based on an offset relative to the average position of the currently selected atoms. Centering on a specific atom or atom set without first selecting it is also available using the center command. If the three numerical values are omitted, they default to 0.0 0.0 0.0.
centerAt ABSOLUTE x y z {default: 0.0 0.0 0.0} |
|
centerAt AVERAGE x y z {default: 0.0 0.0 0.0} |
|
centerAt BOUNDBOX x y z {default: 0.0 0.0 0.0} |
|
centerAt absolute 1.0 2.0 3.0 centerAt boundbox 1.0 2.0 -3.0 centerAt average 0.0 0.0 0.0
In general, the color command takes the following syntax:color [object] [transparent/opaque] [color or color scheme][object] 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. This section of the guide discusses each of these in turn:
color [color-scheme] |
|
[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 |
Sets the color of atom-related objects (atoms, backbone, cartoons, dots, labels, meshribbon, polyhedra, rockets, stars, strands, trace, and vectors).
color [atom-associated-object] [color-scheme] |
|
[atom-associated-object] | is an object related to an atom -- ATOM, BACKBONE, CARTOON, DOTS, LABELS, MESHRIBBON, POLYHEDRA, RIBBONS, ROCKETS, STARS, STRANDS, TRACE, VECTORS |
[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 |
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.
color BONDS [color-or-none] |
|
color SSBONDS [color-or-none] |
|
color HBONDS [color-or-none] |
|
color HBONDS TYPE |
|
[color-or-none] | is _colorRGB, NONE |
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.
color [element-name] [RGB-color] |
[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] |
Sets the color of various objects (axes, boundbox, echo, hover, measurements, pmesh, polyhedra, and unitcell).
color [model-object] [RGB-color] |
[model-object] | is AXES, BOUNDBOX, ECHO, HOVER, ISOSURFACE, MEASUREMENTS, PMESH, POLYHEDRA, 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] |
select [CYS]32 ;label %a: %x %y %z;color labels white; set axes on;color axes green set axes on;color axes [xFF00FF];
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.
# 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
The connect command allows real-time bond manipulation, allowing the user or application to connect and disconnect specific atom sets. The general syntax is as follows: connect [minimum and maximum distances] [source and target atom sets] [bond type] [modify/create option] (connect by itself deletes all bonds and then creates bonds based on Jmol default bond-generating algorithms, all as single bonds, without respect to what bonding patterns might have been indicated in the model file.)[minimum and maximum distances] Distances are given in Angstroms, either as decimals or integers. If only one distance parameter is given, it represents a maximum distance. If neither the minimum nor the maximum distance parameter is given, all connections between the two atom sets are made, regardless of distance. [source and target atom sets] The source and target atom sets are embedded atom expressions and therefore must be enclosed in parentheses. If the source atom set is not given, it is taken to be the currently selected atom set, "(selected)". If neither atom set is given, "(selected) (selected)" is assumed.[bond type] Unless otherwise specified, connections are automatically introduced as single bonds. Any one of the following bond types may be specified: SINGLE, DOUBLE, TRIPLE, AROMATIC, PARTIAL, PARTIALDOUBLE, or HBOND. (In appearance, AROMATIC and PARTIALDOUBLE are identical. PARTIAL and HBOND are both dashed, but they have different patterns, and newly created hydrogen bonds are only thin lines.)[modify/create option] Four additional mutually exclusive options relate to what sort of connections are made. These include: CreateOrModify (default) If the connection fits the parameters, it will be made. Bonds already present between these atoms will be replaced.Create Only new bonds will be created. If a bond of any type already exists between two matching atoms, it will not be affected.Modify Only pre-existing bonds will be modified. No new bonds will be created. Delete Delete the specified connections.
# two ways to link atom #1 with atom#2 connect (atomno=1) (atomno=2) DOUBLE select atomno=1,atomno=2; connect (selected) # connect all carbons with hydrogens that are within the range 1.0 to 1.2 angstroms and are not already connected connect 1.0 1.2 (carbon) (hydrogen) PARTIAL CREATE # change all bonds to single bonds connect (all) (all) SINGLE MODIFY # connect every atom with every other atom that is within 1.5 angstroms whether it is connected already or not connect 1.5 (all) (all) ModifyOrCreate # delete all bonds WITHIN a selected atom set connect (selected) (selected) DELETE # delete all bonds TO a selected atom set connect (selected) (not selected) DELETE
Throws up a console window from which a user can enter script commands and monitor the messages returned by Jmol.
Defines the specified variable to the the atoms selected by the atom expression.IMPORTANT NOTE: The define command should be used with some discretion. If you should define a term that later becomes a reserved keyword to any command in any future version of Jmol, your page may not be compatible with that future version. A simple way to avoid this situation is to put a tilde (~) in front of any definition you make. Do not use a leading underscore (_), as there are many "hidden" reserved definitions that start with that character.
define [variable-name] [atom-expression] |
[variable-name] | is a (string) |
[atom-expression] | is any expression that evaluates to a set of atoms |
define ~mygroup within(5.0,[FS4]102) select ~mygroup color atoms white
Causes the screen to refresh and the script to stop executing for the specified number of seconds.
delay [time-delay] | |
delay on |
[time-delay] | is in seconds -- (integer|decimal, >=0) |
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.
depth [slab-percent] |
[slab-percent] | is an (integer, 0 to 100) |
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
Turns dotted surface on or off for van der Waals radii or solvent probe (if in addition set solvent ON).
dots ON/OFF{default: ON} |
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).
echo (string) |
set echo top left font echo 30 serif bolditalic color echo green echo "I am green top left 30 serif bolditalic"
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.
Sets font size and information in labels and other text-bearing elements.
font [object-with-text] [font-size] [font-face]{default: SansSerif} [font-style]{default: Plain} |
[object-with-text] | is AXES, ECHO, HOVER, or LABEL |
[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 |
Sets the current animation frame (1 being the first). (Same as the model command.)
frame (integer >= 1) |
|
frame 0 |
|
frame NEXT |
|
frame -1 |
|
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
Hydrogen bonds can be turned on or off, given custom widths in Angstroms, or colored (see color hbonds and set ). In addition, the positions of a restricted set of protein and nucleic acid hydrogen bonds can be calculated.
hbonds ON/OFF{default: ON} | |
hbonds [width-in-angstroms] | |
hbonds CALCULATE |
|
[width-in-angstroms] | is a (decimal, 2.0) |
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. See also label.
hover ON/OFF/string |
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. Any number of display characteristics (such as "DOTS MESH NOFILL") may be included in a single isosurface command. 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".Starting in version 10.00.42, you can map a function (based on values in another .cube file) onto an isosurface. This is done by adding to the isosurface command the keywords COLOR ABSOLUTE followed by the negative cutoff, the positive cutoff, and the name of another .cube file. Surface are then colored using a red-->orange-->yellow-->green-->blue rainbow, where red represents minimum values and blue represents maximum values. If absolute cutoff values are not provided, then Jmol will calculate the range based upon the actual data values calculated for the surface points.(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.
isosurface isosurfaceID{default: all isosurfaces} |
|
isosurface isosurfaceID{default: all} ON/OFF{default: ON} |
|
isosurface isosurfaceID{default: all} DELETE |
|
isosurface isosurfaceID(optional) cutoff{default: 0.02} xyz.cub.gz |
|
isosurface isosurfaceID{default: all} cutoff{default: 0.02} xyz.cub.gz COLOR ABSOLUTE -cutoff +cutoff xyz-map.cub.gz |
|
isosurface isosurfaceID{default: all} cutoff{default: 0.02} xyz.cub.gz COLOR xyz-map.cub.gz |
|
isosurface isosurfaceID{default: all} DOTS or NODOTS{default: NODOTS} cutoff{default: 0.02} xyz.cub.gz{default: current} |
|
isosurface isosurfaceID{default: all} FILL or NOFILL{default: FILL} cutoff{default: 0.02} xyz.cub.gz{default: current} |
|
isosurface isosurfaceID{default: all} MESH or NOMESH{default: NOMESH} cutoff{default: 0.02} xyz.cub.gz{default: current} |
|
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!
Turns on and off atom labels based on a previous selection. If a string is given, it is used as the label. See also hover.
label ON/OFF/string |
|
select nitrogen label %a: %x %y %z
Loads the specified file or URL.
load [file name] |
|
load [param-ignored] [file name] |
|
[file name] | is a model filename or URL -- (string) |
[param-ignored] | is for Rasmol/chime compatibility; ignored -- (string) |
Causes the script to restart at the beginning, with an optional time delay.
loop [time-delay] | |
loop on |
[time-delay] | is in seconds -- (integer|decimal, >=0) |
color bonds red delay 3 color bonds green loop 1
Renders a measurement between the specified atoms. See also set measurement. The measure Two general syntaxes are available. In the older syntax, a series of two to four atom numbers are given, and the appropriate measure (distance, angle, or dihedral angle) is then displayed. The newer, more general syntax is as follows: measure minValue> maxValue> (atom expression>) (atom expression>) ... Using this syntax one can specify a set of measurements to define all at once. Note that these sets are embedded atom expressions that must be enclosed in parentheses. All matching measurements are displayed. Note that unless otherwise specified, all matching criteria in all frames are generated, thus allowing for "animated" measures. Measures can also be between two atoms in different frames (different models) as long as frame all has been specified so that the two models are visible. To specify a particular model, use /n, where n is a model number. By default only the FIRST MATCHING atom in each atom set is used for the measurement when atom sets are used. Adding the keyword ALL indicates that all matching atoms in all atom sets should be selected for measurement. (New in 10.1.)
measure ON/OFF{default: ON} |
|
measure [atom-number] [atom-number] |
|
measure [atom-number] [atom-number] [atom-number] |
|
measure [atom-number] [atom-number] [atom-number] [atom-number] |
|
[atom-number] | is the sequential number assigned to the atom -- (integer, >=1) |
A mesh ribbon is similar to a strand, but is more the quality of a loosely woven fabric.
meshribbon ON/OFF{default: ON} | |
meshribbon [mesh-ribbon-radius] |
[mesh-ribbon-radius] | is the overall radius of the mesh ribbon -- (decimal, =4.0) |
Same as the frame command, except the numbers referencing models are the numbers on the MODEL records, if a PDF file.
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
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, 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.
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} |
[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) |
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 parameter is a coordinated {x, y, z defining the axis relative to the default orientation about which the molecule should be rotated. The next parameter defines the counterclockwise (right-hand) rotation in degrees about this axis. "moveto 0 0 0 0the model to the default orientation (equivalent to "reset"). If the angle 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. This command is deprecated in favor of " rel="_blank">#.moveto
moveto [time-in-seconds] [xyz-coordinate] [cw-rotation-deg] [percent-zoom] |
[time-in-seconds] | is in (seconds) |
[xyz-coordinate] | is an xyz coordinate -- three values, one for X, one for Y, and one for Z |
[cw-rotation-deg] | is a (decimal) |
[percent-zoom] | is an (integer, 5 to 5000) |
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 200; #default orientation with instantaneous transition and a zoom of 200%
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.
pmesh pmeshID{default: all pmeshes} |
|
pmesh pmeshID{default: all pmeshes} ON/OFF{default: ON} |
|
pmesh pmeshID{default: all pmeshes} DELETE |
|
pmesh pmeshID(optional) xyz.pmesh.gz |
|
pmesh pmeshID{default: all pmeshes} DOTS or NODOTS{default: NODOTS} xyz.pmesh.gz{default: current} |
|
pmesh pmeshID{default: all pmeshes} FILL or NOFILL{default: FILL} xyz.pmesh.gz{default: current} |
|
pmesh pmeshID{default: all pmeshes} MESH or NOMESH{default: NOMESH} xyz.pmesh.gz{default: current} |
|
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
Jmol will form a wide variety of polyhedral structures. The polyhedra command can be used for either construction of new polyhedra or modification of existing polyhedra.Polyhedron construction Used for construction of new polyhedra, parameters fall into five subsets:polyhedra [number of vertices] [basis] [selection sets] [display options] [design parameters]In order to construct polyhedra, at least one of the first two of these subsets must be present -- the number of vertices or the basis. In addition, some display options (ON, OFF, DELETE -- see below) are incompatible with polyhedron construction.[number of vertices] Polyhedra involve a central atom and from 3 to 20 outer "vertex" atoms. The number of required vertex atoms is specified by an integer (polyhedra 6). More than one number can be specified, separated by a comma or space character (polyhedra 4,6). If no number of vertices is indicated, any number from 3 to 20 is assumed.[basis] Polyhedra can be formed based either upon the number of atoms bonded to the central atom (polyhedra 4 BONDS) or upon the number of atoms within a specified distance from the central atom (polyhedra 4,6 RADIUS 2.0). (The keyword "RADIUS" is optional, but if it is absent the radius must be indicated as a decimal number, not an integer, so as to distinguish it from a vertex count.) If no radius is indicated, BONDS is assumed.[selection sets] Potential polyhedra centers and vertex atoms are specified in the form of a standard Jmol embedded atom expression, such as (titanium) or (atomno12 and not nitrogen) and as such must be specified in parentheses. The first set specifies the centers; the second set specifies the vertex atoms. The optional keyword "TO" can preceed the vertex set for clarity, as in polyhedra 4,6 BONDS (titanium) TO (oxygen or nitrogen). If no atom sets are designated, the assumption is "(selected) TO (*)". A single designation indicates centers, with "TO (*)" implied. If only "TO" and an atom set is specified, then the centers are taken as the currently selected set of atoms.[display options] Two sets of display options can be included when constructing polyhedra.Polyhedra can be displayed either as traditional "FLAT" faces (the default) or as "COLLAPSED" faces, which display more clearly the central atom.Polyhedra can be displayed either with no edges (NOEDGES, the default), or with a thick line on all edges (EDGES), or on just the front edges (FRONTEDGES). The front-edge-only option is only meaninful when the polyhedra are translucent (see below). [design parameters] Faces are defined as being triangular, involving a central atom and three non-central "vertex" atoms. Two numeric parameters govern the formation of polyhedral faces:centerAngleMax Each of the central angles involving two vertex atoms must be no larger than a specified maximum (default 145o). faceNormalMax The angle between the sum of the three central-vertex vectors and the normal to the vertex-vertex-vertex plane must be no greater than a specified maximum (default 30o).These two empirical design parameters can be tweaked in order to produce desired polyhedra in oddly shaped structures. Getting the optimal value for these parameters in any given situation may take some experimentation. In addition, for collapsed polyhedra, the distance in angstroms from the central atom to the point of collapse can be specified using faceCenterOffset. To set design parameters, simply define a new number as, for example: polyhedra (copper) faceNormalMax=50. Polyhedron modification The polyhedra command can also be used to modify already-constructed polyhedra. Used in this way, the command can take only one atom set expression, and it must not indicate the number of vertices or the basis. If the atom set expression is omitted, "(selected)" is assumed. To turn on, turn off, or delete selected polyhedra, use polyhedra ON, polyhedra OFF, or polyhedra DELETE, respectively. Any of the display options (FLAT, COLLAPSED, EDGES, FRONTEDGES, or NOEDGES) can also be similarly modified. To color a set of polyhedra a particular color or to make them translucent, first select the set of centers of the polyhedra to modify, then use the color polyhedra command.
select *;polyhedra BONDS; color polyhedra grey select atomno=19; select hydrogen; polyhedra RADIUS 3.0 ;color polyhedra yellow polyhedra RADIUS 2.0 (*) COLLAPSED #all three polyhedra (*) DELETE polyhedra RADIUS 2.0 (*) TO (not within (1.1225, carbon)) #note how this disallows one of the three select *;color polyhedra translucent; # now we can see the carbons inside polyhedra (*) EDGES; # highlight the edges select *; color polyhedra translucent orange; polyhedra (*) OFF
# build tetrahedrons around silicon polyhedra BONDS (silicon) # make some of them green select atomno50; color polyhedra translucent green # delete some of them polyhedra (atomno>75 and atomno100) DELETE # now build octahedrons where oxygens are within 2.0 Angstroms of a central aluminum atoms polyhedra BONDS (atomno75) FRONTEDGES select aluminum and atomno > 75; color polyhedra red
In the current release of Jmol, quit is synonymous with exit. This is inconsistent with RasMol, where quit means to exit the program.
Forces a screen repaint during script execution. (Unnecessary, and thus deprecated.)
Resets molecule to its original position: zoom 100; center; translate x 0; translate y 0;
Selects the atoms identified by the atom expression and hides all atoms and bonds which are outside the selection set. For wireframe and backbone, restrict unconditionally follows set bondmode OR, ignoring the current bondmode setting, and hiding any bonds or backbone rods involving any atoms in the restricted set.
restrict {default: ALL} |
|
restrict [atom-expression] |
|
[atom-expression] | is any expression that evaluates to a set of atoms |
restrict protein restrict solvent restrict within(3.0,[FS4]102)
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.
ribbon ON/OFF{default: ON} | |
ribbon [ribbon-radius] |
|
[ribbon-radius] | is half of the overall width of the ribbon -- (decimal, =4.0) |
Creates a "rocket" cartoon.
rocket ON/OFF{default: ON} | |
rocket [rocket-radius] |
[rocket-radius] | is half of the overall width of the rocket barrel -- (decimal, =4.0) |
Rotates the model the specified angle about the specified axis. Integer values specify degrees.
rotate |
|
rotate X/Y/Z [number-of-degrees] |
|
rotate AXISANGLE [xyz-coordinate] [number-of-degrees] |
|
[number-of-degrees] | is the number of degrees -- (integer) |
[xyz-coordinate] | is an xyz coordinate -- three values, one for X, one for Y, and one for Z |
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.
script [file-name] |
[file-name] | is any valid filename or URL -- (string) |
Selects the atoms identified by the expression. If no expression is given then all atoms are selected.
select {default: ALL} |
|
select [atom-expression] |
|
[atom-expression] | is any expression that evaluates to a set of atoms |
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 select 95^a:L # selects chain L, residue 95, insertion code a
This group of commands sets the appearance of various optional bond effects for the model.
set autobond ON/OFF |
|
set bonds ON/OFF |
|
set bondmode AND |
|
set bondmode OR |
|
set hbonds BACKBONE or SIDECHAIN |
|
set ssbonds BACKBONE or SIDECHAIN |
|
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.
set defaultColors JMOL | |
set defaultColors RASMOL |
This command group allows for annotation and highlighting of atoms in terms of labels and "halos."
set display SELECTED |
|
set display NORMAL |
|
set echo [vertical-position] [horizontal-position]{default: center for top and middle; left for bottom} |
|
set echo OFF |
|
set fontsize [font-size]{default: 8} |
|
set frank ON/OFF |
|
set labeloffset [x-offset] [y-offset] |
|
[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) |
This commands in this group determine the overall lighting effects, size, and rotation for the model.
set ambient [ambient-percent] |
|
set diffuse [diffuse-percent] |
|
set perspectiveDepth ON/OFF |
|
set scale3d [viewing-distance] |
|
set specpower [specular-power] |
|
set specular [specular-percent] |
|
[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) |
This command group turns on or off specific sets of atoms and axes/cell-related options.
set axes [line-width-or-type] |
|
set axesInternal ON/OFF |
|
set boundbox [line-width-or-type] |
|
set disablePopupMenu ON/OFF |
|
set radius [probe-radius-in-angstroms]{default: 1.2} |
|
set greyScaleRendering ON/OFF |
|
set hideNameInPopUp ON/OFF |
|
set showHydrogens ON/OFF |
|
set solvent ON/OFF |
|
[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) |
Jmol can be set to read the chain designations in PDB, mmCIF, and related files either with or without case sensitivity. With set chainCaseSensitive OFF, the chain designations are interpreted as case-insensitive. With set chainCaseSensitive ON, the chain designation is read in a case-sensitive manner -- chain "A" is different than chain "a". This supports PDB format model files with more than 26 chains. The default startup up mode is OFF -- chain designation "a" in a SELECT command will refer to chain "A" in a file.
set chainCaseSensitive ON/OFF |
Turns on and off debugging (going to a JavaScript message callback).
set debugScript ON/OFF |
Sets characteristics of the measurement labels and lines. See also measure.
set measurement ON/OFF |
|
set measurement [width-in-angstroms] |
|
set measurement [linewidth-pixels] |
|
set measurement [distance-unit] |
|
set measurement -1 |
|
[width-in-angstroms] | is a (decimal, 2.0) |
[linewidth-pixels] | is an (integer) |
[distance-unit] | is ANGSTROMS, NM, NANOMETERS, PM, or PICOMETERS |
The set picking command determines the response to clicking of atoms by the user.
set picking ON/OFF{default: ON} |
|
set picking ANGLE |
|
set picking ATOM |
|
set picking CENTER |
|
set picking CHAIN |
|
set picking DISTANCE |
|
set picking GROUP |
|
set picking LABEL |
|
set picking TORSION |
|
Sets the spin axis and rate. No actual spinning occurs until the spin ON command is issued or the user turns spinning on using the mouse menu.
set spin FPS [frames-per-second] |
|
set spin X/Y/Z [degrees-per-second] |
|
[frames-per-second] | is an (integer) |
[degrees-per-second] | is an (integer) |
show sends information about the model to the messageCallback function and to the Java Console
show boundbox |
|
show center |
|
show file |
|
show file filepath |
|
show model |
|
show pdbheader |
|
show transform |
|
show zoom |
|
show orientation |
|
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.
slab [slab-percent] | |
slab ON/OFF{default: ON} |
[slab-percent] | is an (integer, 0 to 100) |
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
Renders selected atoms as shaded spheres. A boolean value renders the spheres with the van der Waals radius. A decimal value specifies the sphere radius in Angstroms. An integer followed by "%" specifies sphere radius as a percentage of the van der Waals radius.
spacefill [radius-in-angstroms] | |
spacefill [radius-percent-vdw] | |
spacefill [radius-Rasmol] | |
spacefill IONIC |
|
spacefill ON/OFF{default: ON} | |
spacefill TEMPERATURE |
|
[radius-in-angstroms] | is a (decimal, =3.0) |
[radius-percent-vdw] | is as a percent of the Van der Waals radius -- (integer, -100 to -1) |
[radius-Rasmol] | is in 1/250ths of an Angstrom (deprecated) -- (integer, 1 to 749) |
Starts and stops the molecule spinning around the axis determined by set spin.
spin ON/OFF{default: ON} |
Cisteine disulfide bonds can be turned on or off, colored, and given customized widths in Angstroms.
ssbonds ON/OFF{default: ON} | |
ssbonds [width-angstroms] | |
ssbonds [width-Rasmol] |
[width-angstroms] | is a (decimal, 2.0) |
[width-Rasmol] | is in 1/250ths of an Angstrom (deprecated) -- (integer, 500) |
The star command places a set of crosshairs of a given size in Angstroms on the selected atoms. The default size of the star is, like spacefill, the nominal van der Waals radius for the atom. The default color for the star is that of the atom it is associated with. Use color star [colorname] to then color selected stars the color of your choice.
star ON/OFF{default: ON} |
|
star [length-in-angstroms] |
|
select *.S?;star ON select 40;star 1.0;color star red select *;color star NONE select *;star OFF
Jmol supports two forms of stereo rendering for molecules. In the first form, the two images are placed side by side and rotated so as to appear from slightly different perspectives, creating the illusion of 3D when a practiced user trains one eye on one image and the other eye on the other image. A second form of stereo rendering, anaglyphic rendering, nearly superimposes two identical models that are slightly rotated relative to each other. These models are each of a different color (red and one of blue, cyan, or green). The illusion of depth can then be created when the user wears an inexpensive pair of "3D glasses" that have differently colored lenses. One should experiment with different background colors when using redcyan or redblue stereo rendering. For many users background grey looks better than background white or background black.
stereo [stereo-viewing-angle]{default: 5} |
|
stereo {default: ON} |
|
stereo OFF |
|
stereo REDBLUE [stereo-viewing-angle]{default: 3} |
|
stereo REDCYAN [stereo-viewing-angle]{default: 3} |
|
stereo REDGREEN [stereo-viewing-angle]{default: 3} |
|
[stereo-viewing-angle] | is angle of rotation for stereo viewing -- (integer|decimal) |
zoom 50;background white;stereo ON stereo 90 stereo 5 stereo -5 zoom 100;background grey;stereo REDCYAN stereo REDBLUE 3 stereo REDGREEN;stereo OFF
Strands offer a representation the protein backbone or nucleic acid helix using lines. For proteins, control points are chosen midway between adjacent alpha carbons (or phosphorus atoms in nucleic acids). The strands are arranged perpendicular to the peptide plane. A hermite cubic curve is used to smoothly connect the points.
strands ON/OFF{default: ON} | |
strands [strand-radius] |
|
[strand-radius] | is half of the overall width of the set of strands -- (decimal, =4.0) |
A "trace" is a smooth curve through the center of the carbonyl carbon-alpha carbon bonds of a peptide or the ribose 1-O-P bond.
trace ON/OFF{default: ON} | |
trace [trace-radius] |
[trace-radius] | is the radius of the trace -- (decimal, =4.0) |
Moves the molecule along the specified axes according to the amount specified by value. Value ranges from -100 to 100, and represents the percentage of the display window. Negative values move to the left (for the x axis) and down (for the y axis). A value of 100 will move the molecule completely out of the window. A value of 50 will move the center of the molecule to the edge of the window.
translate X/Y/Z [percent-translation] |
[percent-translation] | is an (integer, -100 to 100) |
Draws vectors arising from vibrational mode data.
vector [diameter-pixels] | |
vector [radius-in-angstroms] | |
vector ON/OFF{default: ON} | |
vector scale [vector-scale] |
|
[diameter-pixels] | is a scaling factor -- (integer, 1 to 19) |
[radius-in-angstroms] | is a (decimal, =3.0) |
[vector-scale] | is a (decimal, -10.0 to 10.0) |
Provided information is present in the file (xyz format with columns 6-8 indicating dx, dy, and dz, or Gaussian harmonic frequency output), turns on and off display of vibration animation and allows setting of the time period for the vibration (in seconds) and the scale of the motion relative to the default (1).
vibration [time-period] |
|
vibration scale [vibration-scale] |
|
[time-period] | is number of seconds per vibration -- (positive number) |
[vibration-scale] | is a (decimal, -10.0 to 10.0) |
Wireframe refers to the bonds drawn between the atoms. A boolean value of ON draws the selected bonds as lines. Alternatively, a numeric value may be used to specify the radius of the bonds. A decimal value such as 0.2 or 0.4 specifies Angstroms. The wireframe command operates on bonds either BETWEEN ANY TWO atoms in a previously selected atom set (having previously set bondmode AND) or TO ANY atoms in a previously selected atom set (having previously set bondmode OR). Note that the selected atoms must already be connected (based on information in the file, Jmol's autobonding algorithm, or from use of the connect or command) in order to show any effect.
wireframe ON/OFF{default: ON} |
|
wireframe [radius-in-angstroms] |
|
wireframe [radius-Rasmol] |
|
[radius-in-angstroms] | is a (decimal, =3.0) |
[radius-Rasmol] | is in 1/250ths of an Angstrom (deprecated) -- (integer, 1 to 749) |
wireframe 0.2 wireframe off
Clears the currently loaded molecule. RasMol forces you to zap prior to loading a new molecule. Jmol currently does not have this restriction and does not enforce it.
Allows enlarging or shrinking of the displayed model. A percentage value specifies the zoom relative to 100, the default value, which in Jmol is calculated so that all atoms are completely visible on the screen through all rotations using the default vanderWaals rendering percentage. The command "zoom OFF" disables mouse-based zooming and zooms to 100. The command "zoom ON" re-enables zooming at the current zoom setting. If the zoom has been turned off, setting the the zoom using, for example, "zoom 50," though it sets the "current zoom setting," has no effect until the next "zoom ON" command is given.
zoom [percent-zoom] | |
zoom ON/OFF{default: ON} |
[percent-zoom] | is an (integer, 5 to 5000) |