------------ CCP4 Newsletter - June 1996 ------------


Back to Contents....

ROTGEN -A Program for Rotation Images Simulation and Analysis

John W. Campbell, CCLRC Daresbury Laboratory

INTRODUCTION

ROTGEN is an X-windows based program for carrying out simulations of X-ray diffraction rotation images and analysing the unique data coverage for one or more crystal settings and series of rotations.

Figure 1. Main Screen of ROTGEN

The current program incorporates functions from the CCP4 (Collaborative Computational Project, Number 4, (1994)) and/or the MOSFLM suite (Wonacott, Dockerill & Brick (1980), Lesli;e (1992)) programs OSCGEN, UNIQUE and COMPLETE (the function of the latter now incorporated in MTZDUMP). The general treatment of the goniometry is derived from that used in the MADNES program (Messerschmidt & Pflugrath, 1987). The program makes also use of the XDL_VIEW toolkit (Campbell, 1995), library routines from the Daresbury Laboratory Laue Software Suite (Helliwell et al., 1989) and the CCP4 libraries.

The program is a first stage in an on-going development; the main aim in the next stages of development is to provide strategy information for efficient data collection using the rotation method. If successful procedures are developed, it may well be desirable to integrate the use of the program, perhaps in a re-packaged form, with the PXGEN interface used on PX stations 9.5 and 7.2 at the Daresbury SRS (Kinder, McSweeney & Duke (1996). It is intended however that a stand alone version will also be retained.

The most immediate next steps are to allow the input of previously collected data (from an MTZ file) to be read into the program and included in the data coverage analyses and to provide quicker though slightly approximated analyses.

SCREEN LAYOUT

The basic screen layout for the program is divided into five areas.

Top Left

A menu area used for selecting the options currently available. The options within a menu are, in general arranged such that the normal order of access would be from the top downwards without necessarily using all the options available. The basic menu structure of the program is hierarchical and most menus have an item at the bottom which returns the program to the previous level with a label such as 'Return to Main Menu' or 'Return to Previous Menu'

Top Right

Main parameter table. This is an editable parameter table which contains the main crystal/detector parameters.

Bottom Left

Parameter table 2. This area is used for special purpose parameters relating to the current option selected.

Middle right

This area is the main text input/output window. This is used to output textual information from the program when required and also, at some stages, for prompt and reply sequences e.g. for inputting file names.

Bottom Right

Command window. This window is for inputting program options and parameters via a command line. Keyworded parameter values may be input or inspected. It is anticipated that processing functions will be added at a later stage.
Additional windows e.g. windows for displaying Rotation simulations or graphs are used at various stages of the program. These may be positioned independently of the main program window. Normally they will initially be positioned just to the right of the menu area.

OUTLINE OF THE MAIN OPTIONS

The following are the main options available in ROTGEN selectable via options in the program's main window and menu:
  1. Setting up the parameters

    The parameters in the main parameter table are assigned default values when the program is started. Individual parameters may be reset by editing the values directly in the parameter table. A new set of parameters may be read in from a keyworded parameters file using the 'Read Parameters File' option.

    When the required parameters have been set up, they may be saved in a keyworded parameters file for future use using the 'Write Parameters File' option.

  2. Updating the orientation parameters.

    The 'Read Matrix File' option may be used to reset the parameters which define the crystal orientation using matrices produced following auto-indexing by programs such as REFIX or DENZO.

  3. Rotation simulations

    Two basic types of simulations are available, 'colour' simulations and 'interactive' simulations. In each case a window is created with a display area for the simulation, an area to list details of a selected reflection, a control panel and an area used for requesting hard copy (Postscript) output of the simulation. 'Colour' simulations show the show the rotation patterns with the spots colour coded in a number of different ways. 'Interactive' simulations are in black and white and have a slider which allow the user to investigate the effects of changing various parameters such as the oscillation range and mosaicity; spot labelling is also available.

  4. Analyse data

    This option enables the prediction of the reflections which would be recorded for the defined crystal sets and to analyse the data coverage in terms of the unique data for the space group, cell and resolution. The analysis may be done for either the current crystal set or for all crystal sets within the data set. The results may be presented in the form or histograms describing the data coverage or in terms of a pictorial representation of the reciprocal lattice sections. The analysis data equivalent to that displayed in the histograms is also written to the log file. The analyses automatically written to the log file exclude any spatially overlapped reflections.

  5. THE COORDINATE SYSTEMS

    ROTGEN, in general, makes use of the set of laboratory axes as used by the MOSFLM suite of programs. However this does not mean, for example, that the rotation axis need necessarily be along the dirextion defined as 'Y' as one of the keyworded parameters enables the direction of the rotation axis to be specified as a vector with respect to the laboratory axes. Similarly, the detector plane need not necessarily be normal to the 'X' axis.

    THE PARAMETERS AND PARAMETER FILES

    The parameters used by the program form a keyworded data set. They fall essentially into two categories:

    1. The crystal parameters such as the crystal system, lattice type, cell parameters, crystal orientation parameters and the resolution limit of the diffraction.

    2. The parameters relating to the X-ray and detector system and X-ray source such the wavelength and the positioning of the detector.

    The parameters include specifications for one or more crystal orientations and sets of images. Some parameters refer to the dataset as a whole and some may have separate values for each of the crystal sets.

    A general Keyword Data Module (KDM) set of functions is used by ROTEGEN to define and handle its keyworded data set. It uses many the same concepts as the Laue Data Module (Campbell, Clifton, Harding & Hao, 1995) but the KDM routines are general whereas the LDM routines were written for a specific set of parameters. The KDM routines enable parameters of various types to be defined e.g. integer, real or character. Additional sets of routines are used to handle the input and output of KDM data and also symmetry data (KWD and KSM routines).

    For most parameters a keyword is followed by a single value. The keywords are case insensitive and need not be given in full though a certain minimum number of characters must be given in each case. For a set based parameter the keyword may have a set number appended in square brackets e.g. ROTSTART[2] 50.0; if the set number is omitted, it is assumed that the value following the keyword refers to all sets e.g. RESOLUTION 2.0.

    KDM Routines enable the monitoring of changes to KDM parameter values during the execution of a program. KWD/KDM based data files may contain indirect references to data in another file by giving a file name reference of the form '@filename'. These indirect files may currently be nested to a level of up to 20.

    THE MATRIX FILES

    This option is used to read in crystal orientation data from a matrix file for example after the orientation has been determined via an auto-indexing procedure. Currently two types of matrix file may be read, one as used by the MOSFLM suite and the other as used by the HKL/DENZO suite.

    When a MOSFLM suite matrix file is input, the following parameters are updated:

    For a DENZO file input, the following parameters are updated:

    In contrast to the MOSFLM case, the missetting angles and cell need to be derived from the matrix read in as the required values are not stored in the file. The program derives the missetting angles on the basis of the current value of the U-matrix and this remains unchanged again in contrast with the MOSFLM case.

    ROTATION SIMULATIONS

    This option allows for the display of Rotation simulations based on the current parameter values for the currently selected crystal set and image. It has two modes of display, a colour mode and an interactive mode. In each mode there is a display area for the simulation, an area to list details of a selected reflection, a control panel area and an area used for requesting hard copy (Postscript) prints of the simulations.

    Orientation of the Simulations

    The simulations may be displayed in a number of different orientations. By default the orientation is the same as that from an IPDISP program display of a MAR image. An alternative program default may be set either via a command line option or an environment variable or via a parameter table during the running of the parogram. The orientation options are 'ipdisp', 'denzo' or 'oscgen' indicating compatibility with programs of these names.

    Colour Display

    'Colour' simulations show the rotation images with the spots colour coded in a number of different ways. The various options are selected via control panel items. Also, details may be listed for selected spots and hard copy Postscript file plots produced if required.

    Figure 2. Example of a Colour Rotation Simulation

    Control Panel Options

    The colour coding depends on the option selected via the Colour coding choice menu on the control panel. The display is qualified by the settings of other control panel items. The options available are:

    Fulls/partials

    The spots are split into three categories, fulls partials and those which are on the edge of the cusp region and are partly visible. They are colour coded as follows:
      blue:    fulls
      yellow:  partials (up to maximum used in the prediction)
      red:     cusp partials
    

    Partiality 1

    The spots are colour coded by their partiality as follows:
     blue:    fulls
     cyan:    partial <=n as set in the Partial 'n' panel item
     yellow:  partial >n and up to the maximum used in the
              prediction
     orange:  wide partial (greater than the maximum partiality
              used in the prediction)
     red:     cusp partial
    

    Partiality 2

    The spots are colour coded by their partiality as follows:
     blue:    fulls
     cyan:    partial =2
     green:   partial =3
     yellow:  partial >3 and up to the maximum used in the
              prediction
     orange:  wide partial (greater than the maximum partiality
              used in the prediction)
     red:     cusp partial
    
    All the same

    All the recorded spots are displayed in the same (blue) colour

    Overlap status

    The spots are colour coded by whether or not they are spatially overlapped. The colour coding is as follows:
     blue:    not overlapped
     yellow:  spatially overlapped spot
    

    The 'Spot types' choice menu on the control panel allows the user to choose one of the following three options:

    The display of spatially overlapped spots may be controlled via the 'Spatials' choice menu on the control panel. There are three options:

    The user may select one of three spot sizes, small medium or large for the display via the 'Spot size' choice menu on the control panel.

    The display, of a key at the top left of the display area showing the colour coding, may be turned on or off via the 'Key' choice menu on the control panel.

    The partial 'n' value, used in deciding which category a partial spot is to be included in for the Partiality 1 colour coding option a nodal can be reset via the Partial 'n' value item on the control panel. The value must be in the range of 2 to the maximum value used in the prediction.

    Listing Spot Details

    When the mouse Button1 is pressed with the cursor on a spot position, details of that spot will be listed in the spot details area. The following information is listed:

    The indices

    The coordinates

    The detector xd, yd coordinates in millimetres from the centre of the pattern.

    The partiality

    For a fully recorded spot the message 'fully recorded' is given. For a partial the partiality is given and the offset from the current image of the start image for the spot is indicated. 'Wide' or 'Cusp' partials are flagged as such.

    The overlap status

    The spot will be flagged asa 'non-overlapped' or as an 'overlapped' spot.

    The selected spot is marked by a surrounding white circle on the display area. The selection may be removed by clicking Button2 or Button3 of the mouse (or Button1 when the cursor is within the display area but not pointing to a spot). When Button1 is pressed, the nearest spot to the cursor is selected provided that the distance squared (pixels) to the spot is no more than 18.

    Hard Copy

    To get a hard copy plot in the form of a Postcript file, select the panel button marked PS in the hard copy request area at the top of the view object. A question and answer sequence is then followed using a panel i/o item to the right of the PS button. Invalid replies will give pop-up error notices. The hard copy output may be abandoned by pressing the Escape key when a prompt is displayed.

    Interactive Display

    When one of the interactive display options is selected, the rotation simulation is displayed as black spots displayed on a white background. Various options may be selected via the control panel items. These include options to vary various parameters via a slider, options to highlight various classes of reflection and options to label selected reflections. Also, details may be listed for selected reflections and hard copy Postscript file plots produced if required.

    Figure 3. Example of an Interactive Rotation Simulation

    Control Panel Options

    A 'Slider variable' panel choice item determines which of the available variable parameters can currently be adjusted via the slider. The parameters which may be varied under slider control are:

    The use of the slider was originally designed for use on colour displays which have 'writeable colour maps'. In fact 50 colours are used on the display with the spots being 'colour coded' by the value of the current variable parameter. The 50 colours are then set to white or black depending on the position of the currently selected slider. If the slider is moved then the display is altered merely by changing the colours in the colour map thus giving a rapid change of pattern as the slider is moved. On displays which do not have writeable colour maps and on monochrome displays, the use of the sliders is less effective as the pattern needs to be redrawn each time a slider is moved.

    The current value for the parameter being varied is displayed to the right of the slider. The overall range is defined by the calling program.

    The 'Highlight' choice menu on the control panel may be used to enable various classes of spots to be highlighted. The options available are as follows:

    No highlighting

    This is the default; all spots are shown as black spots.

    Highlight fulls

    Fully recorded spots are indicated by blue vertical crosses; partials remain as black spots. (on monochrome displays, the corresponding symbols are drawn in black)

    Highlight partials

    Partials with a partiality <= the value set via the Partial 'n' panel value item are displayed as blue vertical crosses; partials with a higher partiality are displayed as red crosses and cusp partials are displayed as green stars (or black on a monochrome display).

    Note: When spots are highlighted and the soft limit sliders are used, the plot will be redrawn each time a slider is moved. The sliders are best used when no spots are highlighted.

    The user may select one of three spot sizes, small medium or large for the display via the 'Symbols' choice menu on the control panel.

    The partiality value defining the boundary between the two main classes of partials may be set via the Partial 'n' value item on the control panel. The value must be in the range of 2 to the maximum value used in the prediction.

    The 'Labels' choice menu allows a number options for labelling. These are:

    Labels off

    No labels will be displayed and the labelling facility is currently disabled.

    Labels on

    Display any labels which have been added to the plot as described below.

    If there are labels already displayed when a new labels option is selected, the existing labels will be redrawn as needed.

    Note: When labels are displayed the plot may be redrawn if the slider is moved because a spot has disappeared or reappeared. The sliders are best used when no labels are displayed.

    Listing Spot Details

    When the mouse Button1 is pressed with the cursor on a spot position, details of that spot will be listed in the spot details area. The following information is listed:

    The indices

    The coordinates

    The detector xd, yd coordinates in millimetres from the centre of the pattern.

    The partiality

    For a fully recorded spot the message 'fully recorded' is given. For a partial the partiality is given and the offset from the current image of the start image for the spot is indicated. 'Wide' or 'Cusp' partials are flagged as such.

    The selected spot is marked by a surrounding red circle on the display area (black on a monochrome display). The selection may be removed by clicking Button1 when the cursor is within the display area but not pointing to a spot. When Button1 is pressed, the nearest spot to the cursor is selected provided that the distance squared (pixels) to the spot is no more than 18.

    The spot details are also listed when a spot is labelled.

    Labelling Spots

    Providing that one of the labelling options has been selected via the 'Labels' choice menu, spots may be labelled on the plot. The labels are positioned under user control.

    Hard Copy

    To get a hard copy plot in the form of a Postcript file, select the panel button marked PS in the hard copy request area at the top of the view object. A question and answer sequence is then followed using a panel i/o item to the right of the PS button.

    THE ANALYSE DATA OPTION

    The 'Analyse Data' option enables the prediction of the reflections which would be recorded for the defined crystal sets and to analyse the data coverage in terms of the unique data for the space group, cell and resolution. The analysis may be done for either the current crystal set or for all crystal sets within the data set. The results may be presented in the form or histograms describing the data coverage or in terms of a pictorial representation of the reciprocal lattice sections. The analysis results equivalent to those displayed in the histograms are also written to the log file. The analyses automatically written to the log file exclude any spatially overlapped reflections.

    When the analysis is initiated, the program first calculates a list of the unique reflections for the spacegroup and cell based on the resolution of the first crystal set defined. The program outputs a message for each crystal set for which predictions are being done. If there is more than one image in the set, then, a progress bar will be displayed to indicate the progess of the predictions throughout the images of the set. A cancel button is also displayed in case the user wishes to abandon the analysis before it has been completed.

    The results may be presented in the form or histograms describing the data coverage or in terms of a pictorial representation of the reciprocal lattice sections.

    Reciprocal Lattice Plot

    This option enables the presentation of the results in the form of a pictorial representation of the reciprocal lattice and the extent of coverage by the predicted data. A specially written XDL_VIEW object is used to display, in pictorial form, the coverage of the unique part of the reciprocal lattice by the currently predicted data. The main display area shows a single section of the reciprocal lattice at a time showing which reflections are part of the unique area of the reciprocal lattice and which of these reflections have been predicted or observed. Different categories of reflections e.g. fulls and/or partials may be included in the plot and, where appropriate, merged or unmerged anomalous data pairs may be indicated. Spots predicted as spatial overlaps may be included or excluded as desired. Spots which are classified as unknown full/partial (e.g. derived from a merged dataset) are included in the display as fully recorded (and non-spatially overlapped) spots. If anomalous separated data is displayed then these spots may also be of unknown sign (see below for colour coding). The user may change the section displayed using the 'Up' or 'Down' buttons or the slider provided. Alternatively there is an option to cycle automatically through the sections. In all cases the section axis is along 'l'. On the l=0 section the a* and b* axes are displayed. Two forms of hard-copy Postscript plots may be produced; one is basically a copy of the currently displayed plot and the other enables plots of all the reciprocal lattice layers (at a selected interval if required) in a more compact format with nine sections being output on each page.

    Figure 4. Example of 'Show Unique Coverage' View-object

    The points on the unique part of the reciprocal lattice are marked by small greenish dots for those spots which have not been predicted/measured. Where anomalous data are merged, all predicted/measured reflections are represented by yellow dots. Where the anomalous data are to be separated the following colour coding is used.

           yellow:    Both an I+ and an I- reflection are present.
           red:       Only the I+ reflection is present.
           blue:      Only the I- reflection is present.
           white :    Unknown sign (i.e. both I+ and I- are not present
                      though I+ or I- may be present in addition to
                      measurements flagged as being of unknown sign.
    

    Graphical Plots

    Three type of graphical plot may be produced. A 'Partials Toggle' selects which, if any, partial reflections are to be included in the analyses. The following choices are available: The Overlaps Toggle indicates whether spatially overlapped reflections are to be excluded from (the default) or included in the analyses.

    All the plots currently available are plots against resolution. The resolution range, from infinity to the resolution limit defined for the first crystal set, is divided into ten equal bins of 4.sin**2(theta)/lambda**2. The three plots are as follows:

    1. Unique Data

      This plot shows the percentage of coverage of the unique data within each resolution bin. Where partials are included two lines are drawn, a blue one indicating the coverage for the full reflections plus the included partials and a red one indicating the coverage for the full reflections only. The overall percentage coverage for each of these cases is given at the top of the plot. Where no partials are included a blue line indicates the coverage by the fulls data and the overall coverage by the fulls data is given at the top of the plot.

      Figure 5. Example of a Unique Data Coverage Graph

    2. Acentric Pairs This plot shows the percentage coverage of the unique acentric data within each resolution bin. A reflection must be present for each mate of a Bijvoet pair to be included. Where partials are included in the analysis two lines are drawn, a blue one indicating the coverage for the full reflections plus the included partials and a red one indicating the coverage for the full reflections only. The overall percentage coverage for each of these cases is given at the top of the plot. Where no partials are included a blue line indicates the coverage by the fulls data and the overall coverage by the fulls data is given at the top of the plot.

    3. Multiplicity

      This plot shows the average reflection measurement multiplicity within each resolution bin. Where partials are included in the analysis two lines are drawn, a blue one indicating the multiplicity for the full reflections plus the included partials and a red one indicating the coverage for the full reflections only. The overall average multiplicity for each of these cases is given at the top of the plot. Where no partials are included a blue line indicates the average multiplicity of the fulls data and the overall average multiplicity of the fulls data is given at the top of the plot.

    The analyses automatically written to the log file exclude any spatially overlapped reflections. If the user also wishes to have analyses with the spatially overlapped reflections included, then these must be specifically requested.

    THE LOGFILE

    When the program ROTGEN is run, a log file is normally written.

    When a new parameters file is read in, the values of the keyworded parameters are written to the log file.

    When a data analysis has been carried out, then any keyworded parameter values, which have been changed since reading in a new parameters file or since the previous analysis, are written to the log file. Three analyses tables are output in a form which may be accessed by the CCP4 'xloggraph' program if desired. These are for unique data coverage, acentric pairs coverage and reflection multiplicity. All are shown as functions of resolution in 10 resolution bins. These analyses exclude spatially overlapped reflections.

    Analogous analyses including spatially overlapped reflections will only be written to the log file if this was specifically requested when examining the analysis results in ROTGEN.

    When the program is terminated, the current values of the keyworded parameters are written to the log file.

    The use of the 'Rotation Simulations' option does not result in any additional log file output.

    SUMMARY OF KEYWORDED PARAMETERS

    This section gives a brief summary of the parameters available; a more detailed specification follows in the next section. Keywords followed by a pair of brackets [] may have separate values for each crystal set within the dataset if required.
    General, Crystal System and Alignment
    

    Title TITLE A title for the dataset.

    No. crystal sets NUMSETS Number of crystal sets defined within this dataset.

    Crystal system SYSTEM The crystal system Tri, Mon, Ort, Tet, Hex, Rho or Cub.

    Lattice type LATTICE Lattice type P, A, B, C, I, F or R.

    Crystal symmetry SYMMETRY The space group symmetry followed by the space group number, space group name or symmetry operators (or 'clear' to clear the current symmetry).

    Cell, Resolution, Wavelength and Orientation Parameters

    Cell A[], B[], C[], ALPHA[], BETA[], GAMMA[]

    The cell parameters in Angstroms and degrees.

    Resolution RESOLUTION[] The resolution limit in Angstroms.

    Wavelength WAVELENGTH[] The wavelength in Angstroms.

    U-matrix UMATRIX[] The basic 'U' setting matrix (9 values).

    Missetting angles PHI1[], PHI[2], PHI3[]

    The misseting angles in degrees.

    The Rotation Ranges, Mosaicity and Spot Sizes

    Rotation start ROTSTART[] Rotation start angle in degrees.

    Oscillation range OSCRANGE[] Oscillation range in degrees (+ve).

    No. of images NUMIMG[] No. of images to collect.

    Partials limit NWMAX[] Only consider partials occurring on up to this number of images.

    Mosaicity MOSAICITY[] The mosaic spread in degrees.

    Spot size SPOT_SIZE[] The spot diameter in mm.

    Detector Parameters

    Distance DISTANCE[] The crystal to detector distance in mm.

    Rmin RMIN[] Minimum radius on detector in mm.

    Rmax RMAX[] Maximum radius on detector in mm.

    Limits XMIN[], XMAX[], YMIN[], YMAX[]

    Detector limits on 'x' and 'y' from pattern centre (mm.).

    Orientation DET_ROTATIONS[] Directions of three orthogonal detector rotation axes.

    Axes DET_AXES[] Detector axis vectors

    Horizontal axis IAX_H[] Horizontal axis number 1-3.

    vertical axis IAX_V[] Vertical axis number 1-3.

    Beam vector BEAM_VECTOR[] Beam vector.

    Scan axis SCAN_AXIS[] Rotation axis vector.

    Other Source Parameters

    Synchrotron SYNCHROTRON[] Synchrotron - yes or no.

    Dispersion DISPERSION[] The dispersion delta(lambda)/lambda.

    Vertical divrg. DIVV[] Vertical divergence in degrees.

    Horizontal divrg. DIVH[] Horizontal divergence in degrees.

    Corr. dispersion DELCOR[] Correlated dispersion.

    REFERENCES

    Campbell, J.W. "XDL_VIEW, an X-windows-based toolkit for crystallographic and other applications" J. Appl. Cryst. (1995) 28 236-242

    Campbell, J.W., Clifton, I.J., Harding, M.M. and Hao, Q., "The Laue Data Module (LDM) - a software development for Laue X-ray diffraction data processing" J. Appl. Cryst. (1995) 28 635-640

    Collaborative Computational Project, Number 4 "The CCP4 Suite: Programs for Protein Crystallography" Acta Cryst. (1994) D50 760-763

    Helliwell J.R., Habash J., Cruickshank D.W.J., Harding M.M., Greenhough T.J., Campbell J.W., Clifton I.J., Elder M., Machin P.A., Papiz M.Z. and Zurek S. "The Recording and Analysis of Synchrotron X-radiation Laue Diffraction Photographs" J. Appl. Cryst. (1989) 22 483-497

    Kinder S.H., McSweeney S.M. and Duke E.M.H. "PXGEN: A general purpose graphical user interface for protein crystallography experimental control and data acquisition" J. Appl. Cryst. (1996) submitted for publication.

    Leslie A.G.W. In CCP4 and ESF-EACBM Newsletter on Protein Crystallography (1992) No. 26, DRAL Daresbury Laboratory, Warrington, WA4 4AD, England

    Messerschmidt A. and Pflugrath J.W. "Crystal orientation and X-ray pattern prediction routines for area detector diffractometer systems in macromolecular crystallography" J. Appl. Cryst. (1987) 20 306-315

    Wonacott A.J., Dockerill S. and Brick P. "MOSFLM program" (1980) Unpublished Notes.

    Back to Contents....