Introduction to O

O is a macromolecular crystallographic modeling tool. It can be used to look at macromolecular structures, analyze them, compare them, modify them and to build them from scratch.

In these "Introduction to O" worksheets you will learn to start up O, read, display and analyze coordinates, and how to compare structures with one another. The worksheets first introduce you to new commands in O, followed by exercises which allow you to practice what you have learnt. As with any program, the best way to learn how to use it is to use it. The first worksheet guides you through how to start the program from scratch through to how to display a set of coordinates. It is worth spending some time getting used to the 'feel' of the program at this stage. Later worksheets will assume that you are comfortable with the basics, and are intended to be a little more challenging.

It is also useful to have a browser running in a separate window for access to an online version of ‘A-Z of O’, an online description of all O commands.

http://xray.bmc.uu.se/alwyn/A-Z_of_O/A-Z_frameset.html

Also, you have access to protein coordinates held at the PDB, either at Rutgers University, USA

http://www.rcsb.org/pdb/

or at the EBI, Cambridge, UK

http://www.ebi.ac.uk/

Work through the exercises in the worksheets, and above all, don't get stuck. If you have any questions - ask someone!

1. Getting started

1.1 Running O

After logging on to the workstation, you need to set up a few things by typing

% source /home/alwyn/setup_o

This file contains al Unix alias to the program, and sets the environment variable ODAT to describe where the data that needs is kept. If you do not have this file, something like this would be appropriate:

setenv ODAT /Users/alwyn/o/data/
alias ono /Users/alwyn/o/bin/osx_ono

You then need to make a directory where you plan to work. For example, the following commands

% mkdir o_intro

% cd o_intro

will prepare you for the exercise. To start O, type the following command:

% ono

You will be prompted to "define an O file". Once you have been working with O, you will save all of your work in a file. Subsequently, you would be able to read this information into the program when it starts. You do not have such a file yet, so hit <return>

O prompts for any information that it needs. At each prompt, just press return. All the information that O requires is stored internally as 'datablocks', including all the commands keywords that you can use. The file menu.odb in the /Users/alwyn/o/data directory, for example, contains O database entries that define these commands. Pressing <return> should read the file. The program issues 3 more prompts; just press <return> for each one. Finally you will open a black window that will be your entry to the 3D world of O.

 You should see something like this on the screen:

O > Mono enabled only
O > Gamepad disabled
O > Use of this program, implies acceptance of the present
O > set of conditions of use.
O > Contact alwyn@xray.bmc.uu.se if in doubt.
O > O version 9.0.7 , Build 040316
O > Define an O file (terminate with blank):
O > Menu names are not defined.
O > Enter file name [/Users/alwyn/o/data/menu.odb]:
O > menu.odb file for O version 9.0 build 040127
O > Startup file was never loaded
O > Enter file name [/Users/alwyn/o/data/startup.odb]:
O > startup.odb file for O version 7 and later
O > $Id: startup.odb,v 1.1 1999/11/20 12:06:44 morten Exp $
O > Stereochemistry file was never loaded
O > Enter file name [/Users/alwyn/o/data/stereo_chem.odb]:
O > stereochemistry amino acids and nucleic acids, Date: 031216
O > read ok
O > Connectivity used is : all
O > Maximum linkage distance = 2.00
O > There were 47 residues.
O > 329 atoms.
O > ODAT : /Users/alwyn/o/data/
O > Making visibility data structures.
O > Making visibility data structures.
As4> ......No message from the O administrator........

 

1.2 The O 3D window

When you first start O you will get a black window with some text. In the bottom left-hand corner in magenta there is a description of what the dials on the dialbox do (if you have dials attached). The dials allow you to rotate/translate, zoom and slab the view of the objects you are looking at. Instead of dials, you can also use the mouse to control much of what you want to do. O has been set up on the workstations so that two of the pulldown menus are already opened on the screen for you.

 

