RASMOL Tutorial - Creating
and Running Scripts
Created by: Angela M. Amoia 08/14/03
Adapted from a lesson by: William R. Montfort 09/12/00
Last Updated/Modified by: Angela M. Amoia 08/30/04
Lesson Date: 09/15/04 - W
A Bit About RASMOL Scripts
What is a script? A script is a text file that contains
a number of RASMOL commands and allows a series of representations (views) to
be predefined and executed sequentially by RASMOL. (To clarify, a text file
is created using a text editor such as TextPad, wordpad or notepad, uses ascii
format and has the file extension '.txt'.) A script is usually created to illustrate
an interesting feature(s) of a protein. For our purposes, a script is highly
annotated and should act as a stand-alone lesson. It is useful to describe
each view you are showing (using the 'echo' command), just as a figure legend,
so the viewer can understand what you are trying to point out. The script as
a whole, should flow as if you are telling a story to your viewer. The user
should be able to walk away having learned something about the protein without
having the creator present to talk you through it.
Scripting Commands: We have seen several scripts in lecture
and you will prepare scripts for your class presentations. Some scripting commands
will be introduced through this tutorial however not all can be visited. For
a complete list and description of commands please refer to the RasMol Manual
(for version 2.6)
http://www.umass.edu/microbio/rasmol/distrib/rasman.htm
(Roger Sayle, Glaxo). A hard copy can be found in the computer lab in the class
binder. Please DO NOT REMOVE this from the lab. I will NOT REPLACE
IT!
Tips:
- PRACTICE! Writing scripts is fairly easy, however,
sometimes the scripting language can become a bit cumbersome. But remember,
the more scripts you write and the more mistakes you make, the more practice
you will get and the better you will become! Don't get frustrated! You can't
become an expert overnight!
- Print out a paper version of the scripts used in the
tutorials (I have done this for you already) in order to see how the commands
used relate to the display and annotations seen. I find this very helpful
and it is a good way to take notes.
- Write your scipts using a text editor (TextPad preferably,
wordpad or notepad can be used also). I suggest NOT using a program like Word.
However, if you do make sure you save it as text with line breaks.
- When first learning how to create your own script I suggest making it step
by step. By that I mean having a text editor open and immediately typing in
commands that you used to create a view that you like. By doing this you will
create a rough "master script" that contains all the views of interest.
Check periodically if it is working to your expectations by executing it in
RASMOL. This way you can pinpoint when a problem occurs before it becomes
to far long. Once you have the entire script the way you want it and know
it works by executing it in RasMol, you can go back and polish it up by adding
your detailed figure descriptions using the 'echo' command.
Tutorial Exercise
This exercise is designed to teach you how to create and run scripts using
the molecular graphics program RASMOL. If you have any questions, please ask!
Tutorial Exercise Objectives:
- Recall what a script is
- Run a pre-made script
- Create and run a SHORT novel script
Note: Next week in class (09/24/03) you will be asked to run your SHORT
novel script. In two weeks (10/01/03) you will turn in the beginning
of your RASMOL script for your project. In three weeks (10/08/03) you
will turn in a printout of your RASMOL script that recreates one of the detailed
figures in your cornerstone paper. For more details on these assignments, please
see the computer section packet.
PART I. Run a pre-made script. In this part, you will
run a pre-made script in RASMOL while having the script open in a text editor
(or the printed version beside you) to follow the predefined views and annotations
in order to begin learning how to make a script file. The protein to be used
is myoglobin (1MBN.pdb) and the script is called 'ras_intro.txt'.The steps for
this are:
- Obtain TextPad. TextPad is a text editor similar to wordpad or notepad.
It creates files using ascii format and files have the file extension '.txt'.
TextPad should already be downloaded on the lab computers. If you would like
to obtain a copy for your personal computer you can do the following: (1)
Go to the UA's CCIT (Center for Computing & Information Technology) website
(http://computing.arizona.edu);
(2) Click on 'Site-licencensed Software', then Shareware/Freeware, then 'shareware.com';
(3) Search "TextPad" (no quotes, capitalize, no spaces); (4) Click
'Download Now' and follow the directions. Note where the program was placed
so you can access it at a later time. You can make a shortcut on your desktop
if you would like (recommended). (C:\Program Files\TextPad4\txpeng462.exe)
- Obtain the PDB file '1MBN.pdb' and the script 'ras_intro.txt' and put
them into your Rasmol folder. (You should already have '1MBN.pdb' in your
folder). The script 'ras_intro.txt' can be found locally at
U:\shared\Read_Only\Rasmol or on
the course website under Computer Section/Shared PDB's and RASMOL Scripts.
Save the script as 'ras_intro.txt' (without quotes).
- Open 'ras_intro.txt' in TextPad (or a text editor such as notepad
or wordpad). (1) Double click on the TextPad icon on the desk top; (2) File,
Open, Navigate to 'ras_intro.txt'. If it doesn't appear right away, make sure
your file type is set to Text Document (*.txt);(3) Minimize the window. Note:
if you use Word (I don't suggest doing so), be sure to save the file as 'Text
with line breaks'.
- Start RASMOL (rw32b2a.exe) from your Rasmol folder.
- Type 'source ras_intro.txt' (without quotes) in the command window
to start the script. A wireframe of myoglobin and script commands should appear
in the display and command window respectively. Note: To run any script, simply
type 'source filename' where 'filename' refers to a script file.
- Maximize the text editor window or refer to the printed 'ras_intro.txt'
to follow along as you step through the script. This will give you an understanding
of how the commands are related to the display.
- Step through the different displays (paying attention to the annotation
in the command window) by hitting any key, and change the view with the mouse
at anytime; Press 'ctrl z' to exit at any time during the script.
PART II. Create and run a SHORT novel Script. In this part,
we will create a short script together using the protein NP4 (1KOI.pdb). NP4
is a nitric oxide (NO) transport protein. It is similar to myoglobin in respect
that it contains a heme cofactor that binds ligands. We will load the PDB file,
highlight one interesting feature of the protein, vaguely annotate with "echo"
comments, and use the "reset" and "pause" commands at least
once.
I have created three versions of this script in advance. I strongly
recommend you go back and practice at your own pace. You can find these on the
course website under Computer Section /Computer Section Weekly Handouts:
Version 1: 'ras_introscripts_np4raw.txt
'. This version contains the least amount of annotation and no side notes
describing the commands used. Its purpose is to illustrate the bare bones of
a script. Together we will recreate this script step-by-step from scratch. We
will go as far as we can and then you can finish at your will.
Version 2: 'ras_introscripts_np4notes.txt'.
This version contains fully annotated views (i.e. with detailed figure descriptions)
and side notes describing the commands used. Its purpose is to familiarize you
on how scripting commands relate to the display. This will be useful when going
back on your own. Note: THIS SCRIPT WILL NOT EXECUTE IN RASMOL! IT IS
A PAPER VERSION ONLY FOR LEARNING PURPOSES. YOU CAN EITHER PRINT IT OR HAVE
IT OPEN IN A TEXT EDITOR.
Version 3: 'ras_introscripts_np4.txt'.
This version contains fully annotated views (i.e. with detailed figure descriptions).
Its purpose is to illustrate how a script should be highly descriptive and thus
can act as a stand-alone lesson. The annotations (i.e. figure descriptions)
are detailed and the script flows as if telling a story to the viewer. Please
use this script as a "role model" for how your final project script
should look.
OK lets start:
- Obtain the PDB file '1KOI.pdb'. It can be found locally at
U:\instructor_deposit\Rasmol
or on the course website under Computer Section/Shared PDB's and
RASMOL Scripts. Save the pdb as '1KOI.pdb' (without quotes).
- Open a text editor (TextPad).
- Follow along. We will go as far as we can and then you can finish at your
own will by referring to the pre-prepared scripts above. If at any time you
become lost, either stop me of refer to Version 1: ras_introscripts_np4raw.txt
' which I handed out.
END OF TUTORIAL EXCERSIZE :)