Essentials Overview (980215)

These are the essential commands that a user needs to know about in O. Here I introduce the most important commands, in the order you are likely to need to know about them. I also describe some other things that will help a new user get started.

 Getting started  how to start working after loading the distribution
 Pull-downs  explains the pull-down menu system
 Mouse, F keys, esc, ctrl  explains how to use the mouse, Function keys and 2 other special keys to control the program
 PDB  these are the standard input and output coordinate files to O, although the program can read other ones too (WAH, RD ....)
 Molecular line objects  generate various types of line objects from molecules in the program's database.
 Control  there are a large group of instructions that can be classified as control commands, e.g. Save, yes, no ....
 Customizing  the user's environment can be customized in a number of ways
 Using macros  macros greatly extend O's capabilities
 Contouring  the F(ast)m(ap) electron density real-time contouring and fitting commands
 Grab  the commands that allow you to move atoms around by pointing with the mouse.
 Flip 'n tor  another set of commands to rebuild a molecule
 Regularize  the commands that allow you to restore standard geometry, after introducing distortions.
 Skeletons  used to help trace a structure in an electron density map.
 Colouring  colour is used in lots of places in O; the interface, molecular objects, contoured density ....
 Protein databases  main-chain and side-chain databases are available for building protein molecule
 Trig. info.  provides tools to calculate various trignometric information(distances, angles, contacts, phi/psi, h-bonds....)
 Symmetry  generates crystallographic symmetry objects from a molecule
 Comparing molecules  commands to compare molecules and display the results of the comparison.
 Mutate  mutate a molecule, replace, insert, delete residues
 Sketch  make quality solid sketches
 Plot  generate a plot meta file for use with oplot
 Notes  make 3D notes to remind you what the density is telling you

 

Getting Started (040421, 980216)

Once the distribution has been ftp'ed from Uppsala, there should be a few directories that have been created on the home computer system. Two directories are absolute requirements, a third one is to be recomended. The installation must have a directory containing the program, normally called the o/bin directory. If the installation is to a DEC Unix workstation, for example, the user would create an alias to the most recent experimental version of the program, using something like

% alias axp_o /usr/people/o/bin/axp_sauron

where the person responsible for installing the program, has created a directory /usr/people/o/bin for holding the executables.

The installation must also have a directory containing some of the information that O works with, e.g. the files desribing the latest menu, databases etc. This directory is best reached when running O by using the Unix environment paramaters. If the directory is /usr/people/o/data/ this can be achieved by the following

% setenv ODAT /usr/people/o/data/

One usefull thing about this Unix command is that one can define more paths to this variable. For example, one could point to the local PDB, O macros .....

% setenv ODAT /usr/people/o/data/:/home/joe/o/macros/

and when running O, the program would check for the files in the relevent ditrectories.

If you leave out the final slash '/', O should add it for you. In 9.0.7, the slash is not added to the Lego_setup directories and files. This bug is fixed in the 9.0.9 release.

If you have a Linux workstation that supports quad-buffered stereo, or if you are using the GLUT linked version of the SG program, you may need a second environment variable if you plan to use stereo:

% setenv STEREO ON

Compaq XP1000/Powerstorm 350 systems (and the earlier systems with 60T graphics cards), there is no need for such a variable. If you want to use the mon-visual (to get the best mon-performance) you can force its use with

% setenv STEREO MONO

Now you are ready to start the program. If you do not have your own O file, you would just do the following, hitting <return> until a black 3D window appears

% axp_o

....

If the program issues a warning that some commands have been disabled, the user does not have access codes for the workstation. These are stored in the data directory, in the access.o file. If codes have not been issued, contact alwyn@xray.bmc.uu.se . If they have been issued, there is something wrong with the local access.o file which should be in the data directory.

The third directory contains examples. It is recommended the new user starts by working with these and some of the documentation provided elsewhere. Make yourself your own working directory, and copy all of the files from the example directory into yours. Then start by typing

% axp_o p2.o menu.o access.o

and hit a bunch of <returns>. This forces the reading of the local versions of the menu.o and access.o files are included to ensure that the most recent version of the menu is being used, as welll as the local version of the .access datablock. The order is important. Now you can do the introduction to O exercises.

O functions are activated by keywords, pull-down menus or macros containing a group of keywords. Most keywords take the form of sam_atom_in ,for example. This commands is activated if the user types sam_at_in or s_a_i or numerous other possibilities. What is typed must be sufficient to recognize the keyword. So typing just sam_atom would not be enough since there is also a command sam_atom_out. Many keywords require data input, and again O gives the user some flexibility in how to enter this information. If just the keyword is entered (either at the 3D window, or at the X-terminal window), the user will be prompted for the extra data. If the user knows what data is to be entered, it can be typed on the same line as the keyword. e.g.

O > s_a_i 1crn.pdb 1crn

will read in the coordinates of crambin and give the molecule the name 1crn.

Multiple keywords and /or data can be on the same line, e.g.

O > s_a_i 1crn.pdb 1crn mol 1crn ca ; end

