sortmtz hklout foo_out.mtz [ hklin foo_in.mtz
list of hklin files
The program SORTMTZ is used to sort and combine standard or multi-record type MTZ reflection data files on up to 5 keys in either ascending or descending order to the output file HKLOUT.
When using the program control data is expected from standard input in the FIXED order given below (please note that the END keyword is not supported for SORTMTZ):
The input files are the reflection data file(s) to be sorted in standard MTZ format. If HKLIN is assigned then only this file is used for input, otherwise the names of the input files are read as described in section DATA CONTROL CARDS.
If there is more than one input MTZ file, the header from the first input file is used as the basis for the output file. For unmerged files (a.k.a. multi-record files) the order of the symmetry operators in the MTZ file header is significant since it is used to determine the ISYM value in the M/ISYM column. This order needs to be consistent across all files, since only the first order is retained in the output file. SORTMTZ checks for this consistency and exits if there is a problem. In that case, run the input files through REINDEX with the SYMM keyword set to the file spacegroup, and the operators and ISYM values will be set to the standard order.
For the purposes of sorting the missing number flag is temporarily altered to a large negative number. The columns H, K and L should never have a missing number flag, so this will only have an effect when sorting on other columns. The program will abort if there is a datum that is more negative than this temporary missing number flag. Note that in a multi-record file there should be no missing reflections.
The output file is the sorted reflection data in MTZ format. The missing number flag for the output file will be the same as that for the first input file or the default NaN. The missing number flags for the input files need not necessarily be the same.
The printer output gives the following information (not necessarily in the order given):
The messages below are errors detected from the return value of the sort routines. They will prevent SORTMTZ from continuing but the error should be sought in the sort routines themselves.
The program SORTMTZ was developed from the program SORTLCF in a workshop in Cambridge in May, 1991. The move from LCF to MTZ files is part of the cunning CCP4/EACBM master plan to improve the software for protein crystallography.
sortmtz HKLIN test_in HKLOUT test_out << EOF-sortmtz # # Sort keys since default keys are H K L # H K L M/ISYM EOF-sortmtz
sortmtz HKLOUT test_out << EOF-sortmtz # # Sort order - this flag is optional # ASCEND # # Sort keys # H K L M/ISYM # # Input files # test_in_1.mtz test_in_2.mtz EOF-sortmtz
Orginator : P. J. Daly
Contact : Daresbury Laboratory