convert2mtz

Kathryn Cowtan, University of York, March 2007

Download Linux x86 binary (right-click Save As).
Download OSX PPC binary (right-click Save As).
Download OSX x86 binary (right-click Save As).

Convert CNS or other formatted reflection data files to MTZ. Columns are identified automatically using names specified in the file or on the command line. A full set of CCP4 FreeR_flag information is generated, using existing flags if available. Data is completed to the resolution limit, unless you specify -no-complete. Cell and spacegroup information may be specified or taken from a pdb file. Anomalous data is merged automatically.

Update: May now convert SHELX free flags correctly (untested).

Examples:

CNS files

convert2mtz -hklin test.hkl -cell 50.9,50.9,121.4 -spacegroup 96
convert2mtz -hklin test.hkl -cell "50.9  50.9  121.4 90  90  90" -spacegroup "P 43 21 2"
convert2mtz -hklin test.hkl -cell "50.9  50.9  121.4 90  90  90" -spacegroup "P 43 21 2" -no-complete
convert2mtz -hklin test.hkl -pdbin test.pdb
If the file has incomplete header records for column declaration, you can also specify -colin.

PHS files

convert2mtz -hklin test.phs -cell 50.9,50.9,121.4 -spacegroup 96 -colin "FO FC PHI"
convert2mtz -hklin test.phs -cell 50.9,50.9,121.4 -spacegroup 96 -colin "FO FOM PHI"
convert2mtz -hklin test.phs -cell 50.9,50.9,121.4 -spacegroup 96 -colin "FO FOM PHI SIG"
convert2mtz -hklin test.phs -cell 50.9,50.9,121.4 -spacegroup 96 -colin FO,FOM,PHI,A,B,C,D
Change -colin according to the columns actually present in the file.

SHELX HKL files (limited support)

convert2mtz may work for SHELX HKL files, however it has some limitations. Firstly, if any number is wide enough to completely fill a column in the file, the program will fail. Secondly, multiple measurements of the same reflection (or its symmetry equivalents) are not merged - all but the last value are discarded.
convert2mtz -hklin test.hkl -cell 50.9,50.9,121.4 -spacegroup 96 -colin "I SIGI FREE"
convert2mtz -hklin test.hkl -cell 50.9,50.9,121.4 -spacegroup 96 -colin I,SIGI,FREE
convert2mtz -hklin test.hkl -cell 50.9,50.9,121.4 -spacegroup 96 -colin F,SIGF
If the file contains Friedel opposites, you can also specify -anomalous.
If you often convert shelx files to MTZ, you could set up an alias, e.g. in Unix C-shell
alias shelx2mtz "convert2mtz -colin I,SIGI,FREE"