Configuring your WWW browser for RasMol

The IMB Jena Image Library of Biological Macromolecules is containing links to RasMol scripts. RasMol is a viewer for 3-dimensional molecular structures and allows the user to rotate and translate a molecule as a 3-dimensional object. To take advantage of the RasMol scripts you need RasMol V2.7.2 or newer and you have to configurate your WWW browser to launch RasMol as a helper application. RasMol V2.7.2 is already installed for all Unix workstations within the IMB Jena.

Content of this page:

1. Configuring your WWW browser: The principle
2. A recipe for SGI workstation users
3. On WIntel PC
4. More about RasMol and chemical MIME types
5. Some basic RasMol commands
6. Why using the script rasmol for starting RasMol?
7. Why using the script rascript.bat for starting RasMol?

1. Configuring your WWW browser: The principle

This document makes use of the chemical MIME type chemical/x-ras. If you click on a link to a RasMol script or to a PDB file, then this file is served to your WWW browser together with an information about the MIME type of this file. Now it depends on your browser to start the appropriate helper program. The dependency between MIME types and helper applications is usually defined in the file $HOME/.mailcap. This is true for Netscape 4.7x. To configurate your Netscape 4.7x for RasMol as a helper application you just have to copy something like the following five entries into your $HOME/.mailcap file. Notice, that some servers are using different MIME types for the same type of data file.

   chemical/x-ras;xterm -e rasmol -script %s;\
	description="RasMol Script, Image Library"
   chemical/pdb;xterm -e rasmol -pdb %s;\
	description="PDB file, ExPASY Server"
   chemical/x-pdb;xterm -e rasmol -pdb %s;\
	description="PDB file, Birkbeck Server"
   chemical/x-xyz;xterm -e rasmol -xyz %s;\
	description="XYZ coordinate file"
   application/x-rasmol;xterm -e rasmol -script %s;\
	description="RasMol Script, Brookhaven Server"

2. A recipe for SGI workstation users

As I am working on a SGI workstation, the following recipe for configuring your Netscape 4.7x WWW browser is mostly intended for SGI Irix using the C-shell.

With other www browsers like Mozilla you need a script or batch file which calls rasmol with the the -script option for the MIME type chemical/x-ras.
e.g. rascript.csh

#!/bin/csh -f
rasmol -script $*
which may start the above rasmol start script with the -script parameter.
Mozilla
  • Preferences
  • Navigator
  • Helper Applications				 
    MIME Type:	chemical/x-ras			 
    Description:	RasMol Script, Image Library	 
    Extension:	RAZ				 
    o						 
    x Open it with	bin/rascript.csh		 
    o						 
    o						 

  • 3. On WIntel PC

    If you use RasMol V2.7.2 with Windows XP/2000 and a www browser (Mozilla, InternetExplorer, Opera) you need a batch file, as for Mozilla on SGI (see above) to start RasWin.EXE with the -script parameter. It looks like that M$ starts the aplication acording to the MIME type (chemical/x-ras) and gives rights to the application acording to the file extension. We choose an extension RAZ we found
    unoccupied.
    We suggest the following rascript.bat file:
    @rem This should work on XP or 2000 if you put it in the same folder with raswin.exe
    @set THISPGM=%~s0
    @set RASMOLPATH=%THISPGM:~0,-13%
    @set PATH=%RASMOLPATH%;%PATH%
    %RASMOLPATH%\raswin.exe -script %~s1
    
    this looks a bit complicated because you need to transform the path names to old M$DOS notation. RasWin.exe can't deal with e.g. blanks in path names.

    4. More about RasMol and chemical MIME types

    If you are using computers other than SGI you may find some usefull information about RasMol and how to configurate your WWW browser at the PDB RasMol
    Molecular Graphics - HELP or on the RasMol Installation Instructions. In Section 6 of Birkbeck colleg's course Principles of Protein Structure Using the Internet. Also the Eric Martz RasMol Home Page may be of interest. The Chemical MIME Home Page provide some general information about chemical MIME types.


    5. Some basic RasMol commands

    • A molecules is translated by moving the mouse pointer with the right mouse button pressed.
    • A molecule is rotated about the x and y axes by moving the mouse pointer with the left mouse button pressed.
    • A molecule is rotated about the z axes by moving the mouse pointer to right or the the left side and having the Shift key and the right mouse button pressed.
    • The size of a molecule is scaled by moving the mouse pointer up or down and having the Shift key and the left mouse button pressed.
    • The performance is drastically increased when the specular and shadow options are turned off.

    For a detailed description of all commands have a look at the RasMol manual or for short print out the RasMol 2.7.2.1 Quick Reference Card.


    6. Why using the script rasmol for starting RasMol?

    The shell script rasmol is intended for starting RasMol on SGI machines in the most comfortable way. Usually there are two windows on your monitor screen during a RasMol session, a command window and a viewer window. The command window is just the window of the command shell from which RasMol was started. But with rasmol a new command shell window is opened each time, RasMol is started. This window will run in background keeping your current command shell free for other work.

    When RasMol is started by a WWW browser, the first thing is to start xterm or a new shell window, and then to launch the rasmol executable from this new window. Exactly this is done by the script rasmol. The optional argument "-nofork" is only required if rasmol is started from Netscape 4.7x, because any helper application started by Netscape 4.7x must run in foreground.


    6. Why using the script rascript.bat for starting RasMol?

    The shell script rascript.bat or rascript.csh are intended starting the RasMol program using the -script option with Mozilla, InternetExplorer or Opera. Bacause I failed adding parameters to the program call within these browsers helper application configuration, the -script parameter is hidden in these batch files.
    On WIntel the RasWin command line window starts minimized, look for it on the task bar.


    Peter Slickers, 23-Oct-1996, @ltered jr 18-Sep-2003