O Model Building

Preliminary notes (using on Linux)

Most useful websites:

Symbolic linking to the odat directory and access.o:

ln -s /usr/lib/odat odat
This should be done in the working directory and creates a symbolic link to the directory where the data files are stored.  Recent data files can be obtained by ftp from:  xray.bmc.uu.se/pub/alwyn/ov70/data.tar.Z.  The way it is set up now, this should be unpacked locally, then move the whole directory and subdirectories to /usr/lib/o/odat, e.g., after uncompressing the data.tar.Z file (uncompress data.tar.Z):
tar xvf data.tar
sudo mv data /usr/lib/odat
The sudo command is used because root privileges are needed to move files/directories under /usr/lib.

Also, the file access.o must be properly formatted with your machine id (done through e-mail with Alwyn Jones -- alwyn@xray.bmc.uu.se).  Send Alwyn the Chassis ID (comes up when you first start "O", see below), and Alwyn sends back a cryptic id number which is added to the access.o file.  The third item in the first (header) line of the access.o file should be updated so that it equals one less than total lines in the file.  I typically place the edited access.o file in the main odat (/usr/lib/odat) directory.

Starting O:

Currently the "lino" command is created in the alias list of the .cshrc file and points to the most recent version of lin_ono in /usr/bin, i.e.,:
alias lino '/usr/bin/lin_ono804_2'
was the alias for the second release of lin_ono version 8.04.  The current binary executable for the program is obtained through ftp from:  xray.bmc.uu.se/pub/alwyn/kipaut/lin_ono.

Upon starting a new "O" file, the following key strokes will start it up (CR = carriage return):

CR
odat/menu.odb
odat/startup.odb
odat/access.o
odat/all.dat
Note that all.dat contains items that can be updated, e.g., when adding new residues or hetatoms.  The original file was copied to /usr/lib/odat/orig_all.dat.  Finally, the stereo_chem.odb should be read in for any refinement.  This file is an extended version of the refi_aa.o file.
read odat/stereo_chem.odb
After reading in these files, it can be saved to a new filename (data block FILE_O_SAVE):
save filename.o
Then, starting again just requires
lino filename.o
CR

Molecules, reading in pdb files, and writing out contents of the database:

O stores information relating to molecules (mols) in a user-created database.  A new mol is created, e.g., by reading in a pdb file:
sam_atom_in junk.pdb junk
 Sam> File type is PDB
 Sam>  Database compressed.
 Sam> Space for    262753 atoms
 Sam> Space for     10000 residues
 Sam> Molecule JUNK contained 206 residues and 1552 atoms
Here, junk.pdb is read in, given the mol name "JUNK", and additional information from the pdb file is expanded into the internal O database.  All information related to a given mol is stored in the database with the internal identifier "MOLNAME_...", e.g., JUNK_ATOM_XYZ is the database identifier for atomic coordinates for mol "JUNK".  The different types of information relating to a given mol (e.g., JUNK) currently stored in the database can be displayed by:
dir junk*
 Heap>  JUNK_ATOM_XYZ             R W      4656
 Heap>  JUNK_ATOM_B               R W      1552
 Heap>  JUNK_ATOM_WT              R W      1552
...
 Heap>  JUNK_RESIDUE_TYPE         C W       206
...
Information associated with each database identifier can be viewed with the write command:
write JUNK_RESIDUE_TYPE
 Heap> Name of file to be created: <CR>
 Heap> Format: <CR>
JUNK_RESIDUE_TYPE         C        206 (1x,5a)
 ALA   VAL   ALA   VAL   LEU
 VAL   VAL   GLU   ASP  ALA
 ARG   ASP   LEU   ALA   ASP
The above outputs to the screen the primary sequence of mol JUNK (stored in database as datablock JUNK_RESIDUE_TYPE).  The sequence information had been extracted during reading in the junk.pdb file.  In the above example, carriage returns (CRs) were entered on the command line after "name of file" and "Format" to accept defaults.  A carriage return can also be indicated by semicolon (;) so that a command and acceptance of defaults can be issued on a single line:
write JUNK_RESIDUE_TYPE ;;
JUNK_RESIDUE_TYPE         C        206 (1x,5a)
 ALA   VAL   ALA   VAL   LEU
 VAL   VAL   GLU   ASP   ALA
 ARG   ASP   LEU   ALA   ASP
