ABSURD (CCP4: Supported Program)


absurd - for initial processing of intensity files from MADNES


absurd madhkl foo_in.mtz hklout foo_out.mtz absin foo.clm plot foo.plt
[Keyworded input]


The program ABSURD is used for initial processing of intensity files created by the FAST data collection program MADNES. It can apply an absorption correction measured by direct-beam attenuation, it will reduce the indices to the asymmetric unit of the Laue group, and batch the data for further scaling and merging. The output is a multi-record MTZ file containing orientation blocks with the crystal and goniostat information: this file is suitable for input to SCALA for scaling/merging, after sorting by SORTMTZ.

The input intensity file(s) may be either the INTFIL output from Madnes itself (eg using Eval 6) (see FILE keyword), or the binary unmerged file from PROCOR (see UFILE keyword): in the latter case, a corresponding Madnes savefile must be read as well.


The various data control lines are identified by keywords with those available being:


ABSCOR [ <filename> ] [ <keywords> ]

Apply absorption correction from direct-beam attenuation measurements. The absorption data taken from a file created by MADNES: if no filename is given, the program expects an assignment to logical name ABSIN. The absorption data are smoothed using spherical harmonic coefficients, forcing the surface to be centrosymmetric, since reversal of the direction of the beam should not change the absorption. Deviations from symmetry can be caused by misalignment of the X-ray beam relative to the rotation axis: this causes spuriously high transmission where the beam misses the crystal. Such regions may be omitted from the fitting, since each point on the centrosymmetric surface is determined twice, see OMIT option below. Individual bad measurements may be omitted by setting their intensity to a neagtive value in the input file: note that the program assumes that a value is present for each omega/phi position

The spherical harmonic coefficients which define the calculated surface, and the observed data are written out to a file filename.CLM. This can be processed into a form which can be viewed with Frodo (see below).

Keywords PLOT & NOPLOT control whether the observed and fitted absorption curves are plotted to a plotfile (logical name PLOT). The default is to plot them. The curves are expressed in the polar angles theta (latitude) and phi (longitude, not to be confused with the Eulerian or diffractometer angles phi), relative to the diffactometer Phi spindle. The observed values are plotted as a solid line (dashed for regions OMITted, see below).The calculated line is drawn dotted.

The keyword OMIT introduces one or more ranges of Phi to be omitted from the fitting. This may be used to exclude regions of the measured curves where the X-ray beam have missed the crystal. The Phi range may either be specified as the Eulerian angle Phi as output by Madnes (default, or keyword EULERIAN preceeding OMIT), or as the polar angle Phi as output by ABSURD (keyword POLAR preceeding OMIT). This second option allows the curve to be processed once, plotted, and a region to omit determined from the plot. In order to fit the curve, the PROCESS keyword must be used, so that the save data is read from the reflection input file. If you are just processing the absorption curve to check the fit, a Save file may be given instead of a reflection data file. Note that the OMIT keyword must follow all other keywords on the line, and is followed by one or more pairs of numbers giving the phi ranges.

Each ABSCOR command will cause the curve to be read & fitted when the next PROCESS command is read. This curve will then be used for all subsequent PROCESS commands until the next ABSCOR or NOABSCOR command.


Cancel application of absorption correction for subsequent files

SYMMETRY <space-group name | space-group number | symmetry>


Read the symmetry operations, specified as the name (eg P212121), the International Tables number, or as a series of SYMMETRY commands giving the symmetry operations (eg SYMMETRY X,Y,Z * -X,Y+1/2,-Z)

This last option is not recommended. The symmetry matrices are read from a standard file (logical name SYMOP), are printed, and are used to reduce the reflections to an asymmetric unit. The column M/ISYM in the output file contains the number of the symmetry operation used to do this, odd numbers correspond to +hkl, even numbers to Bijvoet-related reflections -hkl. The asymmetric unit is selected according to the rule printed out with the symmetry

FILE <filename>

