XDS.INP is a user-provided file that is read by XDS. Each line consists of one or more <keyword>=<parameter(s)> pairs. Anything after a "!" is a comment.
Complete documentation is at http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xds_parameters.html .
Templates for various detectors are at http://www.mpimf-heidelberg.mpg.de/~kabsch/xds/html_doc/xds_prepare.html .
A small and expandable script to generate XDS.INP is called generate_XDS.INP .
- 1 Required keywords
- 2 Keywords that additionally describe your experiment
- 3 Keywords for space group assignment
- 4 Keywords which affect completeness and resolution limits
- 5 Keywords which affect aspects of geometry parameter refinement
- 6 Keywords which affect whether indexing will succeed
- 7 Keywords which affect the speed of data reduction
- 8 How to tweak data quality
- 9 What can go wrong with this file?
- 10 Example XDS.INP files for ADSC, MarCCD and Pilatus detectors
These keywords have no default parameters and must be given with the correct values.
The values may be obtained from logfiles of the beamline software, your notes, or (for many types of frames) from the headers of the frames (using 'strings <filename>|more'). A good way to retrieve them is by using MOSFLM.
A minimal XDS.INP needs at least these keywords and their parameters:
- Keywords that describe the detector:
DETECTOR NX NY QX QY - for a list of supported detectors and possible geometries, see Table of supported detectors
DIRECTION_OF_DETECTOR_X-AXIS - often 1 0 0
DIRECTION_OF_DETECTOR_Y-AXIS - often 0 1 0
INCIDENT_BEAM_DIRECTION - often 0 0 1
ROTATION_AXIS - often 1 0 0 at a synchrotron
- Keywords that describe your particular dataset:
DETECTOR_DISTANCE - in millimeters
OSCILLATION_RANGE - in degrees
X-RAY_WAVELENGTH - in Ångström
NAME_TEMPLATE_OF_DATA_FRAMES - path and name of frames, with wildcards for numbers, plus type of frames (e.g. "CBF")
DATA_RANGE - numbers of frames to be processed. Missing frames will be ignored (thus if you want certain frames to not be processed, just change their name e.g. by appending a .x to their name - the Unix rename command is handy for this).
BACKGROUND_RANGE - numbers of frames to be used for initial background estimation, "1 5" is usually enough, and "1 20" should be ample.
Keywords that additionally describe your experiment
FRACTION_OF_POLARIZATION and POLARIZATION_PLANE_NORMAL should be specified for detectors at synchrotron sites. If they are not specified (or inaccurate), their effect will to some extent be absorbed by the scale factors determined in CORRECT.
Keywords for space group assignment
A dataset with unknown space group can be reduced by XDS in space group P1. The decision about the possible space group(s) is then deferred until the CORRECT step. If you know the space group and unit cell parameters of your crystal you just need these two keywords:
- If you don't know the space group, put a 0 or comment out the line. The space group will then be automatically determined in the CORRECT step. A mapping of space group names against their numbers is available from IDXREF.LP and CORRECT.LP.
- If you don't know the space group (and thus use SPACE_GROUP_NUMBER=0) and cell parameters, put six arbitrary numbers or comment out the line. Unit cell parameters need to respect the constraints of the Laue group, e.g. all angles must be exactly 90.0 for orthorhombic and tetragonal space groups, a and b must be equal for trigonal and tetragonal, and so on.
If you want to assign a space group and unit cell parameters to a dataset that was reduced in P1, you just have to put that space group and those unit cell parameters into XDS.INP, and re-run CORRECT.
If the space group is given as 0, the file REMOVE.HKL is not used!
Keywords which affect completeness and resolution limits
- The default is "0.00 1.05" but if you have a square detector, and their are reflections visible in the corners, you may go as high as "0. 1.4142". Depending on the symmetry of your crystal, this may give you useful high-resolution data. If you change the values, you'll have to re-run INIT and DEFPIX to make INTEGRATE use the changed region. IDXREF however does not require re-running of INIT, so if you just want to exclude the high-resolution reflections from indexing, it is enough to change TRUSTED_REGION and then to run the IDXREF step.
- the default is "7000. 30000." but the first number is probably on the low side. See Determining_VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS.
- the default of 0.05 is good. A lower value increases completeness. See MINIMUM_ZETA.
- the default is "20.0 0.0" but it would be good to change this to sensible values for your data set, e.g. 50.0 for the lower resolution limit and the limiting resolution, where the average signal-to-noise ratio drops below 1, for the upper limit (the latter number could be obtained from CORRECT.LP).
- to exclude reflections in ice rings (CORRECT step). Whether ice rings are a problem should be obvious by looking at individual frames (often later frames are affected more than earlier ones), FRAME.pck and the "alien" statistics at the end of CORRECT.LP. Also see Wishlist, and VIEW misfits.pck (produced by XDSSTAT).
Keywords which affect aspects of geometry parameter refinement
- The default (REFINE(IDXREF)=POSITION BEAM ORIENTATION CELL AXIS i.e. refine everything) could be used, but only if COLSPOT has seen all (or rather, a significant fraction of the) frames (see SPOT_RANGE below). If only a small SPOT_RANGE was used (which is not the best way, but possible), one should use REFINE(IDXREF)= AXIS BEAM ORIENTATION CELL . This is also a good choice because at modern beam lines the distance should be accurately known.
- The defaults (REFINE(INTEGRATE)= POSITION BEAM ORIENTATION CELL) could be modified by omitting POSITION, because one should assume that the distance is constant. This is particularly recommended if SPACE_GROUP_NUMBER=0 or 1. Furthermore, by fixing the distance one can better see from the results of the refinement whether the cell parameters are stable, or whether they change due to radiation damage. An even more robust way is to omit CELL instead of POSITION. There are situations when one wants to reduce the number of parameters to be refined even more, see Optimization.
- The defaults (REFINE(CORRECT)= POSITION BEAM ORIENTATION CELL AXIS i.e. refine everything) are OK. For low resolution datasets the distance refinement may not be stable (i.e. refined distance differs more than a few mm from expected distance). In this case one should remove POSITION from the list. If that is the case, one should also not refine POSITION in IDXREF and INTEGRATE.
Keywords which affect whether indexing will succeed
Again, the most important parameters are ORGX ORGY. Often the software which writes the frames puts these numbers into the headers of the frames. However, these numbers are sometimes wrong, which is why old versions of XDS did not read and interpret headers of frames at all (update: since 2009 XDS tries to extract NX NY QX QY from the header, but nothing else). How to obtain estimates for ORGX ORGY from frames is described in Obtaining ORGX ORGY.
- If this line is omitted (and SECONDS=0), the whole DATA_RANGE is used. This is usually a good way to proceed. If there is radiation damage, I would advise to use the first half of the DATA_RANGE as SPOT_RANGE. The SPOT_RANGE in principle may comprise a single frame.
Attention: if SECONDS= has a parameter >0, a small SPOT_RANGE will be used if SPOT_RANGE is not explicitly provided!
- the default is 3, but 4 may be more appropriate, to prevent many noise pixel from being picked up.
- the default is 6, but 3 is usually more appropriate for synchrotron data (small reflections). For Pilatus data, 2 or even 1 may be required.
- minimum pixel distance between spots (default: 6). This setting results in an upper limit to the longest primitive cell axis that IDXREF would find, so SEPMIN should be less than X-RAY_WAVELENGTH*DETECTOR_DISTANCE/(longest_primitive_cell_axis*QX). For Pilatus data one might need to lower this to 4 or even 2, for long axes. You can check what the longest permitted axis is, by taking the reciprocal of what is printed out in IDXREF.LP as the value of "MINIMUM ALLOWED DISTANCE BETWEEN REC. LATTICE POINTS".
- should be half of SEPMIN (or less); the default is 3. This should be an integral value, so for Pilatus one should use 2 or even 1.
See also the article Ice_rings.
Keywords which affect the speed of data reduction
- speeds up XDS by use of several (e.g. 2-4) CPUs within a single machine.
- speeds up XDS by chopping the DATA_RANGE into pieces, and feeding each piece to a new process. That process may run on the local machine, or a different one (but this needs to be configured by the system administrator). Unless specifically set up for a given computer environment (e.g., at a synchrotron site), usually don't set both MAXIMUM_NUMBER_OF_PROCESSORS and MAXIMUM_NUMBER_OF_JOBS to values >1 !
Some amount of "overcommiting of resources" is OK, i.e. if you are the sole user of a Dual-core workstation, you may set both parameters to 2. Wolfgang Kabsch found that this utilizes the machine even a bit better than either MAXIMUM_NUMBER_OF_PROCESSORS=2 or MAXIMUM_NUMBER_OF_JOBS=2.
See also: performance.
How to tweak data quality
What can go wrong with this file?
The most important possible pitfalls are:
- Lines longer than 80 characters are not allowed. This happens most often with the NAME_TEMPLATE_OF_DATA_FRAMES keyword line, because the path to the directory with the frames may be long. Fix: use a symlink to the directory with the frames.
- Error due to omitting the "=" directly after the keyword (i.e. having an intervening blank).
- There may be decoding errors in the parameter which may lead to obscure error messages. E.g., see what happens if you provide only one cell parameter instead of six!
Example XDS.INP files for ADSC, MarCCD and Pilatus detectors
Please note that the task of setting up these files may be simplified with the generate_XDS.INP script.
ADSC Quantum Q315r @ ESRF ID23-1
JOB=XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT ! for this experiment: ORGX= 1541 ORGY= 1550 DETECTOR_DISTANCE=350 OSCILLATION_RANGE=0.25 X-RAY_WAVELENGTH=1.0001 NAME_TEMPLATE_OF_DATA_FRAMES=../mk/mk04_1_???.img DATA_RANGE=1 720 SPOT_RANGE=1 360 ! SPOT_RANGE= first half of DATA_RANGE; that is ample BACKGROUND_RANGE=1 10 SPACE_GROUP_NUMBER=0 UNIT_CELL_CONSTANTS= 70 80 90 90 90 90 ! remove the exclamation marks if anomalous signal is present or expected ! FRIEDEL'S_LAW=FALSE ! STRICT_ABSORPTION_CORRECTION=TRUE ! but read Tips_and_Tricks in XDSwiki ! parameters with changes wrt default values: TRUSTED_REGION=0.00 1.35 VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS=7000. 30000. ! often 8000 is ok MINIMUM_ZETA=0.05 INCLUDE_RESOLUTION_RANGE=50 0 STRONG_PIXEL=6 REFINE(INTEGRATE)=CELL BEAM ORIENTATION ! parameters specifically for this detector and beamline: DETECTOR= ADSC MINIMUM_VALID_PIXEL_VALUE= 1 OVERLOAD= 65000 !NX= 3072 NY= 3072 QX= 0.10260 QY= 0.10260 ! XDS finds this out by itself DIRECTION_OF_DETECTOR_X-AXIS=1 0 0 DIRECTION_OF_DETECTOR_Y-AXIS=0 1 0 INCIDENT_BEAM_DIRECTION=0 0 1 ROTATION_AXIS=1 0 0 FRACTION_OF_POLARIZATION=0.98 POLARIZATION_PLANE_NORMAL=0 1 0
MarCDD (e.g. @ SLS, APS, ... )
JOB=XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT ! XPLAN ! for this experiment: ORGX=1533 ORGY=1536 ! if unknown estimate beam position visually using XDS-Viewer or adxv DETECTOR_DISTANCE=350 OSCILLATION_RANGE=0.25 X-RAY_WAVELENGTH=1.0001 NAME_TEMPLATE_OF_DATA_FRAMES=../mk/mk04_1_???.img DIRECT TIFF DATA_RANGE=1 720 SPOT_RANGE=1 360 ! for very accurate geometry determination use half of dataset BACKGROUND_RANGE=1 10 SPACE_GROUP_NUMBER=0 ! 0 if unknown, in that case UNIT_CELL_CONSTANTS do not matter UNIT_CELL_CONSTANTS= 70 80 90 90 90 90 ! remove the exclamation mark in next line if anom signal is expected/present ! FRIEDEL'S_LAW=FALSE ! STRICT_ABSORPTION_CORRECTION=TRUE ! usually no need to change - see Tips_and_Tricks in XDSwiki ! parameters with changes wrt default values: TRUSTED_REGION=0.00 1.35 ! take corners into account VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS=7000. 30000. ! often 8000 is ok MINIMUM_ZETA=0.05 ! integrate reflections close to rotation axis INCLUDE_RESOLUTION_RANGE=50 0 STRONG_PIXEL=6 REFINE(INTEGRATE)=CELL BEAM ORIENTATION ! parameters for this detector and beamline: DETECTOR=CCDCHESS MINIMUM_VALID_PIXEL_VALUE=1 OVERLOAD=65500 ! XDS picks up NX, NY, QX, QY automatically; possibilities are: !NX=3072 NY=3072 QX=0.073242 QY=0.073242 !MARCCD 225mm version !NX=2048 NY=2048 QX=0.079092 QY=0.079092 !MARCCD 165mm version !NX=4096 NY=4096 QX=0.079346 QY=0.079346 !MARCCD 325mm version !NX=4096 NY=4096 QX=0.073242 QY=0.073242 !MARCCD 300mm at APS (22-ID) DIRECTION_OF_DETECTOR_X-AXIS=1 0 0 DIRECTION_OF_DETECTOR_Y-AXIS=0 1 0 INCIDENT_BEAM_DIRECTION=0 0 1 ROTATION_AXIS=1 0 0 ! at e.g. SERCAT ID-22 this needs to be -1 0 0 FRACTION_OF_POLARIZATION=0.99 POLARIZATION_PLANE_NORMAL=0 1 0
Pilatus 6M @ SLS, BL X06SA
JOB=XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT ! for this experiment: ORGX=1330 ORGY=1321 DETECTOR_DISTANCE=550 OSCILLATION_RANGE=0.25 X-RAY_WAVELENGTH=1.0001 NAME_TEMPLATE_OF_DATA_FRAMES=../mk/mk04_1_0????.cbf CBF DATA_RANGE=1 720 SPOT_RANGE=1 720 BACKGROUND_RANGE=1 10 SPACE_GROUP_NUMBER=0 UNIT_CELL_CONSTANTS= 70 80 90 90 90 90 ! remove the exclamation marks if anom signal is present ! FRIEDEL'S_LAW=FALSE ! STRICT_ABSORPTION_CORRECTION=TRUE ! but read Tips_and_Tricks in XDSwiki ! parameters with changes wrt default values: TRUSTED_REGION=0.00 1.15 VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS=7000. 30000. ! often 8000 is ok MINIMUM_ZETA=0.05 INCLUDE_RESOLUTION_RANGE=50 0 STRONG_PIXEL=6 REFINE(INTEGRATE)=CELL BEAM ORIENTATION ! parameters specifically for this detector and beamline ! (e.g. for the PILATUS 6M, XDS picks up NX=2463 NY=2527 automatically) DETECTOR=PILATUS QX=0.172 QY=0.172 DIRECTION_OF_DETECTOR_X-AXIS=1 0 0 DIRECTION_OF_DETECTOR_Y-AXIS=0 1 0 INCIDENT_BEAM_DIRECTION=0 0 1 ROTATION_AXIS=1 0 0 FRACTION_OF_POLARIZATION=0.99 POLARIZATION_PLANE_NORMAL=0 1 0 SENSOR_THICKNESS=0.32 UNTRUSTED_RECTANGLE= 487 495 1 2527 ! these do not have to be specified UNTRUSTED_RECTANGLE= 981 989 1 2527 ! but it is better UNTRUSTED_RECTANGLE=1475 1483 1 2527 ! ... UNTRUSTED_RECTANGLE=1969 1977 1 2527 ! painstakingly checked KD 2012-01-14 UNTRUSTED_RECTANGLE= 1 2463 195 213 ! ... UNTRUSTED_RECTANGLE= 1 2463 407 425 ! ... UNTRUSTED_RECTANGLE= 1 2463 619 637 ! ... UNTRUSTED_RECTANGLE= 1 2463 831 849 ! ... UNTRUSTED_RECTANGLE= 1 2463 1043 1061 ! ... UNTRUSTED_RECTANGLE= 1 2463 1255 1273 ! ... UNTRUSTED_RECTANGLE= 1 2463 1467 1485 ! ... UNTRUSTED_RECTANGLE= 1 2463 1679 1697 ! ... UNTRUSTED_RECTANGLE= 1 2463 1891 1909 ! ... UNTRUSTED_RECTANGLE= 1 2463 2103 2121 ! ... UNTRUSTED_RECTANGLE= 1 2463 2315 2333 ! ... NUMBER_OF_PROFILE_GRID_POINTS_ALONG_ALPHA/BETA=13 !used by: INTEGRATE ! NUMBER_OF_PROFILE_GRID_POINTS_ALONG_GAMMA= 9 !used by: INTEGRATE