Back to TABLE OF CONTENTS  General Operations:  Part 1  Part 2
Scroll Bars
   The scroll bar across the bottom of the canvas area is used to rotate the molecule about the y-axis, i.e. to spin the nearest point on the molecule left or right; and the scroll bar to the right of the canvas rotates the molecule about the x-axis, i.e. the nearest point up or down. Each scroll bar has an 'indicator' to denote the relative orientation of the molecule, which is initially positioned in the centre of the scroll bar. These scroll bars may be operated in either of two ways. The first is by clicking any mouse button on the dotted scroll bar background to indicate a direct rotation relative to the current indicator position; the second is by clicking one of the arrows at either end of the scroll bar to rotate the molecule in fixed sized increments. Rotating the molecule by the second method may cause the indicators on the scroll bars to wrap around from one end of the bar to the other. A complete revolution is indicated by the indicator travelling the length of the scroll bar. The angle rotated by using the arrows depends upon the current size of the display window.
Picking
   In order to identify a particular atom or bond being displayed, RasMol allows the users to 'pick' objects on the screen. The mouse is used to position the cross-hair cursor over the appropriate item, and then any of the mouse buttons is depressed. Provided that the pointer is located close enough to a visible object, the program determines the identity of the nearest atom to the point identified.
   The program will display, in the terminal window, the atom's type, serial number, residue name and residue number. If the atom is a member of a named chain, the chain identifier is also displayed. Two examples of the output generated by selecting an atom are displayed below:
     Atom:  CA 349         Group:   SER  70
     Atom:  O    526        Hetero:  HOH 205    Chain:   P

   The first line describes the alpha carbon of the serine-70 amino acid in a protein. The unique Brookhaven serial number for this atom is 349. The following line describes the oxygen atom in a water molecule attached to the P chain of the main molecule. The word 'Hetero' distinguishes heterogenous molecules (such as cofactors) from the residues in the main molecule, noted by 'Group'. [These two 2 atoms are referred to by the two atom expressions 'SER70.CA' and 'HOH205:P.O', respectively, when using the RasMol commands select and restrict.]
   Clicking the mouse on an atom can be used not only to identify it, but also to find distances between two atoms (or to display a distance monitor), the bond angle defined by three atoms, the torsion angle defined by four atoms, to toggle labels on or off, or to specify the center of rotation . See the set picking command for details.
Dials Box
   If RasMol detects a 'dials box' attached to the user's workstation, it also allows the molecule to be manipulated interactively by the dials. Once RasMol starts up, it labels the LED displays above each dial, 'ROTATE X', 'ROTATE Y', 'ROTATE Z' and 'ZOOM' across the top row from left to right, and 'TRANS X', 'TRANS Y', 'TRANS Z' and 'SLAB' from left to right across the bottom row. Rotating any of the knobs will automatically transform and redisplay the molecule interactively. The dials only have effect while the mouse pointer is within the display window. If more than one application is using the dials box at a time, care must be taken to remember the dial labels assigned by each program, as each application may overwrite the dial-label LEDS.
   The rotation about the X and Y axes automatically updates the indicators on the appropriate scroll bars. All the rotation dials rotate the molecule 180 degrees for a complete revolution of the dial. All the remaining dials clamp their values to permissible ranges; turning these dials past their limits has no effect. The centre of rotation of the molecule may be changed using the center command on the command line, or the command set picking center followed by a mouse click.
   The 'ZOOM' dial allows the interactive zooming of the molecule between 10% and 200% of the original default magnification. Rotating the dial clockwise magnifies the molecule and anticlockwise shrinks it. A complete revolution of the dial corresponds to a 100% change in scale.
   The 'SLAB' dial, which is only effective when slabbing is enabled, allows the user to move the front z-clipping plane from the nearest point on the molecule to the furthest. A complete rotation of the SLAB dial corresponds to moving the clipping plane half the distance between the front and back of the molecule. Turning the SLAB knob clockwise moves the clipping plane closer to the viewer (increasing the number of objects displayed), and turning it anticlockwise moves it further away (preventing more objects from being displayed).
  Slabbing mode is enabled by typing the command slab on on the command line or toggling the slab option on the options menu.
   Translation along the X and Y axis allows the centre of the molecule to be moved within the canvas area of the screen. Rotation and zooming are still performed relative to the centre of rotation and the molecule respectively, which may often not be at the centre of the canvas. The TRANS Z dial currently has no effect.
Command Line Interface
   RasMol maintains a history of recently used commands, so that the user never needs to type the same commands repeatedly. Typing ^P (Control-P) on the command line will display the previous command in the history and ^N will display the following command. These commands may be edited using the features described below. Moving forward or backward through the command history undoes the modifications made to the current line. The number of commands retained in the history depends upon their length. RasMol can retain more short command lines and fewer long ones.
   Users with the Microsoft Windows version or the X windows version and with 'vt100' or compatible terminals (such as an 'xterm') can use the cursor control characters on the keyboard to abbreviate the control keys. The right and left cursor keys have the same affect as ^F and ^B, moving the cursor forward and back a single character respectively. Similarly, the up and down cursor keys have the same function as ^P and ^N, producing the previous and next entries in the command history respectively.
    Users with the Macintosh version can use the four 'arrow keys' to move up and down through previous command line entries; and back and forth within a single command line statement. Hitting 'return' or 'enter' at any time will result in the execution of the current, e.g. selected or edited, command line contents.
   RasMol allows basic editing of the command line. Pressing either backspace, delete or ^H (Control-H) will delete the previous character, and the key ^D may be used to delete the character under the cursor. Several characters may be used to move the cursor along the command line. The characters ^B, ^F, ^A and ^E move the cursor back a single character, forward a single character, to the beginning of the line and to the end of the line, respectively. When the cursor is not at the end of the command line, typed characters are inserted into the line and do not overwrite existing characters. After a command line has been edited, a newline or carriage return will enter the entire line, regardless of where the cursor is positioned. Because RasMol is unable to move the cursor up to the previous line, care must be taken when editing commands that wrap over several lines. In the event that another process overwrites or corrupts the command line, the character ^L may be used to redisplay the line on the screen.