1.2.1 Pull down menus

At the top of the screen are some lines of text, the function of which will become apparent later. In addition there is a set of pull-down menus (in magenta). To see what is in a menu, click on one of the menu titles with the left mouse button. A list will appear below the title. Sometimes an item in this list will generate another window or list. In the menu 'Menus' (far right), each of the items in the list will generate another menu. To control which 3D objects are visible, for example, do the following:

- Click on the 'Menus' menu title

- Drag the mouse down to, or click on the "Objects" menu item

- A box will appear with a list of the current 3D objects. Click on the red square at the top left

- The red squares turn green. Click on the right-hand green square and drag the

menu to wherever is most convenient on the screen

- To close the menu box, click on the left-hand green square

To begin with, there are no 3D objects so the little window is almost empty

 

1.3 Saving what you have done

It is always a good idea to save what you have done so far as you work, just in case something goes wrong. The first time that you save your database, go to the terminal window from which you started the program and type ‘save’. You will be prompted to define a file name (default is 'binary.o'), so type something like ‘intro.o’. Afterwards, O will know where you want to save things and then you can do it in one of three ways:

- Click on 'Save' in the 'Controls' menu

- Type 'save' in the O window - the text you type appears on one of the text rows

at the top of the window

- Type 'save' in the window from which you started O

 

When you want to stop using O, you can do this in three ways:

- Click on 'Stop' in the 'Controls' menu, any changes are saved to your database

- Click on 'Quit' in the 'Controls' menu, any changes are not saved

- Hit the <esc> key. This activates a macro in your database called @on_escape that is set up to issue a ‘Quit’ command.

 

1.4 Reading in coordinates

Protein coordinates are normally stored in the PDB file format. Copy the coordinate set 1hel.pdb into your working directory. Get them from the Internet or elsewhere. Be carefull when writing files into the Unix file system since they might get capitalized. Work with lower case file names.

In order to be able to view a molecule, you must read the coordinates into O. This is done using the 'PDB_read' command. O commands can be abbreviated as long as the abbreviation is unique to the full command. In this case 'pd_r' is a valid abbreviation (try typing something shorter, ‘p_z’)

- Type 'pdb_r'

- You are prompted for the name of a file. Let us look at lysozyme, as an example.

- Type '1hel.pdb'

- You are prompted for an associated molecule name. O uses this name identify which molecule you are working with. For now call it '1hel'.

- Take the defaults for everything else, so just hit <return>

 

The coordinates for lysozyme have now been stored as datablocks within O.

- Type 'dir *1hel*'

In the window from which you started O you will see a list of the datablocks in memory which are storing the information from the PDB file.

- Type 'sam_list_seq 1hel'

Now you get a listing of the sequence of lysozyme.

Look up these commands in the ‘Essential O’ using your browser.

To delete the molecule from the database, you could type 'db_kill *1hel*'. Be careful when using 'db_kill' not to delete essential datablocks, otherwise you may need to start again from your latest saved database. Sometimes it may be necessary to remove datablocks from the databse as it can get filled up. Removing old molecules, which you are no longer using, is a good way of making more space. The 'dir' command gives you a list of the datablocks that you have in the database.

 

1.5 Displaying coordinates

In order to see a molecule you have to draw an object. To draw a Ca trace of the lysozyme molecule do the following:

- Click on the 'Molecule' item in the Display menu. Check that the right molecule

is selected (in this case you should have only one, 1hel, available).

- Click on the 'Ca atoms' item in the Display menu. This should draw the Ca trace. If you still see nothing, don't panic - yet!

If you can see nothing, then it is probably because the molecule has not been drawn at the centre of your viewing area. When O is first started, the centre of the screen is at XYZ-coordinate (0.0, 0.0, 0.0). In order to centre on the molecule type the following:

ce_at 1hel 57

This centres on residue 57 in molecule 1hel, by default at the Ca atom. Once you have the molecule in view you can centre on other atoms using the 'centre_id' command (or the 'Centre on atom' item in the Controls menu).

