RasMol v 2.6/Chime 0.99 Manual (Chime features only)

This page was adapted from the original source, RasMol v2.6/Chime0.99 Manual, where the Chime features are combined with the rest of the RasMol Manual (150Kb).

This is a draft kindly provided  by Tim Maffett of MDLI containing the new commands in Chime 0.99 and later. All Chime-specific commands are in brown. The new commands (see below for details) are:

Wholly new commands:
  • Delay {seconds}
  • Loop {n}
  • Move ...
  • Set zoom center <boolean>
  • View show {user} | save {n} | restore {n} | set ...
Enhanced commands are:
  • load {<format>} <URL>
  • script <URL>
  • slab {+|-}<value>
  • translate center {center | all | <expression>}
Javascript function calls not yet documented
(see some examples in action).
  • MessageCallback
  • ButtonCallback
  • PauseCallback
  • AnimFrameCallback
  • PickCallback
  • immediate

Mouse Controls

Here is a summary of RasMol's mouse click-and-drag controls. The set mouse command mode defaults to set mouse rasmol, which gives the controls summarized below. However, there are also set mouse insight and set mouse quanta modes (not shown below).

( Mausaktionen)
Chime rule in BROWN if different than RasMol.

Action Windows Macintosh
Rotate X,Y Left Unmodified
Translate X,Y Right
Ctrl-Right
Command*
Rotate Z Shift-Right Shift-Command*
Zoom Shift-Left Shift
Slab Plane Ctrl-Left Ctrl
Chime's Menu Right Hold Down

*On some Macs, the Option (Alt) key has the same effect on RasMol as the Command key.


Command Reference

RasMol allows the execution of interactive commands typed at the "RasMol>" prompt in the command-line window (a window separate from the graphics window). Each command must be given on a separate line. Keywords are case insensitive and may be entered in either upper or lower case letters. All whitespace characters are ignored except to separate keywords and their arguments.

The commands/keywords currently recognized by RasMol are given below.
Commands found only in Chime are shown in brown

Backbone
Background
Cartoon
Center
Clipboard
Color
Connect
CPK
Define
Delay
Dots
Echo
Exit
HBonds
Help
Label

Load **
Loop
Move
Monitor
Pause
Print
Quit
Refresh
Renumber
Reset
Restrict
Ribbons
Rotate
Save
Script **
Select

Set **
Show
Slab **
Source
Spacefill
SSBonds
Stereo
Strands
Structure
Trace

Translate **
View
Wireframe
Write
Zap
Zoom

**Note: These commands have additional arguments that are supported by Chime that are not yet available in Rasmol. set picking, which allows the measurement of distances, angles and torsion angles among other things.


Delay

Syntax:  delay <number> 

The Chime delay command allows the user to delay the continuation of script execution for the specified number of seconds. Examples of valid # of second arguments are "10", "1.5", ".75", "20.5".

If the number of seconds is not specified then the script execution continues after 1 second.


Load

Syntax:  load {<format>} <filename>
         load {<format>} inline

         load {<format>} <URL>

Load a molecule coordinate file into RasMol2. Valid molecule file formats are: pdb (Brookhaven Protein Databank), mdl (Molecular Design Limited's MOL file format), alchemy (Tripos' Alchemy file format), mol2 (Tripos' Sybyl Mol2 file format), mopac (mopac file format; either cartesian or z-matrix format), nmrpdb (nmr multi-pdb file format), charmm (CHARMm file format) or xyz (MSC's XMol XYZ file format). If no file format is specified, pdb is assumed by default. Only a single molecule may be loaded at a time. To delete a molecule prior to loading another, use the RasMol zap command.

The load command selects all the atoms in the molecule, centers it on the screen and renders it as a CPK colored wireframe model. If the molecule contains no bonds (i.e. contains only alpha carbons), it is drawn as an alpha carbon backbone. If the file specifies less bonds than atoms, RasMol determines connectivity using the connect command.

The load inline command also allows Storing Atom Coordinates in Scripts to allow better integration with WWW browsers. A load command executed inside a script file may now specify the keyword inline instead of a conventional filename. This option specifies that the coordinates of the molecule to load are stored in the same file as the currently executing commands. Typically this is used in the command load pdb inline, which is followed by a number of RasMol commands terminated by the command exit. The exit command terminates execution of the current script and returns control to the command line (or the calling script). This means any lines following exit are never interpreted by RasMol. These may be used to store atomic coordinates in PDB file format. Because in Brookhaven PDB file format, any line not recognized by the parser should be ignored, only lines beginning ATOM, HETATM, TER, etc. are examined. Hence a file may be both a RasMol script and a PDB file simultaneously. This allows both coordinate and representation data to be transmitted as a single file. One possible use is a standard RasMol script prefix that may be concatenated with an appropriate PDB file on-the-fly.

   load {<format>} URL

Chime allows you to specify a complete or partial URL for the source location of the file. If nothing but the filename is specified, then the file will be searched for in the same directory on the server that the script file was retrieved from. If the server does not specify a valid MIME type for the file, then the format specified by the 'format' command will be used.

Examples of valid URLs:
mymol.pdb
../mymol.pdb
http://www.source.com/location/mymol.pdb

Loop

Syntax:  loop {<number>} 

The Chime loop command causes the script execution to begin again from the beginning of the script after the specified number of seconds. If a number is not specified the default delay before looping is 1 second.


Move

Syntax:  move {<number>}
         Xrot YRot ZRot Zoom XTrans YTrans ZTrans Slab TotalTime FPS MaxAccel 

