C687: Introduction to UNIX and PDB Files

The aim of this tutorial is to familiarize you with UNIX and to introduce you to Protein Databank (PDB) files.

Part 1: Login and Familiarization with UNIX Windows

Duration: 10 minutes
  1. Login to the workstation
  2. Open a UNIX window (shell) by clicking on Desktop-Unix Shell with left mouse button (LMB). A prompt should appear in the window.
  3. Move cursor to bar at top of window. Hold down LMB and drag. Window should move.
  4. Move coursor to corner of window frame. Hold down LMB and drag. Window should change size.
  5. Move cursor to bar at top of window. Hold down right mouse button (RMB) and drag to minimize. Window is converted to an icon. Click on icon with LMB. Window now reappears. Similarly, try the maximize and restore commands. Also try clicking on the symbols in the upper right hand corner of the window to minimize (iconize) and maximize.
  6. Open up two more windows. Practice moving them around, changing size, etc. until you are comfortable with these functions.

Part 2: Directories and Simple Text Files

Duration: 15 minutes
  1. Move the cursor into one of the windows. This is now the active window. Type pwd [note that you must also press after each command]. The name of the present working directory should be displayed. This should be your home directory.
  2. Type ls to list the directory contents. Probably nothing will appear because your directory is currently empty.
  3. Type each of the following commands and observe the results:
    mkdir newdir1 (creates a directory called newdir1)
    mkdir newdir2 (creates a directory called newdir2)
    mkdir newdir3 (creates a directory called newdir3)

    ls
    ls -l (to get long listing of contents of current directory)

    cd newdir1 (changes directory to newdir1)
    pwd
    ls

    cd .. (changes back to the parent directory)
    pwd
    ls

    cd newdir2 (changes directory to newdir2)
    pwd (to confirm you are in the right place)

    cd ../newdir1 (changes directory to newdir1 - i.e. up to parent directory then back down to newdir1)
  4. Now we will create some simple text files in the directory newdir1
    jot newfile1
    This starts up the zip editor and creates a file called newfile. jot works just like the common Mac or PC word processing programs. Type a few lines in, save and quit.

    jot newfile1 (should reopen the existing file and allow you to edit it). Edit the file slightly, save and quit.

    ls (you should see the new file)
    ls -l (displays more details)

    Use jot (or the zip editor which is similar) to create 1 or 2 more short text files in each of your three new directories (make sure each file has a unique name).

    Practise using the multiwindowing capabilities of the SGI by changing to one directory in one window and different directories in other windows.

  5. Go to the directory /ruser/instruct1/stone/C687/tutorials. Look at the contents of tutorial1. It is this file. In the future you will go to this directory to see the instructions for each tutorial rather than getting a hard copy.
  6. We will learn some more useful file manipulation commands below.

Part 3: Telnet and Netscape

Duration: ~10 to 15 minutes
  1. Telnet is a networking tool that allows you to work on one computer while you are sitting at another. e.g. If you are sitting at pchem01 you could telnet to pchem02 and login to that computer. All subsequent commands that you type will be interpreted by the CPU of pchem02. You will now be able to read and write data using any directory on a disk that is crossmounted on pchem02.

    Try telnetting to a pchem computer different from the one you are working at. e.g. telnet pchem03. Go through the login routine then determine which directory you are in. Make sure that you understand the difference between being logged in to a particular machine and using a directory on a particular disk. Note that you can use telnet to log into any computer in the world that is attached to the internet and on which you have an account. Terminate the telnet session by typing exit.

  2. Netscape is a World Wide Web browsing program.
    Initiate netscape by typing netscape or netscape& (the & allows you to continue working in the window from which you opened netscape). This tutorial assumes a basic familiarity with netscape and the web.
  3. Go to the following web site: http://www.uwsg.indiana.edu/uhelp/tutorials/quick.html. Choose the UNIX Command: A quick guide. Bookmark this site.

Part 4: PDB Files

Duration: 20 to 25 minutes

In this section you will go to the PDB web site, and learn how to find a PDB file and copy it to your own directory.

  1. Go to the following web site: http://www.rcsb.org/pdb
    Bookmark it. Choose Searching and Browsing the PDB/PDB's WWW Browser. Bookmark this.
  2. Use the browser to search for PDB files relevant to certain compounds. Try a few searches. Finally choose a small protein whose structure is known and search for it.
  3. Fetch one of the entries that matches your seach request. Only the top of the PDB file is displayed at this stage. To obtain the entire text click on Send Entire Text
  4. Now save the pdb file in your own directory by selecting File-Save As and giving an appropriate directory and filename in the dialog box.
  5. Go into a separate UNIX window and check that the file is there. Use the jot editor to check that it has been read across OK (check the last line to make sure transfer was complete).
  6. Back in the Netscape window, go back to the PDB homepage and choose PDB Documentation-PDB Contents Guide in html. Bookmark this. This page is a lengthy guide that describes all the information given in PDB files. Spend a few minutes familiarizing yourself with the format of this guide.
  7. Now with the PDB Contents Guide open in one window and your PDB file in another, spend some time going through the PDB file, trying to understand its general structure and what all the information means. Don't worry too much about the details of the experiments described in the header lines. Pay particular attention to the ATOM lines (giving the atom labels and coordinates) and also note the following sections.
    SEQRES
    HET
    Defined subsets (HELIX, SHEET, etc)
    HETATM
    CONNECT

Part 5: More UNIX Commands

Duration: 20 to 25 minutes
Below is a list of UNIX commands and symbols that are described in the UNIX Command Quick List web guide.

Typing shortcuts
.
..
*
!!
!
!$

File and Directory manipulation
cat
more
head
tail
cp
mv
rm
lpr (don't try printing very long files or non-text files - it's a waste of paper)
lpq (gives list of files in printer queue)
lprm (allows removal of a file from the printer queue)
du
du -sk
mkdir
rmdir

Go to the web site and browse through it for a few minutes.
With the web guide open in one window and several other UNIX windows open, go through the list, trying each command and ensuring that you understand what it does and how it works. It will be helpful to use the pwd, ls, and ls -l commands frequently to determine which directory you are in and to observe the contents of that directory.


Part 6: Setting up your Directory Structure

Duration: ~5 minutes
In this section you will create some directories that you will use in future parts of this course.
  1. Clean up your home directory by deleting any files and directories that you no longer need. You should get into the habit of doing this at the end of each session.
  2. Create a directory called "PDB". This is for PDB files that you need to use
  3. Create a directory called "Assts". This will be where you deposit your answers to the assignments.

Back to  |  C687 Summer 1997  |  Courses & Instruction  |  MolViz Home  |
Send comments to chemvis@indiana.edu
Last updated: 01/23/2001