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:
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.
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.
On Unix systems the sort is done using a sub-process running binsort which is used in a similar manner to the sort/merge routines used under VMS. The default memory size when distributed is 1 Mbyte, you may want to see if this has been increased for your system.
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. They all print the return value which caused the program to stop. They may indicate that you have run out of disc space or (in the Unix version) that there is some problem running binsort, possibly because it isn't on your path or an old version is; in this case, see binsort for further information such as how to make the sub-process verbose for debugging.
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
$ sortmtz HKLOUT test_out # # Sort order - this flag is optional # ASCEND # # Sort keys # H K L M/ISYM # # Input files # test_in_1.mtz test_in_2.mtz $
Orginator : P. J. Daly
Contact : Daresbury Laboratory