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
- Login to the workstation
- Open a UNIX window (shell) by clicking on Desktop-Unix Shell with left
mouse button. A prompt should appear in the window.
- Move the cursor to the bar at the top of the window. Hold down the left mouse button and drag the mouse. The window
should move.
- Move the cursor to the corner of the window frame. Hold down the left mouse button and drag the mouse. The window
should change size.
- Move the cursor to the bar at the top of the window. Hold down the right mouse button
and drag the mouse to Minimize. The window is converted to an icon. Click on the icon with the
left mouse button. The window now reappears. Similarly, try the Maximize, Restore, Move,
and Size commands.
Also, try clicking on the symbols in the upper right hand corner of the window
to iconize (minimize) and maximize the window size.
- Open up 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
- 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.
- Type each of the following commands and observe the results:
- mkdir newdir1 (creates a directory named newdir1)
- mkdir newdir2 (creates a directory named newdir2)
- ls (to list the contents of the directory)
- ls -l (to display a long listing of the contents of the current directory)
- ls -al (to display a long listing of all contents of the current directory, including
files that start with the "." character)
- cd newdir1 (changes the present working directory to newdir1)
- pwd
- ls -al
- cd .. (changes back to the parent directory)
- pwd
- ls -al
- cd newdir2 (changes the present working directory to newdir2)
- pwd (confirm that you are in the newdir2 directory)
- cd ../newdir1 (changes the present working directory to newdir1 - i.e. up to parent
directory {..} then back down to newdir1)
- Create some simple text files in the directory newdir1:
jot newfile1
This starts the jot editor and creates a file named newfile1.
jot works like rudimentary common Mac or PC word processing programs.
Type a few lines (e.g., your favorite poem, pretein sequence, or political manifesto), save, and quit.
jot newfile1 (reopens the existing file).
Edit this file, save, and quit.
ls -al
Use jot to create 1 or 2 more
short text files in the newdir1 and newdir2 directories (use a unique name for each new file).
Practise using the multiwindowing capabilities of the SGI by
changing to one directory in one window and changing to different directories
in other windows.
Part 3: Telnet, ftp, and Netscape
Duration: ~10 to 15 minutes
- telnet is a networking tool that allows you to
use a local computer (the computer with the keyboard & monitor that you are
currently using) to access a remote computer (a second computer that does the compute processing
and send the results to the local computer). For example, if you are using pchem01 as your local computer, you
can 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.
Type telnet pchem## to telnet to a remote computer (where pchem## is
a different computer from your local computer).
Login, 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.
- ftp (file transfer protocol) is another networking
tool that allows you to transfer files between two computers. The two computers
must be connected to a network, and you must be able to login to both computers, but
the computers do NOT have to share any resources.
Type ftp pchem##, to ftp to/from a remote computer (where pchem## is
a different computer from your local computer). Login, then type the following commands:
- pwd (lists the present working directory on the computer that you ftp'ed TO)
- ls (displays the file list on the computer that you ftp'ed TO)
- cd newdir1 (changes the present working directory on the computer that you ftp'ed TO)
- pwd
- ls
- !pwd (lists the present working director of the computer that you ftp'ed FROM)
- !ls (displays the file list of the computer that you ftp'ed FROM)
- lcd newdir2 (changes the present working directory on the computer that you ftp'ed FROM)
- !ls (displays the file list of the computer that you ftp'ed FROM)
- put filename where filename is the name of a file on the computer that you ftp'ed FROM, listed by the last command. put transfers the file from the computer that you ftp'ed FROM to the computer that you ftp'ed TO.
- ls (lists the files on the conputer that you ftp'ed TO)
get filename where filename is the name of a file on the computer that you ftp'ed TO, listed by the last command. get transfers the file from the computer that you ftp'ed TO to the computer that you ftp'ed FROM.
- !ls (displays the file list of the computer that you ftp'ed FROM)
- quit
Verify that you have transferred a file from the newdir1 directory to the
newdir2 directory, and that you have transferred a file from the newdir2
directory to the newdir1 directory.
If you have time, see the ncftp web page.
- 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 started netscape).
This tutorial assumes a basic familiarity with netscape and the web.
Go to the following web site: http://www.molvis.indiana.edu/
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.
- Go to http://www.rcsb.org/pdb.
Choose SearchFields:
advanced search.
- 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.
- Fetch one of the entries that matches your seach request.
Only the first informational lines ("header") of the PDB file is displayed at this stage.
To obtain the entire text, click on Send Entire Text.
- Select File-Save As to save the PDB file in your directory.
Choose an appropriate directory and filename in the dialog box.
- Go to a separate UNIX window and check that the file is there. Use
the jot editor to examine the file's contents.
- Back in the Netscape window, go to the PDB homepage and select
About the PDB General
Information or WWW
User Guides.
This page is a lengthy guide that describes all the information
given in PDB files.
- With the PDB Documentation guide displayed in the Netscape window and your PDB file
displayed in your jot window, spend some time investigating the information in the PDB file. Try to
understand the general structure of the file and the relevance of the information.
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
See the
UNIX Command Quick List web guide. Practice the following commands (use the name of your PDB file in place of
filename:
- date
- who
- whoami
- df -k
- which netscape
- cat filename
- more filename
- head filename
- head -3 filename
- tail filename
- tail -3 filename
- wc -l filename
- wc -w filename
- wc -m filename
- grep REMARK filename
- sort filename
- cp filename filename2
- mv filename2 filename3
- rm filename3
- cp filename filename2
- compress filename2
- du -sk filename filename2.Z
- uncompress filename2.Z
- rm filename2
- rm newdir1 (the computer will display an error message)
- rm -r newdir1
- man rm
- du -sk
- ps -ef
- top (type q to stop the top program)
- osview (type to stop the osview program)
Read the notes about System Security.
Then type ls -al to view the security modes of your files.
See also the
Typing Shortcuts.
Part 6: Ending your UNIX Session
Duration: ~5 minutes
- Clean up your home directory: delete any files and directories
that you no longer need, using the rm command. You should get into the habit of doing this
at the end of each session.
- Type exit in each UNIX shell to close the shell.
- In the toolbox (in the top left corner of the screen), click on
Desktop and Log out. OR position the cursor in the background area of the screen,
Click & hold the right mouse button, and select Log Out. If you do NOT log out of a UNIX
system, other people can use your UNIX account. To ensure security, ALWAYS LOG OUT!
Back to | C687 Spring 1999 |
Courses & Instruction | MolViz
Home |
Send comments to chemvis@indiana.edu
Last updated: 01/23/2001