Filename for input MADNES file. If this command is not given, data will be read from logical name MADHKL.

UFILE <filename>

Filename for binary input file from PROCOR. This is the PROFIT.HKL (INTOUT) file from Procor: it does not contain all the necessary information from Madnes, so if you are taking output from Procor into Absurd you must read a corresponding Madnes savefile.
 file Madnes_save_file
 ufile profit.hkl

SCALE <scale-factor>

Set output scale factor (default = 1.0). This can be adjusted to give intensities in a suitable range. Allowance may need to be made for scaling later in BEAMCOR or SCALA.

TITLE <title>

Set file title for output MTZ file.

BTITLE <title>

Set batch title for output MTZ file (defaults = file title TITLE)

BATCH <batch number> [ <maximum batch number> ]

Set BATCH number for output file. If the SPLIT option is used (qv), this will be the first batch number. Remember that batch numbers must be unique for all batches in an MTZ file. If several FILE & PROCESS commands follow a single BATCH command, all those input files will be assigned to the same batch. If you want different input files assigned to different batches, put a new BATCH command before each PROCESS command. Watch out if using the SPLIT option as well; batch numbers must be unique, and no check is made of this, so the starting batch number for each group must be sufficiently well separated. The optional maximum batch number may be used to avoid having a final batch with very few reflections in it.

ACCEPT n1 n2 n3 . . .

Set flags to accept reflections labelled with error flags n1,n2 etc (cf REJECT command below). MADNES sets a bit flag for each reflection for error conditions: this command (and REJECT) allow selection of which classes of reflection to accept. The flags are as follows:-
   Flag   Default        Error
  Number  Setting       Condition
     1    accept      Not found (ie weak)
     2    accept      On YMS edge
     3    accept      On ZMS edge
     4    accept      On Phi edge
     5    reject      Too far from YMS
     6    reject      Too far from ZMS
     7    reject      Too far from Phi
     8    reject      Too big in YMS
     9    reject      Too big in ZMS
    10    reject      Too big in Phi
    11    reject      Background bad
    12    reject      Background sd bad
    13    reject      Negative sd
    14    accept      Fobs <= 0.0
    15    reject      Bad pixels
    16    reject      Overflow

REJECT n1 n2 n3 . . .

Set flags to reject reflections labelled with error flags n1,n2 etc (cf ACCEPT command above).

LIMITS <Ymin> <Ymax> <Zmin> <Zmax>

Set limits on detector position Y,Z for reflection to be accepted This may be used to exclude reflections near the edge of the detector The default is not to check detector position

TOOFAR <Yshift> <Zshift> <Phishift>

Sets values for the maximum difference between calculated and observed position for a reflection to be accepted. Yshift and Zshift are in pixels, Phishift is in degrees. This may be used as an alternative to rejecting reflections using the too far flags set in Madnes. The default is not to check the difference in position.

CRYSTAL <crystal-number>

Set crystal number, a number defining a crystal which may contain a number of batches. This number is not currently used, but may be in future. The crystal number defaults to the first batch number.

SPLIT <psi-range>

Split data into ranges of rotation angle psi (== MADNES phi). This option should be used if the data are to be scaled with SCALA, ie they are treated as pseudo-rotation films for scaling. Each psi-range will be labelled as a different batch. If the data are to be scaled with BEAMCOR, this option should not be used.



Apply oblique incidence correction to data, to correct for absorption by air and by the black-paper window. This should be done if it has not been included in the non-uniformity correction (from June 1989 Phase1 onwards). If omitted, the parameters default to those for CuKalpha

air-absorption    [0.00108] absorption coefficient of air / mm
window-absorption [0.552]   absorption coefficient of window / mm
window-thickness  [0.1634]  thickness of window (mm)

REINDEX <reindexing-rule>

Reindex data, according to a matrix specified in a similar way to symmetry operations
eg reindex   k, h, -l
 reindex   h, -k, -h/2-l/2