- Identify an atom.

A text line at the top of the O window gives information about the last atom you have clicked on: the name of the molecule, residue, atom name, XYZ coordinate, B-factor and atomic number.

 

The object can be toggled on and off using the 'Objects' menu under the 'Menus' menu.

- Turn the Ca trace of lysozyme off then on again

 

1.6 Controlling the view

Dials

If you have them, dials are a comfortable way of interacting with O. The text at the bottom left corner of the screen describes which dial does what. Rot X, Rot Y and Rot Z rotate the view around the X (horizontal across the screen), Y (vertical down the screen) and Z (into the screen) axes. Trans X, Trans Y and Trans Z translate the view along the X, Y and Z axes. Zoom brings the view closer/further. Slab controls how thick a slice you are looking at. If you have a lot of information it is often convenient to 'slab down' such that there is less on the screen and use the Rot dials to search in the Z direction.

- Play with the dials for a while until you get the hang of which dial does what.

Mouse

The mouse is also used for 'picking' nut can be used to simulate some of the dials. 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

Keyboard Input when pointer in 3D window

The following function keys are used:

F1 - controls stereo on/off 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.odb 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.

The vertical arrow keys change which dial input are mapped by the horizontal pair. The currently active input is indicated by a ‘->’ in the lower left dial allocation window. This is not a very intuitive way of changing the view for example, but is useful with some commands.

 

Fake Dials

One window attempts to fake dial use. Look under the pulldown Menu/Fake_dials

- Bring up the Fake Dials menu box (as described above), and move it to somewhere accessible in the O window.

The dials can be simulated by pressing the left-hand mouse button on the 'fake dial' (the menu item) and moving the pointer left or right. You can also select which fake-dial you want to change, and then use the left/right arrow keys on the keyboard. As new functions are activated (for example when you are using some of the building commands), the fake dials box will be updated.

- Experiment with the fake dials.

When just looking a molecule, the fake dials are not very intuitive, and most people will find it easiest to use the mouse to control the view. When you start activating commands that need interactive input, you will probably prefer to use dials. If you do not have any dials, it is often easier to use the keyboard arrow keys, but for some commands, the Fake dials come in useful.

 

1.7 Clear_flags

An important command to know about is the clear_flags command. Sometimes you may activate a command that is waiting for you to do something. Usually these commands can be cleared using clear_flags (also under the controls menu). If this does not work, O may be waiting for you to identify an atom or to input information. If O is behaving strangely then check to see if you have any commands active, and try clear_flags, clicking on an atom or typing a few returns to clear the command.

 

Exercise

- Centre on a piece of a-helix, then try to produce a view where you are looking directly down the helix axis

- Now find a section of b-strand. Produce a view where you can see the pleated nature of the strand. Notice how the side-chains alternate in the way they go up and down.

 

2. Displaying molecules

2.1 Spheres

You have already seen how to display the Ca trace for a molecule. It is also important to be able to see all the atoms (main-chain and side-chain). This can be done in several ways. The simplest of these is a sphere, where all the atoms within a given radius are drawn.

- Centre on an atom somewhere in one of the molecules

- Make sure that molecule is 'current' in the Display menu

- Click on the 'Sphere atoms' item in the Display menu

You should see some atoms appear. The default radius is 0.0 Å, however, so only one residue is likely to be drawn.

- Type 'sphere'. You will be prompted for a radius of the sphere

- Change the radius to 10 and click on 'Sphere atoms' again

You should now see a large sphere of atoms appear.

- Click on the 'Sphere ID' item in the Display menu

- Click on an atom which doesn't have any side-chain displayed. The centre of the screen will moce to the atonm you identified and then a new object will be created

Now you should see a second sphere of atoms appear.

Type the following (remember you can abbreviate commands):

molecule 1hel
object lyso
ce_at 1hel 57 cd
sphere 15
end_object

