Structural Classification of Proteins
home mail help

RasMol script setup

Note: you are looking at a copy of RasMol script setup distributed with scop. For the latest information and updates see the rasmolscript home page here.

RasMol script news: 20th July 1996

Introduction

Transferring images of proteins over the network is very slow; and transferring Protein Data Bank (PDB) files with the coordinates is only slightly faster. A better solution is to send commands (a script) to a protein viewer program, delegating the responsibility for obtaining the required coordinates to the local system.

The script systems described here works exclusively with the (RasMol) protein viewer, since this program is available for the three major computer platforms: unix, macintosh and windows. A more general and versatile communication standard Annmm is under development.

The system is used in scop to specify protein domains and to highlight the results of sequence similarity searches, referred to as "visual sequence comparision" (VSC). With a correctly configured system clicking on any icon will cause the specified protein structure to be automatically displayed with relevant colouring in RasMol on your local machine. A poster gives examples of rasmolscripts in use on unix and macintosh systems.

Configuration

Getting the rasmolscript system to work does require some setting up to allow the communications between scop and RasMol to work trasparently. If you thing your system might have been configured already by someone else, first try the test scripts.

Requirements

The scripts here work only on X-based graphical unix workstations and terminals and Apple Macintosh. The basic requirements other than being connected to the internet are:

Unix
None (A copy of the PDB database on a local or NFS filesystem is useful, but no longer essential as scripts now include trasparent ftp access).
Macintosh
A machine fast enough to run RasMol (68040 or PowerPC) and with > 8M RAM (16M or 8M + RamDoubler) and Netscape 1.1N or later.
Windows 3.1 and Windows'95
So far no support for PC's exists, however it should be possible to extend this scheme to PC's, particularly those which have the PDB mounted locally (via nfs, for example) and we would be interested in hearing of any development along these lines. Alternatively consider the Chime interface where plug-ins for PC's already exist.

Obtaining RasMol

Obtain and install RasMol if you don't already have it (current version is 2.5, 2.6 is still beta but quite stable and recommended, although documentation is incomplete [6/96]).
The complete source code and user documentation may be obtained by anonymous FTP from ftp.dcs.ed.ac.uk [129.215.160.5] in the directory /pub/rasmol for 2.5 and /pub/rasmol/v2.6beta/ for 2.6

On unix systems you can check to see if it is installed already first by typing which rasmol.

Macintosh

A client program rmscript has been written for macinosh, which uses applescript to communicate with netscape and RasMol to transparently download PDB files and display them with appropriate highlighting. The installer will install all necessary files including the applescript runtime environment if required. Included with the installer is the same WWW documentation found here.

Note that this is beta software and that crashes will probably happen due to the combined instability of using it with Netscape, TCP/IP and interprocess communication, particularly with a modem, so save documents before you use it! Also, because applescript is slow and non-native on PowerPC, rmscript is very slow, although this should be acceptable since fetching PDB files from remote sites will be even slower.

Unix interfaces to RasMol

Two unix interfaces to RasMol are provided. For the first, very little setup is required, however each time an icon is clicked on a new RasMol window will be created, which will soon become annoying. The second interface requires the programming language tcl/tk to be installed first, which will most likely need to be done by your system manager.

Note that for either interface a copy of PDB on a local or NFS filesystem is required. An unix version of rmscript (the macintosh version of which contains transparent downloading of PDB files from ftp or http servers) is under development.

Installation steps common to both interfaces

  1. Ensure that the environment variable RASMOLPDBPATH defines the location of PDB files on your system. Check if it is defined with the command:
    printenv RASMOLPDBPATH
    If it is not defined, define it by adding a line to your .login file of the form:
    setenv RASMOLPDBPATH /nfs/ind1/pdb
  2. Ensure that the program rasmol is in your 'path' and is called 'rasmol'. Check this using the command:
    which rasmol
    If it is not found, but installed, you must add its location to your 'path' by adding a line to your .login file of the form:
    set path=($path /directory_of_rasmol )

Installation steps for basic interface

  1. Download and save the text file .mailcap.
    This file contains the mailcap entry for rasmolscript files. Look to see if you already have a .mailcap file in your home directory. If you do, you need to append the text to your existing file. If you don't, save as .mailcap in your home directory.
    For system managers: for netscape, the settings can be made global by saving this file as /usr/local/lib/netscape/mailcap or appending it to any existing file there.

  2. Download and save the script file rasmolscript.sh.
    This file should be saved somewhere in your 'path', i.e. a 'bin' directory as rasmolscript.sh.

    If you are unable to write files to any directory in your path, you need to create a 'bin' directory as follows:

    cd			# goto home directory
    mkdir bin		# make a private bin directory
    
    Now save the script file rasmolscript.sh to ~/bin/rasmolscript.sh and make it executable with the command:
    chmod +x ~/bin/rasmolscript.sh
    Having created a private 'bin' directory, you must add it to your 'path' by adding the following line to your .login:
    cd cat >> .login set path=(~/bin $path)
    Before the changes to .login become effective it is necessary to login again. After you have done this, the command:
    which rasmolscript.sh
    should return the location where you saved the script. If this works the tests below should now work.

    rasmolscript.sh assumes all PDB files on your system have names as supplied by Brookhaven, i.e. pdbxxxx.ent. Various institutes, for historical reasons use a different naming scheme, such as xxxx.brk. For this particular scheme you will need to edit rasmolscript.sh accordingly. The file gives some instructions on how to do this.

    rasmolscript.sh also supports transparent FTP transfer of any file not already in the directory pointed to by RASMOLPDBPATH. By default files are downloaded from the Brookhaven Protein Database Server (PDB) and cached in the /usr/tmp directory on your computer. If you want to change to either a nearer FTP site or change the directory (for example so it writes directly to update your PDB directory) you must edit the configuration settings in rasmolscript.sh.