Dimensions within RasMol
   All dimensions in RasMol, such as radii and distances, may be specified in either 'RasMol units' or Angstroms (Å). The RasMol units were first introduced to allow reasonably sized values to be specified for most of the operations performed in RasMol. A single RasMol unit 1 corresponds to 1/250thÅ of an Angstrom; therefore the most frequently used values are in the hundreds 100's. For this reason, if RasMol is given a distance parameter that does not contain a decimal point, it is assumed to be in RasMol units. For example, the command 'spacefill 300' specifies a sphere radius of 300RasMol units, or 1.2 Å.
   However, dimensions within RasMol can also be specified in Angstroms by placing a decimal point in the number. For example, 'spacefill 1.2' specifies a sphere radius of 1.2 Å. This is particularly useful for the cut-off distance parameter in within expressions.





Start-up Initialization Files
   Each time RasMol is started, it searches for an initialization file of commands to run before the command prompt is presented to the user. The file is called .rasmolrc on UNIX systems, and RASMOL.INI on VMS and Microsoft Windows Systems. the format and execution of this file is identical to that of the RasMol script command.
   RasMol first looks for the initialization file in the current directory, and if it is not found will look for it in the user's home directory. On all systems the environment variable HOME may be used to name the user's home appropriate directory. If no personal initialization file is found the program looks for the file rasmolrc (or RASMOLRC) in the RasMol system directory pointed to by the environment variable RASMOLPATH. This directory should also contain the on-line help file rasmol.hlp. On UNIX systems RASMOLPATH is typically set to be '/usr/local/lib/rasmol'.
   Unlike the command 'script ".rasmolrc"', the program will not generate an error message if the file is not found. The system rasmolrc file is commonly used by system managers to display information about the local installation and who to contact for help contain RasMol echo commands detailing a telephone number or e-mail address to be used for contacting.
Inter-Process Communication
   RasMol supports Inter Process Communication (IPC) in one form or another on all platforms. Under Microsoft Windows, IPC is implemented using Dynamic Data Exchange (DDE), on the MacIntosh IPC is implemented using Apple Events and on X Windows systems IPC is implemented using John Ousterhaut's Tcl/Tk communication protocol.
   When RasMol starts up on an X window system it registers itself with the X window Server as a Tcl interpreter. From within a Tcl application such as 'wish', you can use the Tcl command 'winfo interps' to determine the currently register interpreters on that display. The first instance of RasMol registers itself as 'rasmol', the second as 'rasmol2', the third as 'rasmol #3' and so on. The Tcl interpreter can easily send a command to rasmol using the built-in 'send' command. RasMol interprets the string parameter to the send command not as a Tcl function to execute but as a RasMol command. Hence, typing 'send {rasmol} {background red}' into the wish interpreter will cause RasMol's display window to change colour. Using the same encoding as Microsoft's DDE Execute protocol, multiple commands may be sent in a single 'send' by placing the consecutive commands in square brackets. RasMol will execute all of the commands in a 'send' before refreshing the screen.
   Under Microsoft Windows, RasMol supports a complete DDE protocol. The simplest layers of the protocol may be accessed by sending a DDE Execute command to application 'RasWin' and any topic. This will start a DDE conversation with the most recently launched instance of RasMol. Although any topic name can be used, the use of 'System' and/or 'RemoteControl' are recommended. Once again the contents of the execute package consists of a string for RasMol to execute. If the first non-whitespace character is an open bracket, the string is interpreted to be a sequence of consecutive commands enclosed in square brackets; otherwise the string consists of just a single command. Commands in square brackets may optionally be separated by whitespace and/or semi- colons. RasMol can also act as a 'data server' supporting hot, cold and warm links. Currently supported DDE items include 'Name', 'Image', 'Pick', 'Count' which denotes the Molecule name, the currently displayed image (in Microsoft DIB format), the atom expression of the last picked atom (or an empty string) and the number of selected atoms respectively. Using a hot or warm link on the 'Pick' item for example, allows an application such as Microsoft Word, Excel or Visual Basic to respond each time the user clicks on an atom in RasMol.
   RasMol on the Apple Macintosh supports AppleEvents. Currently the only supported AppleEvents are the four 'core' events, Open Application, Open Document, Print Document and Quit. However, because OpenDocument determines its actions by the file's type signature this can be used to implement generic IPC. Because RasMol for the Macintosh treats all files of type 'RSML' as scripts, the sending application need only place all the commands to be executed in a temporary file, set the type of the file to 'RSML' and then send RasMol an OpenDocument AppleEvent with the file as parameter.
Back to TABLE OF CONTENTS  General Operations:  Part 1  Part 2