A new object called 'lyso' is created. This object is a sphere of radius 15 Å centred on the 'CD' (C-delta) atom of residue Gln 57. This is a way of explicitly drawing and naming objects. Note that the object is not drawn until the end_object command is given. This means that you can give more than one drawing instruction when creating an object.

Click on the 'Delete object' item in the Display menu. Click on the object called 'lyso'. The last sphere of atoms should be deleted from the screen and from the Objects menu. This is the most convenient way of removing objects from the screen. The more objects that are displayed, the slower O will run, so it is a good idea to delete or turn off objects which you are not currently using. The typed command 'delete_object' does the same - look it up in the manual.

 

2.2 Zones

Zones are a way of drawing stretches of the sequence. For example to draw the first alpha helix of lysozyme try:

molecule 1hel
object helix
zone 5 15
end_object

The zone command has drawn residues 5 to 15 of molecule 1hel, creating an object called ‘helix’.

- Delete the helix object.

You can also draw a zone of Ca trace, using the command 'ca_zone' instead of 'zone'.

- Draw the helix object again, but this time, draw just the Ca trace of the helix.

 

3. Painting molecules and objects

3.1 The paint menu

Look at ‘Essential O ‘ for more details (‘Pull downs’/’Display paint’).

Often it can be convenient to paint objects in different colours - using colours as labels for different parts of the molecule. This can be easily done using the ‘Paint mol.’ menu. This is found under the ‘Display’ menu. The first few items in the menu act on molecules, and it is necessary to redraw the molecule again after using them. The last three commands act on objects and require you to identify parts of existing drawn objects to colour.

Select the lysozyme molecule in the Display menu. Click on the ‘Paint red -> blue’ menu item and then redraw the Ca trace. This command paints the chain from red (at the N-terminus) to blue (at the C-terminus).

The molecular datasets that you have contain a parameter called the atomic temperature factor, also called the B-value. It is an indicator of atomic motion if the structure has been properly refined at a suitably high resolution. Now try painting lysozyme by B value and redraw the molecule, both as Ca and the whole molecule. The colour ramping results in regions with high B factors drawn in red and regions with lower B factors are drawn in blue. Look at the Ca trace, and you will see that it is mostly blue, with some loops looking a little yellow. If you now look at the whole molecule, you will realize that most of the molecule has low B-values, but there are some exceptions. In particular, try to find the tryptophans. Not all of them are in the hydrophobic core and the more external ones are a bit more floppy.

The real atom colours can be remade by using the ‘Paint by atom’ menu command.You will need to remake the objects before you see the affect of changing the colours.

The ‘paint object’, ‘paint object zone’ and ‘paint object atom’ commands work on objects. Click on the ‘red’ menu item. This selects the colour red for the next paint command. Try ‘paint object’ and click on one of your drawn objects. Try painting it green. To get the original colours back you need to use ‘Paint by atom’ and then redraw the object.

Identify an a-helix in lysozyme. Use the ‘Paint object zone’ to paint the helix in a different colour.

Individual atoms can be painted using the ‘Paint object atom’ menu item.

 

3.2 The paint commands

The paint menu pulldown is a shortcut for the paint commands. Look these up in the O manual. For example the paint_colour command allows you to choose a colour for your next paint command (like clicking on the colour names in the menu outlined above!). Typing ‘paint_colour ?’ will give you a list of the colours which you can use. Colour names cannot be abbreviated like commands!

The paint commands can be used much like the menu paint commands - and you can also specify zones directly (by typing residue names directly after the command) instead of clicking on the objects.

 

3.3 Drawing a cartoon

A 'cartoon' in this case is not Donald Duck but a sketch drawing of a molecule, often showing a-helices, b-strands and loop regions. O provides a 'quick' way of generating such cartoons. First, you need to generate datablocks that contain which regions are a-helix, and which regions are b-strand. This is done using the 'yasspa' command, and needs to be run twice, once for each secondary structure element. To draw a cartoon of lysozyme:

- Type 'yasspa'

- You are prompted for the molecule name. If it is correct, just press return,

otherwise type the name of the molecule.

- The next prompt is for the secondary structure element template. Type 'alpha' (or just press return).

- Now you are prompted for a cutoff value. This is a measure of the tolerance within which a part of the sequence can look like a helix (ie. the larger the value, the more of the sequence may resemble an alpha helix). Use the default value for now (just press return).

This procedure generates a datablock defining which parts of the sequence are alpha-helical.

- Run yasspa again to generate a datablock for b-strands, using ‘beta’ to define the secondary structure element. Use a cut-off of 0.7 Å

Now the necessary datablocks have been generated, you can generate a cartoon of the protein molecule.

Click on the Display menu then activate the ‘Sketch mol.’ menu. Click on ‘Cartoon 2ry colours’ and O will draw a sketch of the molecule. This is a menu version of the command ‘sketch_auto’. Look it up in the manual if you want more information. Other commands in this menu allow you to draw CPK representations of objects, as well as ball and stick objects.

Exercise

Find a structure at the PDB that binds retinol. Draw a cartoon of the protein with a red to blue colouring scheme. Draw the retinol as a ball and stick object that is coloured orange.

 

4. Measuring things

O can be used for measuring distances, bond angles, main chain conformation (phi & psi angles) etc. This can be useful when examining structures and when comparing different structures. Look under 'The Trig commands' in the O manual. For example, the command dist_define allows you to measure the distance between two atoms (by first clicking on one and then on another).

These commands are also available in a menu under the ‘Rebuild’ menu.

Exercise

- Measure the distance between the atoms Glu 35 OE1 and Asp 52 OD2 of lysozyme. (The key catalytic residues).

- Use the angle_define command to measure some bond angles

- Calculate the phi & psi angles for some residues, command 'PhiPsi'

- Use the Ramachandran item in the Graph menu to examine the Ramachandran plot (a scatter plot of psi against phi) for all the molecules you have loaded

 

5. Comparing structures

The 'lsq_' commands in O can be used to compare structures (look under 'The LSQ commands' in the O manual.) One might want to compare two different complexes of the same protein, two or more molecules of a protein where there is more than one molecule in the asymmetric unit, or two homologous structures.

 

5.1 Comparing two homologous structures

Structures of myoglobin have been determined from many different organisms. Here we will compare two different myoglobin structures, one of which is a cyanide complex (from loggerhead sea turtle), and the other of which is an oxygen complex (from sperm whale).

- Load the two PDB files with codes 1mbo and 1lht and display the Ca coordinates

- Type 'lsq_exp'. You will be prompted for the 'not-rotated molecule'. We will superimpose 1lht on top of 1mbo, so type '1mbo' (if you have called the molecule like this!)

- Now you are prompted for the molecule to be rotated. Type '1lht'.

- Now you are asked to define atoms from molecule from 1mbo. Here we can define a zone. Since the molecules in this case are so similar they are numbered the same, in fact. Type '20 130' - which defines the zone from residue 20 to residue 130.

- We then need to state which residues this corresponds to in 1lht. Now we only need to type one residue, the start of the zone. Type '20'.

- We could define further zones if necessary, but since this is sufficient for now, just press return. O then calculates rotation/translation operators to move 1lht on top of 1mbo. If you look in the window you started O from, these will be written out, along with an r.m.s. difference between the two structures. If this number is large, there is probably a mistake somewhere!

- Finally you are prompted for a name for the transformation so that it can be stored as a datablock for use later. Use a descriptive name such as '1lht_1mbo', so that you can recognise it later.

- Now we can refine the operator using the 'lsq_improve' command. Try this out, checking that the defaults you are given at the prompts are still correct. O remembers which molecule was transformed onto which. Use all the Ca atoms to improve the transformation. You can store this in place of the original transformation (use the same name as above).