The Chime move command allows the user to specify RELATIVE values for various view parameters, and Chime will 'animate' the structure in steps over 'TotalTime' to reach the targets implied by the relative arguments.
Each of the arg (Xrot through Slab) is the RELATIVE CHANGE over the entire move.
TotalTime is the 'target' total time for the entire animation.
FPS is the 'target' frames per second for the animation. If the machine cannot keep up, then the movement is accelerated, in integral steps, depending on how far behind it is (in order to keep up with the target times).
The MaxAccel argument is the maximum rate that you will allow the move to be accelerated on slow machines. MaxAccel default, the maximum amount you will allow the acceleration to go, is 5; and you may LEAVE THIS ARG OFF. The default FPS is 30; and you may also LEAVE THIS ARG OFF. All other args are required.
[observations from Eric Martz:]
  -Actual time will never be less than TotalTime.
  -Actual time will exceed TotalTime only when accel (>MaxAccel) is needed.
  -Actual FPS (aFPS) will never exceed target FPS (tFPS).
  -aFPS can be less than tFPS up to tFPS/aFPS=MaxAccel. Acceleration is an integral divisor for tFPS. Thus, the if MaxAccel=5 and tFPS=30, the largest jumps possible would be 30/5 = 6 = max aFPS.
  -The acceleration occurs at more than one point during the move. Thus, the first few frames can be at 30 FPS (hence small rotations), then it can drop to 15 FPS (twice as much rotation per frame, accel=2), then to 10 FPS (accel=3), then to 7 FPS (accel=4), then to 6 FPS (accel=5), but no lower if MaxAccel=5.


Script

Syntax:  script <filename>

         script <URL>

The RasMol script command reads a set of RasMol commands sequentially from a text file and executes them. This allows sequences of commonly used commands to be stored and performed by single command. A RasMol script file may contain a further script command up to a maximum "depth" of 10, allowing complicated sequences of actions to be executed. RasMol ignores all characters after the first '#' character on each line, allowing the scripts to be annotated. Script files are often also annotated using the RasMol echo command.

         script <URL>

Chime allows you to specify a complete or partial URL for the source location of the script file. If nothing but the filename is specified, then the script file will be searched for in the same directory on the server from which the coordinate file was retrieved. The server does NOT have to specify the 'application/x-spt' MIME type for the script file.

Examples of valid URLs:
myscript.spt
../myscript.scr
http://www.source.com/location/dna1.top

Slab

Syntax:  slab <boolean>
         slab <value>
         slab +<value>
         slab -<value>

The RasMol slab command enables, disables or positions the z-clipping plane of the molecule. The program only draws those portions of the molecule that are further from the viewer than the slabbing plane. Values range from zero at the very back of the molecule to 100, which is completely in front of the molecule. Intermediate values determine the percentage of the molecule to be drawn.

Chime allows you to place a '+' or a '-' in front of the slab value to specify a RELATIVE change in the slab value. For example 'slab +5' will add 5 to the current slab value.


Translate

Syntax:  translate <axis> {-} <value>

         translate center
         translate center center
         translate center all
         translate center {<expression>} 

The RasMol translate command moves the position of the centre of the molecule on the screen. The axis parameter specifies along which axis the molecule is to be moved and the integer parameter specifies the absolute position of the molecule centre from the middle of the screen. Permited values for the axis parameter are x, y, and z. Displacement values must be between -100 and 100, which correspond to moving the current molecule just off the screen. A positive x displacement moves the molecule to the right, and a positive y displacement moves the molecule down the screen. The pair of commands translate x 0 and translate y 0 centers the molecule on the screen.

Chime adds the additional arguments specified in brown above:
translate center
translate center center
Translates the 'center of rotation' (as specified by 'center' or 'set picking center' commands) to the center of the screen.
translate center all
Allows you to specify a 'translation center' to be the center of the molecule. The center of the molecule will be translated to the center of the screen.
translate center <expression>
Allows you to specify a set of atoms which will be defined as the new 'translation center'. The center of the specified atoms will be translated to the center of the screen.

See also "Set Zoom Center" for information on forcing the center of translation (or center of rotation if no center of translation is specifed) to be translated to the center of the screen after any zooming operations.


View

Syntax:  view save {0-15} 
         view restore {0-15}
         view show    [same as 'view show view']
         view show view
         view show user
         view set {<number>} ... {<number>}

The Chime view command allows you to easily save/restore specified views of the molecule. The orientation, translation, zoom, slabbing and center of rotation are saved/restored.

The 'view save [0-15]' command allows you to save the current view into one of 16 slots, numbered 0 through 15. If the slot number is omitted it is assumed to be 0.

The 'view restore [0-15]' command allows you to restore a view saved with 'view save .... Again, if the slot number is omitted it is assumed to be 0. If you restore from a slot that has not had a view saved to it the result is a 'reset'.

The 'view show' or 'view show view' command will output a 'view set .....' command that can be used directly to restore the current view using the 'view set ...' command.

The 'view show user' will output a list of rasmol commands that can be used to restore the current view. The result is the same as the equivalent 'view set' command, but more commands are required using standard rasmol commands.

The 'view set ...' command is intended to be generated by a 'view show' command.
view set Xrot Yrot Zrot zoom xtrans ytrans ztrans slab cenX cenY cenZ
Above are the arguments to the 'view set' command. Rotations are applied in the order Z, Y and then X.


Set Zoom

Syntax:  set zoom center <boolean>

The Chime set zoom center command enables (and disables) the use of automatic centering of the 'translation center' or 'center of rotation' while zooming. If no boolean is specified, then 'true' is assumed. See 'translate center' for more information. In Chime, this defaults to ON (TRUE) at startup.


Revision History