is enough to read in crambin, make and display an object of just the CA atoms. The ';' in the above line indicates to the O-parser that the user would hit a <return> if prompted, and would be the equivalent of accepting the default (in this case a zone describing all the molecule). Special care must be taken with the input of text where buried spaces are allowed. Such input can be delimited by double quote characters (").

The parser recognizes 4 special characters, @, !, # and $. The '@' character before a keyword specifies a macro file of commands. All characters following a '!' on a line are treated as comments. The special character, '#', is mainly used in macros. The character string between a pair of #'s will be written to the terminal and be replaced by whatever is typed at the terminal. This allows macros to prompt for terminal input. A word starting with a $ is recognised as a symbol and will be expanded by the parser. For example, the macro draw_mol contains the following commands

% cat draw_mol

! macro to draw a sphere of atoms of user defined radius

mol $my_mol centre_atom a131 c1

spher #'Define sphere radius#'

end_object

It would be activated in O by typing

O > @draw_mol

and would make an object of all atoms within a sphere centred on a particualr atom of a particular residue (the radius defined by the user at run time) for the molecule defined by the symbol my_mol.

 

Getting started NT (000114)
Windows NT is a bit different from the Unix environment. Instead of using an alias, use the 'Shortcut' alternative. Use NT Explorer to list the files in the O bin diretory, highlight the exec file, use the right mouse button to select 'Creat shortcut'. This creates a 1 Kbyte file which is a shortcut of the NT binary, Now move this file into the directory where you want to work. Now right mouse click on the shortcut file and choose 'Properties'. This opens a little window, select the tab marked 'Shortcut'. This lists the 'Target' file name of the binary, and in the next line, the directory where you want the program to start. If you want to be able to use stereo (and your card supports stereo), you need to edit the 'Target' line to add the text -st to specify possible use of stereo. Edit the 'Start in:' line to specify where you want to work. Now all you do is double click on the shortcut and a little DOS window will appear. The user then types in it as usual. Quitting or stopping the program causes the window to dissapear.The only trouble with this approach are the hopeless cut and paste options available in a DOS window.

The NT version of O does not support the Unix setenv parameter. Therefore, create a text file that contains an O text datablock to specify where the O data directory is kept. If the user reads in this file, O will add on the directory information when specifying menu.o, startup.o, all.dat etc. Here is an example of what such a file could contain:

! reading file
.odat t 1 50
D:/Alwyn/o/data/
! done

Mouse and Function Keys in O 6.x, 7.x (000104)

The mouse right button when depressed, in the 3D window, controls the view. Moving the mouse rotates the picture in the direction of the motion. To rotate the view alround a vertical axis, slide the mouse to the right or left. To rotate around a horizontal axis, slide the mouse up or down.

Depressing the right and middle buttons at the same time, rotates the picture around the third axis, perpendicular to the scree. Moving the mouse down rotates the picture clockwise, and moving it up rotates it anti-clockwise.

The middle buton when depressed by itself, controls both zoom and clipping. Up down for zoom, and right-left for clipping.

The left key is used for identifying atoms and activating the windowing system.

The action of right and middle mouse buttons may, in some circumstances, be affected by depressing certain 'special' keys. For users who do not have dials, the mouse can be used with the Ctrl-key. In O, four dials are always assigned to control of the view. These are not matched to mouse equivalents, since something like them already exists. The other four dials are assigned on the fly to whatever commands may be active. The actual affect of turing a dial depends on which logical dial box has been assigned to the four dials. These can be changed by the Dial_last, Dial_next commands. The mappings to the four dials are

dial 5 - ctrl, right mouse horizontal motion

dial 6 - ctrl, right mouse vertical motion

dial 7 - ctrl, middle and right mouse vertical motion

dial 8 - ctrl, middle mouse vertical motion


The following function keys are used:

F1 - controls stereo on/off i if supported by the hardware.

F2 - controls text (menus, prompts etc) on/off

F3 - changes a line drawing mode. The default setting depends on which machine is being used. The program cycles through three different blending modes. When solids and lines are to be drawn, the mode has to be correctly set to get the correct 3D affect.

F4 - activates side-by-side stereo. Atoms can be identified with the pointer in either image

F11 - is only used on SG machines. Those with old versions of OpenGL must hit this key to get the correct 3D affect.

F12 - prints on the terminal window the present function key settings.


The keyboard <esc> key activates a macro on_escape. The macro that is distributed in the menu.o file quits the program without saving the contents of the user's database. The user can create his/her own macro, to disable thhis dratic response.


The first 8 logical dial inputs (controlling views, zoom etc) are available via mouse chortcuts, the others can be activated with the keyboard arrow keys. The up and down arrows move through the possible dial inputs (the current one is indicated on the lower left of the 3D window with '->' beside the text), while the left/right arrows change the dial settings.


The keyboard <ctrl> key is used in the Grab commands to apply rotations to the grabbed atoms. If the workstation has no dials, the user can use a mapping of the dial box via the ctrl-key and mouse button combinations. BUT ....

If the user moves the mouse outside the 3D window when ctrl is pressed, and then the key is released, and then the mouse moved back into the window, O thinks that the ctrl is still depressed and acts accordingly. Just press ctrl again, and release it.

PDB files (000104)

O can read or write a number of external coordinate formats.The only format that is widely used today is the Protein Data Bank format.Since O 7.0 there have been PDB_read and PDB_write commands, while previously external coordinates were read and written with sam_atom_in and _out. The newer commands are closer to the PDB definition, and can also read in X-PLOR or CNS files that contain SEGIDs.They should be used instead of the old commands.

O can read a number of external coordinate formats using the Sam_atom_in command. If the coordinates file type ends in .pdb , O will assume it is PDB format and then prompt for a 5 letter molecule name.The program saves various information that might be in the file, including cell constants, space group name etc. It does NOT store anisotropic temperature factors, nor does it handle multiple conformations cleverly. Files with unexpected endings are prompted for the coordinate type.

O supports writing out a number of different coordinate formats using the Sam_atom_out command. The user can write out just those that are selected, if he/she so wishes. The program decides on which format to write out by recognizing the file type. For PDB style coordinates the type should be .pdb If the type is not recognized, the program prompts for the file type.

More details are provided elsewhere.

PDB_read (000104)

This command more closely follows the PDB standard than does the sam_atom_in command. Alternate conformations result in mutiple molecules being produced. They are named with 'B' added to the user defined name if there is only one one extra conformation, 'C' if at least one residue has 3 conformations etc. The user is able to strip hydrogens as the coordinates are read. For CNS/X-PLOR users, the SEGIDs can be stored, becoming new residue properties. Note that if SEGIDs are used to encode alterante conformations, there can be residues appearing within a molecule that have the same name.

Here is an example of reading in a file where two residues have 3 different alternate atom locations

O> pdb_read
Util> PDB file : 2nlr.pdb
Util> O associated molecule name: 2nlr
Util> Remove hydrogens ? [y]/n :y
Util> Save CNS/XPLOR SEGIDs ? [y]/n :n
Util> EXPDTA X-RAY DIFFRACTION
Util> Molecule 2NLR contained 495 residues and 1966 atoms
Util> 1509 hydrogens were skipped
Util> Alternative conformations result in 3 molecules
Util> Now get the Aniso Us for this molecule
skipped Hs 1509
Util> Molecule 2NLRB contained 71 residues and 249 atoms
Util> 174 hydrogens were skipped
Util> Now get the Aniso Us for this molecule
skipped Hs 174
Util> Molecule 2NLRC contained 2 residues and 17 atoms
Util> 3 hydrogens were skipped
Util> Now get the Aniso Us for this molecule
skipped Hs 3

Three molecules have been created

Util> dir 2nlr*xyz
Heap> 2NLR_ATOM_XYZ R W 5898
Heap> 2NLRB_ATOM_XYZ R W 747
Heap> 2NLRC_ATOM_XYZ R W 51

The molecule 2NLRA contains all of the residues for which there is a second conformation (71 in this case), while 2NLRC contains all residues for which there are 3 conformations (only 2 residues). Note that the user has to take care in issuing names to molecules when there are multiple conformations. O molecule names are only 5 letters long, including any that might get added.

ANISOU cards are recognised.

PDB_write (000104)

PDB files can be created from a molecule (or molecules in the case of a structure with multiple conformations) in the O database.

If the structure originally had multiple conformations, they will be regenerated into a single file.SEGIDs and ANISOUs will also be written out if present.

O> pdb_write
Util> PDB file name: q.pdb
Util> What molecule [ ]: 2nlr
Util> Residue range [all molecule]:
Util> Define cell constants [ 65.96 65.96 88.74 90.00 90.00 120.00]:
Util> Write out only selected atoms? [No]:
Util> SEGIDs not present
Util> Contains alternate locations
Util> 3 molecules of alternates
Util> Aniso Us are present and will get written out
Util> Use the B-factor? [Yes]:
Util> Use the occupancy? [Yes]:
Util> 2232 atoms written out.

Using Macros

The usefullness of O can be greatly extended by the judicious use of macros. These are groups of instructions that may be freqently used. By putting them in a macro, just activating the macro starts processing the contents of the list.

The O line parser recognises a macro by the special character '@'. Macros can be in the computer's local file system or as part of the user's database. When the parser identifies a macro, it first tries to open it as part of the file system ,then as an entry in the user's database.

Consider the macro that is automatically activated when O starts. It has the name on_startup. If it is part of the file system it may look like this

% cat on_startup
window_open user_menu .8 .8
window_open object_menu -1.1 -0.1
fm_file ano1.map mir

 

If part of the user's database, it would be a text data-block entry as follow

@on_startup t 3 50
window_open user_menu .8 .8
window_open object_menu -1.1 -0.1
fm_file ano1.map mir

 

If the macro contains a wait_id command, processing of the macro will be stopped until the user identifies an atom