Contents
IntroductionEditing Vectors
Vector File Format
CCP4 Molecular Graphics Documentation | ||
Vectors |
Documentation Contents | On-line Documentation | Tutorials | CCP4mg Home |
CCP4mg can display arbitrary vectors (with the endpoints defined either by atom positions or xyz coordinates); these can be useful to show experimental results (such as the TLS axes output by REFMAC5) or to provide arrows or lines when creating images.
The vectors can come from
On the CCP4mg display table each vector file is treated as a data object which can have one or more display objects. For each display object the user can change the selection of vectors, line appearance and label appearance. There are several options on display styles (cylinders, arrow heads etc.). A text label can be associated with each vector. The input file can define the appearance of the vectors (colour, position of labels etc.) but these parameters can also be changed by the user. The vectors can be grouped by name tags so the user can select groups of vectors to display.
Some CCP4mg tools have information that can be represented as inter-atomic vectors. If you want to put this information in an image but need to refine it by adding or deleting vectors, changing text labels or changing the appearance of the vectors then write out a vector file and use the Vector editing tools.
On the display table the two buttons for the vector display object are
If vector groups have been defined then the selection menu will list the groups which can be toggled on or off to be displayed.
There are various options to select the line style (e.g. dashed, cylinder, arrow, cone), colour, line width, cylinder radius, arrow head position, and cone radius. There are options to set the position,colour and font of the label
Select the Edit vectors option from the vector icon menu (the icon next to the file name).
The options in this window are dependent on if the vector is defined
between atoms or at general xyz coordinates.
Start point can be set by entering the coordinates of choosing an atom position. If the vectors are not between atoms then any selection of atoms (e.g. a chain or residue) could be entered and the vector terminus would be placed at the centre of the specified atoms.
End point As for the start position.
Vector annotation Enter text - there are options to set the text style and colour.
Add the vector to group Select one group for the vector. Group
names can be created or edited using the Group details option. The purpose of grouping vectors is that they can be selected together to control their visibility or display style.
You will need to click on the Save vector button at the bottom of the window to see the effect of your changes.
You only need to know about the file format if you plan to write a file from another program. If you have problems or suggestions please contact the CCP4mg developers stuart.mcnicholas@york.ac.uk.
The file is in a CIF format (though currently there is no formal CIF dictionary file). The basic principles of CIF are described in the first chapter of $CCP4/doc/ccifdoc.ps. There is an example file for displaying the TLS axes vectors here.
The categories of data in the file are described below.
This category is essential if the vectors are described in terms of
atom positions. It provides a short identifying id and the name of
a PDB/mmCIF file which is required to be loaded by CCP4mg in order
to display the vectors. If the data in the file is associated
with a particular PDB/mmCIF file then it is recommended that this
category is provided.
Example
loop_ _model.id _model.filename "rnase" "/xtal/ccp4/examples/rnase/rnase.pdb"
This category is optional but recommended if the vectors have a tags
data item. This category provides a fuller name for each tag which
can be used in the CCP4mg GUI to provide a better description for the user.
The data item name is a one word name for each possible tag. The
annotation data item is a fuller description but since it will appear on
a display table menu it should still be kept short.
Example
loop_ tags.name _tags.annotation "LIB" "Libration" "SCREW" "Screw" "TRAN" "Translation" "RTRAN" "Reduced translation" "SCREWROT" "Screw rotation"
This category is optional and can define the appearance of one or more data objects that are created when the vector data is loaded into CCP4mg. All of the items in this category are optional .
Data Item | Permissible Values | Interpretation |
selection | A list of selected tags e.g. "LIB SCREW" | Only vectors with specified tags will be displayed. Default all vectors are displayed |
line_style | "solid","dashed","arrow","dashed arrow","cylinder", "cylinder arrow" | Line style default is "dashed" |
line_width | Positive integer | Not relevant for cylinder line styles.Default 2 |
cylinder_radius | float | Radius of cylinder |
arrow_head | int | for line_style 'arrow' or 'dashed arrow'.Arrow head at 0=start, 1=end, 2=both |
cone_mode | string | 'fixed' or 'fraction' |
cone_radius | float | For cone_mode 'fixed': the cone radius |
cone_fraction | float | For cone_mode 'fraction': cone radius is cone_fraction of vector length |
dash_length | float | Length of dashes for dashed vectors |
dash_end | logical (0 or 1) | If 1 end vector with a gap. If 0 end with a dash. |
line_colour | One of colours defined in $CCP4MG/python/etc/colour.py | Default "white" |
label_mode | Position of label with respect to vector: 'no label','label centre','label start','label end' | Default is 'no label' |
label_colour | One of colours defined in $CCP4MG/python/etc/colour.py | Default "white" |
font_family | Text label drawn with this font. See any font menu for supported fonts. | Currently supported: new century schoolbook, helvetica,lucida, lucidabright,lucidatypewriter,times |
font_size | The font size | Currently supported: 8,10,11,12,14,18,20,24,34 |
font_slant | Specifies if font is italic | Currently supported:o (=italic),r (=regular) |
font_weight | Specifies it font is bold | Currently supported: bold or medium |
Colours: blue, red, green, grey, yellow, magenta,
royal blue, cyan,coral,pale green,pink,lemon,purple,tan,black
Example
loop_ _display_objects.line_style _display_objects.line_colour _display_objects.line_width _display_objects.label_mode _display_objects.label_colour "cylinder arrow" "yellow" 2 "label centre" "yellow"
This category is compulsory. There are several reasonable combinations of data items. Unreasonable combinations will be ignored.
Point-point vector requires the start and end x,y,z coordinate
loop_ _vector.start_x _vector.start_y _vector.start_z _vector.end_x _vector.end_y _vector.end_z
Atom-atom vector requires the id of two atoms in the format described here. The MODEL category is compulsory to define the model containing the vectors.
loop_ _vector.start_atom _vector.end_atom
If the atoms are in more than one different models then the appropriate model for each atom must be specified:
loop_ _vector.start_atom _vector.start_atom_model _vector.end_atom _vector.end_atom_model
Atom-point and point-atom vectors are a combination of the above as:
loop_ _vector.start_atom _vector.end_x _vector.end_y _vector.end_z loop_ _vector.start_x _vector.start_y _vector.start_z _vector.end_atom
Atom-displacement and point-displacement vectors define a start point and a displacement:
loop_ _vector.start_atom _vector.end_d_x _vector.end_d_y _vector.end_d_z loop_ _vector.start_x _vector.start_y _vector.start_z _vector.end_d_x _vector.end_d_y _vector.end_d_z
There are additional optional data items:
Labels for the vector
loop_ _vector.start_atom _vector.end_atom _vector.label "/A/27/CA" "/A/29/N" "Close contact 2.5A"
Tags for the vector
Tags enable the user to select a set of vectors for display. It is recommended that you also provide a TAGS category.
loop_ _vector.tag _vector.start_x _vector.start_y _vector.start_z _vector.end_x _vector.end_y _vector.end_z _vector.label LIB 59.401 4.334 6.581 100.654 14.289 2.295 "Libration" LIB 59.401 4.334 6.581 57.056 12.337 2.607 " "