Chem 110L: Macromolecular Visualization Laboratory Exercise: Unix


Previous Next

Unix: Your Work Environment

Computers that you will be using for this tutorial run the Unix operating system. This tutorial is not about learning Unix, especially because modern flavors of Unix, such as the freely available Linux, come with intuitive graphical user interfaces for most tasks. The Silicon Graphics computers in the Laboratory of Chemistry and Biochemistry are equipped with a less powerful graphical user interface, and tasks that you need to perform are best done using the program known as the Unix Shell. You can think of the Unix Shell as a command interpreter. The commands that you type in are typically the names of the programs that you want to execute, optionally followed by command modifiers (called flags), and names of files that you want to use with the program. There are four rules that you should remember about Unix Shells:

There are hundreds or thousands of programs installed on a typical Unix computer. You should not worry about knowing their names except for a few. The first set of commands deals with navigating the file system. Unix has a file system, which contains files organized similarly to Folders or Directories on a personal computer. You should know how to move around the file system, view files, edit files, and print files. The relevant commands are:

pwd print working directory Use this command to find out your current location. This is the first command to use when you do not see files that you are looking for
cd change directory Use this command to move around the directory tree. Typing this command without any arguments takes you to the course directory (/home/chem110L). If you are lost, you can always get back to your student directory by typing cd, hitting the Return key, and then typing cd 'PERM' where PERM is your student PERM number. Another handy command is cd .. which takes you up one level in the directory tree
ls list files Use this command to see files in the current directory. If you want to get detailed information about the file or just list the files in a column, use the -l flag as follows: ls -l

The second set of commands starts programs that manipulate your files. As in other computer systems, Unix files can be either text files or binary files. Examples of text files are the HTML page you are reading, a PDB file containing coordinates of a macromolecule, or a sequence file containing the amino acid sequence of a peptide. Examples of binary files are the GIF and JPEG images, the program netscape (or any other web browser), and the Chime plug-in that allows to view molecular structures in the web-browser. It is important to make a distinction between text and binary files so that you use appropriate tools to open each type of file. Three general purpose programs for working with files are:

jot view/edit text files Use this command to view or edit plain text files. It is a simple text editor with pull-down menus for SGI computers. On Linux systems, Kate, gedit, or jEdit allow editing of text files.
display view/edit text files Use this command to view or edit image files. It is a simple, yet powerful free image editor from the ImageMagick suite. You can access the menus from the side-bar that opens when you right-click on the image. You can use it to save images in another format but you cannot print directly from this program.
lp line printer Use this command to print text files (lp filename). You can also print some image files, such as PostScript files, but not others (GIF, JPEG). To print latter files, open them in the web browser and print from the browser.

Finally, there are many programs that perform various useful tasks. Some of the programs that you will be using in this tutorial are called netscape, sybyl, snapshot, and gunzip.

The Silicon Graphics computers that you will be using were specially designed for graphics work. However, rapid advances in computer technology have led to a situation where the available power of modern personal computers is sufficient to visualize and analyze structures of biomacromolecules. However, most standard video cards do not support stereographic visualization. More information about stereoscopic visualization is offered by Real D and NuVision.


Previous Next

Tutorial by Dr. Kalju Kahn, Department of Chemistry and Biochemistry, UC Santa Barbara. ©2003-2004