Question: What is the r.m.s. difference between the two sets of coordinates?

Now we have a datablock stored that we will use to rotate 1lht on top of 1mbo. We can now either choose to rotate the molecule with 'lsq_molecule', or apply the operator to just an object displayed on the screen with the 'lsq_object' command. Lsq_molecule will actually change the coordinates of the atoms stored inside O, whereas lsq_object just moves a displayed object, leaving the coordinates unchanged (see the O manual).

- Try using lsq_object to move the Ca atoms of 1lht onto 1mbo (follow the prompts). Compare the Ca traces.

- Delete these objects (not the molecules!)

- Now use lsq_molecule to transform the coordinates of 1lht. Display all the atoms for both structures. Now compare the two structures, especially around the haem group.

It is also possible to write out the contents of a datablock to a file, for example if you want to use the transformation in another program or if you want to be able to read it into another O database.

- Type 'dir .lsq_rt_*'. This gives you a list of the lsq operators you have in your database. You should see a datablock called '.lsq_rt_1lht_1mbo'. We will write this out to a file '1lht_1mbo.op'.

- Type 'write .lsq_rt_1lht_1mbo 1lht_1mbo.op (3f12.8)'

- Check that the file is created and look at it. The '(3f12.8)' is a Fortran format statement which describes how the numbers are written out. Here they are written in sets of 3 numbers, 12 characters wide with a precision of 8 decimal places.

- You can read a datablock file by just typing 'read filename'.

 

5.2 Comparing two molecules within the asymmetric unit

Now pick up coordinates for rubisco (ribulose-1,5-bisphosphate caroxylase/oxygenase) from Rhodospirillum rubrum, PDB code 5rub. This is a large molecule that exists as a dimer, and there is a dimer in the asymmetric unit. Will they be idnetical?

Read it into O using Pdb_read and make objects for each chain. If you call the molecule 5rub, do this

mol 5rub obj a ca a2 a457 end obj b ca b2 b457 end

Now do the least squares on this molecule to itself. Use just a portion of the structure to get the first rough matrix (say a2-a100 compare with b2-b100) and then improve the operator. Apply the matrix to one of the objects you created to see how similar the two structures are. What do you make of it? Where and how do the 2 molecules differ?

If the B molecule is the one that moves, make sure you ID an atom in the A molecule when you want to recentre. Use colour to make it easy to recognize A from B.

Make new objects of all atoms in the above zones and look for similarities or differences between the 2 molecules.

 

6. Menus, Macros and Maps

6.1 The User Menu

In the Menus menu at the top of the O window there is an item 'User Menu'. It is possible to customise this menu and add commands which you wish to use more frequently, or macros (see the next section). The contents of this menu are stored in the datablock '.menu'.

- Write out the data block '.menu'. Use the command 'write .menu menu ;'. This creates a file 'menu'. The semicolon is a shorthand form of a carriage return in a command (ie. ';;;' is equivalent to pressing <return> three times). Look at the file 'menu'. It should look like:

.MENU T 4 50
colour_text green
colour_text red
colour_text yellow
colour_text magenta

The first line tells you that the datablock is called '.menu', it is a text (T) datablock, there are 4 lines of information that can be 50 characters wide.

- Edit the file. Change the 4 to a 5, and add the command lego_side_chain after the line 'colour_text red', on a separate line.

- Save the file and read it back into O. (read menu). Now look at the User Menu. This should have the command lego_side_chain in red. If you had inserted a command after the 'yellow' line, then that would appear in yellow.

It is important when editing datablocks like this that the number of lines (4 above) should be changed so that O knows how many lines it is supposed to read in.

- If you find commands that you are using regularly which are not in the normal menus then get into the habit of adding them to your user menu. Lego side chain will be very useful later on, for example, as will some macros.

 

6.2 Macros