Finally, database items can be written out to an external file instead of just displayed on the screen:
write JUNK_RESIDUE_TYPE junk.out ;
The resulting output file, junk.out, can be edited and read back in.  Any modifications would then overwrite the existing contents for that datablock:
read junk.out

Objects:

An object is a visual rendering created from properties of the mol.  This can be an alpha-carbon trace, an all-atom representation, or a ribbons-style cartoon, as a few examples.  When an object is generated the user gives it an object name.  The display of an object can be toggled on and off through the objects menu.  Ojects can be manipulated, e.g., to change their color or to generate crystallographic symmetry mates.

Macros:

Commands can be typed at the command prompt.  Alternatively, multiple commands (a macro) can be read in from a text file by typing "@filename" at the command prompt, e.g.:
@runfile
would execute any commands in the textfile called "runfile".  Note again that a semicolon (;) in the macro denotes a carriage return.
 

Map display

Read in, setup, and draw the map:

fm_file brixn_mmsk7.map exp7
fm_setup exp7 15.0 ; 2 1.00 sky_blue 5.00 orange
fm_draw ;
The map file brixn_mmsk7.map was previously generated from mapman (a normalized brix formatted map, see Exp Maps) and will be given object name exp7.  Then, multiple maps (2 in this example) with different contour levels (1.00 and 5.00 sigma) will be drawn with radius 15.0 A around current center; each map contour level will be drawn in its own color.
 

Skeletonized density (bones) display

Read bones file into O:

read sk7.bones
This file had been previously generated with mapman (see Exp Maps) and has a header:
SK7_ATOM_XYZ              R      5244 (3f10.3)
    42.127    37.788    26.713
    41.985    37.788    27.190
    41.347    37.277    27.667
...
Reading this into O creates database entry mol SK7 with bones cartesian coordinates contained in the SK7_ATOM_XYZ datablock.

Create skeleton around active center:

bone_setup sk7 sk7mc 20. 3 1 ;
bone_draw
Setup uses mol sk7, which is a bones "molecule" previously read into the database.  It is given object name sk7mc, and all mainchain (3) and sidechain (1) level bones that are within 20.0 A of the active center are drawn.

Making/breaking bonds

Moving atoms, residues, groups

Geometric refinement

Note:  the set of refinement parameters (bond distances, angles, force constants) must be read in from a file obtained in the odat directory:
read odat/refi_aa.o
This loads the parameters into the current O database.  (Note that anonymous ftp to obtain xray.bmc.uu.se/pub/alwyn/ov70/data.tar.Z will retrieve the current data files such as refi_aa.o.)

Before refining a mol, it must be initialized and generated:

refi_init
refi_gener bg15
Mol bg15 is ready for geometric refinement.
 

Mutating residues

N.B:  The lego_setup command needs to be run first for the database.  Otherwise, connectivity data for the given mol can be lost!!  If new odat files have been added to local directory, define the directories accordingly during lego_setup, e.g.:

lego_setup
 Lego>  Define Proleg Paramaters.
 Lego> Drawing of Ca traces ([on]/off):
 Lego> Good-bad fit colour ramping [   120    40]:
 Lego> File of Diagonal Distances [/xtal2/local/O/data/dgnl.o]: odat/dgnl.o
 Lego> Directory containing Protein Database [/xtal2/local/O/data/]: odat
 Lego> File of side chain rotamers[/xtal2/local/O/data/rsc.o]: odat/rsc.o
Here, the odat data was loaded (or symbolically linked) to local subdirectory odat; default values above were taken (carriage return) except for bolded entries.

Change a selected residue:

cen_id wait_id
mut_repl $.id_m $.id_r #Enter name of new residue:# ;
mol $.id_m obj bg15all zone ; end
refi_init
refi_generate bg15
The invoked macro waits for a residue to be selected, then prompts for the new residue type.  After any mutation (which is an action on a mol, bg15 in this example) all objects generated from that mol are deleted; therefore, a new all-atom object is generated for the whole molecule using the zone command.  Finally, refi_init and refi_generate are required before additional geometric refinement can proceed.

Insert a residue into well-defined chain:

mutate_insert bg15 31 32 ALA ;
Here, a new ALA 32 was inserted after existing residue 31 in mol bg15.  Note that all objects previously generated from mol bg15 are deleted, so new coordinate drawings should be created after the insertion, e.g.,:
mol bg15
Paint_case ato_z 4 6 7 8 16 yellow blue red green
obj bg15al zone ; end
The mutate_insert created new space in the database for the residue, but its coordinates are not yet defined.  To do this, first centre_id on the ca atom of the N-terminally adjacent residue to the inserted residue.  Then use baton:
baton_mode beta
baton_build bg15 32 F
Note that 32 in the above line is the number of the newly inserted residue (not an existing residue), and that the building direction is forward.  Using the dials (or mouse), the ca for the new residue is positioned.  I have found the most useful mode is FragRot dial mode (use dial_pre or dial_next) followed by ctrl-MR mouse control.  When the new (green) part of the baton is properly positioned, type "yes".  If additional residues were to be added using baton, additional rounds of this procedure could be done.  Otherwise, type "no" to leave baton_mode, keeping all ca coordinates accepted with the "yes" command.  Note that for baton, the di.o file must have previously been read into the current O file, and the new "di" unit can be seen after creating the object:
mol di ca ; end
Finally, the mainchain and sidechain atoms must be built based on the new ca atom:
lego_auto_mc <mouse-select residue 31 and 33>
The main-chain atoms of the new residue 32 are added
lego_side_chain <id and atom in the new residue 32>
Use the dial to view alternate rotamers to choose.  Type "yes" to select the desired rotamer.
Make sure to reset the regularization parameters before geometric refinement of the modified mol:
refi_init
refi_generate bg15
Note in above the if a residue is being added at the C-terminal end, lego_auto_mc will work by clicking previous followed by added residue.

Insert a sequence into a chain:

I used the following to insert a loop into the poorly-defined linker region (123-127) connecting N- and C- domains of DrrD.  Note that most of the residues 2-122 and 128-end had been well built, but that 123-127 had not yet been built/defined.
mutate_insert bg15 122 123 GLU
124 SER
125 LYS
126 SER
127 THR ;
The bg15-related objects will now be deleted, so a new model must be generated, e.g.:
mol bg15
paint_case ato_z 4 6 7 8 16 yellow blue red green
boj bg15al zone ; end
Then use the protein database to pick loops that would fit between the existing c-alpha atoms:
sel_on bg15 ;
sel_off bg15 123 127
lego_loop bg15 121 129
The result is a list of 20 best fitting loops.  All but one are displayed as c-alpha traces (obj db_ca) and the fit parameter and database id's are listed in the command window.  A single loop of the twenty is active as a poly-ala chain (obj db_ala), and the particular loop that is currently active can be varied by turning the dials (or ctrl-rt-mouse-horizontal movement).  This allows the various best loops to be examined in the density.  Once identified, the desired loop can then be selected and side-chains added by:
yes
sel_on bg15 ;
lego_side bg15 123 yes
lego_side bg15 124 yes ... (for all inserted residues)
Don't forget to do refi commands so that refinement can continue:
refi_init
refi_ge bg15

Building in heteroatoms (reply on o-info from Alwyn Jones):

i would add SCN ions doing a variation on the following:

1. update your connectivity file (usually i use all.dat) to include all
atoms for the SCN residue. e.g. add

SCN
ATOM S C N
CONNECT S C N

if the residue is to be called SCN and the atoms are called S, C, N

2. update the stereo chemistry dictionary to include this kind of residue
e.g. add

residue SCN
bond_distance S C 1.8 .02
bond_distance C N 1.4 .02
bond_angle S C N 120. 2.

NB i have no idea of the stereo-chemistry, look it up

3. miutate the structure you are working on to include at least one more
SCN residue. you might want to add 10 or so

mut_inser
X
110
200 SCN
201 SCN
202 SCN

etc
in the above, the molecule is called X, i've added the residues after 110
and they are called 200, 201 etc

4. make the stereo-chemistry entries
refi_ini X
refi_gen x 1 110
refi_gen x 200 202
etc

5. centre on the next ion with, for example
centre_xyz 20. 22, 24,

