Gale Rhodes
Department of Chemistry
University of Southern Maine
Portland, Maine 04104-9300
RasMol scripts allow you to keep complex views that might take too long to create on the fly in the classroom. But if you move them to a different directory or computer after you create them, they probably will not work. Here's how to modify your scripts so you can use them anywhere.
Open the script file in a word processor. To find the file in the "Open File" dialog of your word processor, you may have to ask the program to display all files, not just readable files. If you can't open the script in your word processor, you may have to change the file type. See the note about file types, below.
After you open the file, the first eight lines should look like this:
#!rasmol -script
# File: 1ldg1.spt
# Creator: RasMol Version 2.6
zap
background [0,0,0]
load pdb "Macintosh HD/Desktop Folder/Jane's Files/1LDG.pdb"
set ambient 60
set specular off
The reason this script is not portable is that darn load pdb command, because it includes the absolute or full address of the pdb file 1LDG.pdb. Edit this command to remove everything within the quotes except the exact name of the pdb file needed for running the script. After editing, the first eight lines should look like this:
#!rasmol -script
# File: 1LDG1.spt
# Creator: RasMol Version 2.6
zap
background [0,0,0]
load pdb "1LDG.pdb"
set ambient 60
set specular off
Notice the change in line 6.
Save the script as a text file. In the "Save File" dialog of your word processor, you can specify the format of the saved file. Choose "text" or "plain text" or "ASCII text."
Now your script is portable. To use it after moving it to another directory, disk, or computer, you must place three items, 1) the script, 2) the pdb file called for in the load pdb command, and 3) the RasMol program, all in the same folder or directory. To run the script (let's say its name is 1LDG#4.spt), start RasMol and on its Command Line, type this command:
script 1LDG#4.spt
and press return.
On Macintosh computers, if you restore the script file type and creator after editing (see below), you can simply double-click the script icon, or drag the script icon onto the RasMac icon to run the script.
If you want to show your class several scripts made from a large PDB file, loading the file for each script takes a long time. Edit the first script as instructed above. Edit the second and subsequent scripts by completely removing lines 4 and 6, the zap command and the load command. Zap removes the current file from memory. Without that command, and without a load command, RasMol carries out the script on the PDB file already in memory.
The first lines of the edited file should look like this:
#!rasmol -script
# File: 1LDG1.spt
# Creator: RasMol Version 2.6
background [0,0,0]
set ambient 60
set specular off
Word processor programs recognize readable files by information that is hidden from the computer user. Two bits of information, the file type and the file creator, determine whether a given program will open a given file. Some word processors (ClarisWorks, for instance) will not open a RasMol script file unless you change its file type and creator. To make these changes, so you can open a script file and edit it, you need a utility program like FileTyper. The FileTyper Home Page tells you how to get and use the program.
RasMol writes scripts with file type RSML and file creator RSML. Use FileTyper to change the file type to TEXT. Then almost any word processor will recognize and open it. After you edit the file and save it in text format, you will notice that its icon changes to match that of files from your word processor. Use FileTyper again to find out what new file type and creator your word processor assigned. Microsoft Word, for example, assigns file type/creator TEXT/MSWD; ClarisWorks assigns TEXT/BOBO. Use FileTyper to change type/creator back to RSML/RSML. The RasMol script icon will reappear, and RasMol will recognize the file as one of its own.
Back to Goodies List
Back to Biochemistry Resources