Macros are a way of grouping commands which you regularly use together - such as drawing objects in a certain way, or drawing a bit of electron density map at a certain place. For instance if you want to run yasspa on a certain molecule, instead of typing it all in, you could use a macro (although this is not the most powerful way of using a macro!) Supposing we create a file run_yasspa which contains the following:

yasspa mol1 alpha ;
yasspa mol1 beta 0.7
ske_auto mol1 ; ;
bell
message yasspa done

The macro can be run by typing at the O command line '@run_yasspa'. This generates an automatic cartoon of molecule mol1, beeps at you and gives you the message "yasspa done" on the screen. This is only useful for mol1, however. It is relatively easy to change mol1 to mol2 for example, and run the macro again to do the same thing for mol2.

Another way of doing this more generally is:

mol #which molecule?#
yasspa ; alpha ;
yasspa ; beta ;
ske_auto ; ; ;
bell
message yasspa done

The 'mol #which molecule?#' line prompts you for a molecule name (in the window from which O started, it does not seem to work well if you type in the O window itself), and this is set as the current (default) molecule. So by typing 'mol1', that is now the equivalent of typing the command 'molecule mol1'.

- Try the yasspa macro out.

- Add it to your user menu and try running it from there.

 

6.3 on_startup macro

If you want to customise O, you can create a macro file called ‘on_startup’ in your working directory. Alternatively you can make an O datablock called "@on_startup". This macro can be used to customise how you want pull down menus to be arranged, amongst other things. Check under ‘Customising O’ on ‘Essential O’ WWW page! For example, make a new file called ‘on_startup’ in your working directory containing the following two lines:

window_open user_menu -1.1 0.1
window_open object_menu 0.9 -0.1

Next time you start O, this macro will get activated and the 2 windows containing the user and object menus will be opened. If you running O, activate the macro by typing ‘@on_startup’

 

7. Ramachandran plot exercise

For this exercise we will use a tripeptide and look to see why only certain conformations of peptides are preferred in the Ramachandran plot.

- Read in the coordinates in the file ‘/home/bms/o/pdb/tripep.pdb’. Call the molecule 'tri' and save the database straight away .

- Display all the atoms and centre on the tripeptide. Switch off all other objects. Identify the bonds around the central residue which can rotate freely. The peptide bond itself should be flat, what torsion angle does it have?

- Create the following macro and save it as the file rama

db_kill tri*rama
win_open graph_rama -1.35 0.0

Add it to your user menu so that it is easy to activate

- Activate the tor_general command by going into the pulldown menu Rebuild/ Torsion/ General via bonds. You will be prompted to identify two atoms that in turn define the region for which you want to change the torsion angles. Click on the ‘C’ atom of residue 1 and the ‘N’ atom of residue 3. The torsion angles values should be displayed close to the respective bonds. The first (closest to the N-terminus) is phi (residue 2) and the second is psi.

- Set each torsion angle to 0°, and look along the respective bonds to confirm this.

- Activate the @rama macro and you should see where this places you on the plot. You are not within the area for the most energetically preferred conformations, but why? Obviously there are close contacts between non-bonded atoms. Use the dist_defi and trig_refresh commands to peg the closest contacts, then explore Ramachandran space. Travers a grid with angular separations of 90 degrees to begin with. Determine where we get the closest contacts, and which atoms are involved. Whenever you want to see the plot updated, click on the macro.

- Now set the phi & psi angles for the a-helix, b-strand and left handed a-helix conformations. Are there any bad contacts here?

You will be given a reprint of a paper by Kleywegt & Jones (Structure (1996), 4, 1395-1400) that describes how we arrived at our core definition. All structures should have some residues that deviate from this area, but they should be just a few percent of the total number of non-glycine residues. The number of residues that deviate from the core is a very useful indicator of the quality of the structure. We will return to this in a later practical. Here is a nicely refined structure's Ramachandran plot. The square boxes are glycine residues.