Cell dimensions will be recalculated for the redefined cell. Be careful that the index transformation preserves the hand of the axes, ie that the matrix has a positive determinant. The program will not allow you to invert the hand (eg k,h,l is forbidden, k,h,-l is allowed). If the transformation leads to fractional indices for some cases (as in the 2nd example above), these reflections will be rejected. If the reindexing operations include translations, then the orientation data in the output file will not be strictly correct. Translations (eg h,k,l+1) can be useful if you have misindexed your crystal by eg 1 lattice point (usually along the spindle axis). However, in this case, you OUGHT to reprocess the data.



Process the currently-defined input file (from FILE command or logical name MADHKL).


The input files are

input Madnes intensity files, defined either as logical name MADHKL (as $ABSURD MADHKL file) or with a FILE command. Several files may be read into the same MTZ output file by a series of FILE & PROCESS commands (see example)

The output files are

HKLOUT      MTZ file output. Each batch has an orientation 
            block as defined in mtzlib.doc for area detectors. 
            The columns for each reflection are

    H K L       indices
    M/ISYM      symmetry number, ie number of the 
                Laue-group matrix used to reduce 
                this reflection to the asymmetric unit
    BATCH       batch number
    I, SIGI     intensity and standard deviation
    IERROR      error flag from Madnes
    TIME        accumulated exposure time in minutes
    XDET,YDET   detector coordinates of reflection (pixels)
                XDET = Yms, YDET = Zms (ie Mosflm convention)
    ROT         rotation angle (degrees)

This file must be sorted on H K L M/ISYM BATCH before processing by BEAMCOR or SCALA. Several files may be sorted together by SORTMTZ.

ABSIN.CLM  if the ABSCOR option is used, file containing 
           spherical harmonic coefficients and observed 
           absorption data. See below for further processing 
           of this file. 

      The file contains:-

 line 1: LMAX, LORD, NCLM, CUT

    LMAX =    maximum order of spherical harmonics
    LORD = 2  for centro-symmetric surface (always)
    NCLM =    number of coefficients
    CUT  =    standard deviation cutoff for observations

 line 2,3: NCLM coefficients

 rest of file:  

theta, phi, reject-flag, relative observed intensity,
observed intensity, calculated intensity


The program ABSTOFRODO reads the file absin.CLM created by ABSURD. The spherical harmonic coefficients which give the fitted absorption surface are used to generate a map of the calculated surface (logical name MAPOUT): this can be contoured by Frodo, with a contour level of 0.125. The program also writes the relative observed intensities of the absorption measurements to a file of pseudo-atoms, in Brookhaven format (logical name XYZOUT). These may then be displayed on top of the contoured calculated surface in Frodo.

The program takes one line of input, a title for the output map (see example)


absurd    hklout junk     plot absplot  << eof
TITLE This is the overall title for the file
ABSCOR abscurve.dat  PLOT   POLAR OMIT -70 +20
# Abscurve.dat is the file written by Madnes>Det>abscol
# Process three files in succession. The absorption
# correction applies to all 3  
# (unless there is another ABSCOR command)
FILE mmndump1_001.dat
BTITLE  Crystal 1, run 1  # this title is for this batch only
FILE mmndump1_002.dat
BTITLE  Crystal 1, run 2
FILE mmndump1_003.dat
BTITLE  Crystal 1, run 3
# Send plotfile to plotter
pltdev  absplot.plt

   A VMS example

$ absurd hklout x12_absd plot x12plot
TITLE  RBP x12 3.3A with absorption correction, Q85C + MeHg
BTITLE x12 rotated about arbitrary axis, 3.3A
FILE  x12_b_001
FILE  x12_c_001
FILE  x12_c_002
$ laserprint /port=laser4port /plot x12plot.plt
$ sort: sortmtz hklin x12_absd hklout x12_absd_s -
             H K L M/ISYM BATCH
/lims on dx,dy (mm), phi,chi,omega


MTZ version May 1991 Phil Evans