Installation steps for advanced interface (tcl/tk)

Once you have got the standard link to RasMol working, you may be wish to try installing the following advanced interface.

The rmscop script simply makes it easier to use scop and RasMol together - it doesn't allow you to do anything you can't do currently with a little clicking and typing, so don't struggle with tcl/tk unless you think its really worth it. Thanks to Roger Sayle (author of RasMol) for suggesting the tcl/tk interface to RasMol.

The current version of rmscop has the following options:

To use rmscop however requires you have have tcl/tk installed on your computer. The rmscop is a wish script (wish is a tcl/tk shell). To discover if tcl/tk is installed on your computer, try typing:
which wish.
If wish is found then a kind system manager has been thoughtful enough to install tcl/tk on your system. In this case you can just download the script and away you go.

If wish can't be found you'll have to get tcl/tk installed first, which may require some effort depending on your system. Note that rmscop works with both tcl7.3/tk3.6 and tcl7.4/tk4.0 however only RasMol 2.6 will work with the latter. The tcl/tk packages can be found at any good ftp archieve site. Suggested anonymous FTP sites are: Europe: src.doc.ic.ac.uk/packages [146.169.43.1]; US: ftp.uu.net/languages/tcl/ [192.48.96.9]. For information about tcl/tk, see the FAQ.

The additional steps to installed this interface are therefore.

  1. Obtain and install tcl/tk.
  2. Download and save the text file .mailcap.
    This file contains the mailcap entry for rasmolscript files. Look to see if you already have a .mailcap file in your home directory. If you do, you need to append the text to your existing file. If you don't, save as .mailcap in your home directory. Note: that the definitions in this file are different to those in the file for the basic interface.
    For system managers: for netscape, the settings can be made global by saving this file as /usr/local/lib/netscape/mailcap or appending it to any existing file there.

  3. Download and save the script file rmscop.
    This file should be saved somewhere in your 'path', i.e. a 'bin' directory as rmscop.

    If you are unable to write files to any directory in your path, you need to create a 'bin' directory as described in the basic interface installation section.

    rmscop is supplied with similar defaults to rasmolscript.sh and can be edited to configure it for different PDB filenames and to transparently download files from different FTP sites. See here for details.

Notes for both Unix interfaces

How it works

The rasmolscript system has 3 elements:
  1. Embedded calls to rsgen.cgi in WWW page [server].
  2. Association of MIME typed text returned by rsgen.cgi with client program, rasmolscript.sh, rmscop or rmscript [client].
  3. Passing of RasMol commands in MIME typed text to RasMol program by client program, rasmolscript.sh, rmscop or rmscript [client].
It is very easy to embed rsgen.cgi calls in WWW documents to highlight conserved regions, active sites etc in PDB files. A tutorial on how to do this is in preparation.

The cgi program rsgen.cgi, on the server, expands the simple structural specifications passed to it into a complete list of RasMol commands and send this to the client with a MIME tag indicating it is destined for a rasmolscript client.

The HTTP protocol uses MIME information types. Normal text is the time type text/plain, and most documents served by HTTP are of type text/html. A gif image is of type image/gif. Generally all of this is invisible to users; the server automatically determines the type of the file and the client displays it appropriately (e.g., starting up a gif viewer to show gif images). The RasMol scripts are implemented by (1) adding an additional MIME type (application/x-rasmol) on the server, (2) having users add the MIME type to their local MIME file (~/.mailcap), and (3) adding a client program (rasmolscript.sh, rmscop or rmscript) to be run when a rasmolscript/x-rasmol document is received.

RasMol script tests

Use the following tests to see if RasMol is correctly configured to be used with scop on your system.

To display PDB entry 5pti using RasMol click here (note: an xterm will be created first followed by a RasMol window. This allows you to enter RasMol command line instructions). You should see the backbone of 5pti displayed with beta-strands colored yellow, helices colored magenta and loop regions colored white with a single spacefilling heteroatom (The heteroatom disappears if you click on 'backbone' in RasMol).

To display PDB entry 1tim, chain A, using RasMol click here. You should see chain A colored as above with chain B colored in violet.

Old RasMol script News:

31st May 1996

11th December 1995


Copyright © 1994 The scop authors / scop@www.bio.cam.ac.uk
$Date: 1996/07/20 14:16:33 $