6. use the build commands (http://alpha2.bmc.uu.se/~alwyn/release_80.html)
buil_mol x
build_res x 200 c
c_xyz ...
build_res ....
 

voila
alwyn  ( home page:  http://xray.bmc.uu.se/alwyn/)
 
 

Miscellaneous drawing macros

Draw all atoms for a single residue:

mol #Enter molecule name:#
obj #Enter object name:#
zone #Enter residue number:# ;
Paint_case ato_z 4 6 7 8 16 yellow blue red green
end
User is prompted for molecule name, object name, and residue number; atoms are colored by type.
 

Draw all atoms for nonconsecutive residues:

mol bg15
obj pairs
zone 24 ;
zone 89 ;
zone 115 ;
Paint_case ato_z 4 6 7 8 16 yellow blue red green
end
Molecule name is bg15 and new object name is pairs; atoms of residues 24, 89, and 115 are displayed.
 

Drawing symmetry mates

Draw symmetry-related objects:

symm_setup bg15 34.70 71.49 54.70 90. 106.5 90. p21 p21.o
symm_object bg15a2 sbg15 20.0
Molecule ddc has cell constants above and belongs to space group p21; symmetry file p21.o has to be in the current directory.  The crystallographic symmetry mates of existing object ddcall (and within ) are generated with new object name sdcall, within 20.0 A of active center.
 

Make symmetry mates with different color:

de bg15a2 sbg15 ;
mol bg15
obj bg15a2 zone ; end
paint_colour white
paint_object bg15a2
symm_setup bg15 34.70 71.49 54.70 90. 106.5 90. p21 p21.o
symm_object bg15a2 sbg 20.0
Delete objects bg15a2 and sbg15 (if they already exist), then make a new object bg15a2 from mol BG15, color it white, and generate symmetry mates (object root name "sbg" gives resulting mols:  sbg1, sbg2, ... sbgn) that are within 20.0 A.  The object bg15a2 can then be turned off, leaving only the (white) symmetry mates around.  This is useful when you want to easily see which are the symmetry mates and which are the molecule that you are building (visible as a previously generated object).

Notes on creating objects from entire symmetry mates:
When using the above macro, full molecules (sbgn) are created in the database, although only portions of each are displayed.  If one wants to display the entire molecule symmetry mate, one can then work with individual molecules:  e.g.:

mol sbg3 (if sbg3 was the symmetry mate of interest)
obj sbg3ca ca ; end
would create a ca tracy of symmetry mate sbg3.
 

Coloring macros

Color by atom type:

Paint_case ato_z 4 6 7 8 16 yellow blue red green
obj #Enter obj name:# zone ; end

Sketching macros

Examples sketch given in O Essentials:

mol #Enter mol name:#sketch_obj x
sk_set tape line 1.5
sk_add a1 a10
sk_add a100 a120
sk_typ ribbon
sk_add a10 a100
Make a ball-and-stick object of an object x :
obj x sphe 10 end
ske_stick x
read radii.o
ske_cpk x

Draw two stick sketches through a zone:

plot_on
mol bg15 obj x zone 9 14 end
sketch_setup stick solid 0.1 4
ske_stick x
mol ddf obj y zone 9 14 end
sketch_setup stick solid 0.1 4
ske_stick y
fm_setup 2fofc 15 ; 1 1.00 blue
fm_draw ;
plot_off
The above also draws a map around active center and turns plotting mode on to generate output that can be converted to postscript file with oplot.

Model analysis

pep_flip <id two atoms> or <mol res1 res2>

lego_setup

Make sure odat directory is correctly defined and necessary files are there
rsr_map brixn_2fofc_filename.map

read odat/rsfit_all.o

Here, the dat files are loaded in a directory odat/ located one level below the working directory.  Reading rsfit_all.o file reads in datablocks that result in all atoms being analyzed when the rs_fit command is issued; alternatively:  read odat/rsfit_sc.o or read odat/rsfit_mc.o.
rs_fit mol 2 224
This generates a new datablock:  mol_residue_rsfit.  This can be written out, e.g.:
write mol_residue_rsfit rsfit_all.o (10f7.3)
The last set of characters define the output format.

The following analyzes sc conformations.

rsc mol 2 224
write mol_residue_rsc rsc.o (10f5.3)