3.2 Molecular Line Objects (980216)
The Display pull-down allows a user to construct simple objects from molecules that have been loaded into an O database. However, much more complex objects can be created by specifying combinations of instructions to the O command line parser. Before issuing such a series of directives, the molecule to be used must be defined with the command Molecule_name. Once defined, the molecule name is maintained until explicitly changed. The name of the object to be created and viewed can be defined with Object_name, otherwise the object will have the same name as the molecule.
O uses explicit connectivity tables for each residue. When first started, the program prompts for a file containing this information. The default file connectivity draws bonds between heavy (i.e. non-hydrogen) atoms. A residue not in the connectivity list is drawn by a distance criterion to define bonds. When the first object is made, the program uses the currently defined connectivity file to construct the whole molecular connectivity. This is kept in the datablock <mol>_connectivity and can be modifed by the bond making and brteaking commands. If a different connectivity file is to be used, the <mol>_connectivity datablock must first be deleted.
Note that any number of generating commands (Ca, Zone, Cover, Sphere) can be issued so that complicated objects can be constructed. If more generating commands are issued after an End_object without defining a new object, then the current object gets overwritten. The colours used are the values in the parameter block <mol>_atom_colour at the issue of the End_object command. Lines will only be drawn between atoms that have 'on' values in their <mol>_atom_visible datablock. These values can be set by the Select commands.
Note that any number of objects can be made from one molecule, but that each object is made from only one molecule.
When an atom is picked, the default action is to label it with a small piece of text containing the residue and atom name. More information, such as the residue type, and the orthogonal coordinates of the atom, can be given in the message area at the top of the screen. The content of both the label and the message can be customized by the user. See in the example section 3.2.11 how to do this.
Object_name <name>
Define the name of a new molecular object. In the current version of O, the name can be up to 5 characters long.
Molecule_name <name>
Redefine the name of the molecule. The name of the current object is changed to the same name. Therefore, if the object name is to be different from the molecule name, the Object_name command must be invoked after Molecule_name. Once defined, the name of the current molecule is saved, until it is explicitly changed. The names of several datablocks are generated from the molecule name. For example, if the molecule name is 'M15', a datablock called
m15_atom_xyz
holds the orthogonal coordinates of all atoms in molecule M15. In the current version of O, the name of the molecule must fit into 5 characters.
ca_zone <res1 res2>
Add a Ca zone to the current open object. A blank input specifies all residues in the molecule. Entering just one residue name, specifies only that residue.
zone <res1 res2>
Add a zone of residues to an object. The connectivity between residues will be that defined in the current connectivity file (see the Connect_file command below). A blank input specifies all residues in the molecule. Entering just one residue name, specifies only that residue.
cover_sphere <res atom> <radius>
Add the residues in contact with an atom or to whole residue. Define either an explicit atom (i.e. a residue and an atom) to choose atoms around an atom, or define just a residue to define atoms covering a residue. If one atom from a residue is within the cover radius, all atoms in that residue get chosen.
sphere_centre <radius>
Choose atoms in a sphere centred at the current active centre, stored in the .active_centre datablock. If an atom from a residue is within the given sphere radius, all atoms in that residue get chosen. The .active_centre datablock is set by any of the commands Centre_ID, Centre_xyz, Centre_atom, Centre_zone, or by the user directly overwriting the value stored in the database.
End the current open object and display it. The atomic colouring codes in the atom property datablock <mol>_atom_colour are used for bond drawing. If the user has not issued colouring commands (see the Paint major menu) default values are taken: carbons yellow, nitrogens blue, oxygens red, sulphurs green, phosphorous pink etc.
delete_object <name>i ;
Delete any of the created objects. The user is presented with a list of all current objects, and prompted for an object name to be deleted. Any number of objects can be deleted and input is terminated by a blank line.
connect_file <file_name>
Define a new connectivity file. A number of connectivity files are distributed. The file all.dat draws bonds between non-hydrogen atoms for all amino acid. The connectivity in file o.dat draws bonds between Ca and all non-hydrogen sidechain bonds. File xplor.dat includes essential hydrogens. File trna.dat contains the connectivity for tRNA. The tRNA connectivity could be added to the amino acid connectivity if desired. Any residues not described in the connectivity file have bonds drawn according to a distance criterion.
The format of the connectivity file is simple. The LINK statement specifies the maximum separation between atoms in adjacent residues for a bond to be drawn. For each residue, there is a number of records. The first one contains the name (type) of residue. Subsequent records start with the keywords ATOM or CONNECT. The ATOM records specify the names of the atoms making up the residue. Each CONNECT record specifies a linked list of bonds between atoms. The connections to the previous and next residues are specified by '-' and '+'. These special connections must occur on the same CONNECT record. Below is an example of the entry for Valine:
VAL
ATOM N CA C O CB CG1 CG2
CONNECT - N CA C +
CONNECT CA CB CG1
CONNECT CB CG2
CONNECT C O
The atom names associated with each residue are also used with the Sam_init_db command to generate database entries corresponding to a particular sequence.
Suppose you want to display the Ca-trace of a protein from residues B1 to B100, plus a sphere of atoms around residue B50. If the molecule is called M15, the following commands will create the desired object:
mol m15 obj mol1 ca b1 b100
centre_atom b50 ; sphere 10.0 end
If you quit the program, and come back later, the object will still exist. The object can be deleted with the command:
del_obj mol1 ;
3.2.11 Customizing the message and atom labels
The messages given when an atom is picked can be customized. This is done via two text datablocks, .message_template and .id_template. The text datablock contains lines of text that will be concatenated to form the string to be displayed. In the absence of the templates, only the residue name and atom name is shown. Thus, there is no default .id_template. Certain predefined format strings will be expanded, but atom and residue properties can be included as well. The atom or residue property names must be at the beginning of a line and be written in full. This is best illustrated by an example. The default template for messages is:
.message_template t 9 40
%MOLNAM %RESNAM %Restyp %ATMNAM, xyz =
atom_xyz
; B =
atom_b
; Z =
atom_z
atom_bone
;
residue_2ry_struc
This could generate a string like this in the info area at the top of the screen:
HCAC 43 Ser CA, xyz = -22.06 4.02 37.76 ; B = 25.86 ; Z = 6 ;
No secondary structure nor skeleton data was output because no such datablocks existed in the user database. Without an Id template, the label beside the atom would be simply
43 CA
Format strings which are expanded in the template include:
%MOLNAM Name of current molecule
%RESNAM Name of current residue
%RESTYP Residue type of current residue
%ATMNAM Name of picked atom
%R1 Residue-type in one-letter code
The case of the letters in the format string is important and controls the case of the output text. For example, %RESTYP expands to TYR, %Restyp expands to Tyr, and %ReStyp expands to TyR.
Datablock items must be given on separate lines, and if a datablock does not exist, it is simply ignored. In the example above, the atom_bone property is shown when a bone atom is picked, and the element number is shown when a normal atom is picked.
@change_id_colour.omac Change Id text colour. Default red.
@change_id_number.omac Change number of Id's in an object. Default 3.
.molec_obj_integer
7 The Id text size [7].
8 Controls the Id text colour [16711680, i.e.red]
9 The number of Id's displayed per object [3].
.active_centre 1-3 3 real numbers, used by a variety of commands, including Sphere_centre.
Each molecular object creates a number of entries in the data base. If the object name is 'CA', for example, then the following entries get created:
.obj_3dt_ca Holds the current text of Id'ed atoms.
.obj_con_ca Holds the connectivity between the atoms being displayed. This is stored as a list of integers, pointers to the order of the atoms in the molecule.If atoms i, j, k are connected, then this would be encoded as 2*i+1, 2*j, 2*k in this list.
.obj_idx_ca Holds a list of pointers directly to the atoms, i, j, k in the example above.
.obj_col_ca Holds a list of colours to be drawn for the atoms, in the order in .obj_idx_ca in this example.
Note that the actual commands issued by the user are not stored in the database.