**cphasematch**
- Calculate agreement between phase sets, allowing for possible origin differences

**cphasematch**
**-mtzin** *filename*
**-mtzout** *filename*
**-colin-fo** *colpath*
**-colin-hl-1** *colpath*
**-colin-phifom-1** *colpath*
**-colin-fc-1** *colpath*
**-colin-hl-2** *colpath*
**-colin-phifom-2** *colpath*
**-colin-fc-2** *colpath*
**-colout** *colpath*
**-resolution-bins** *number-of-bins*
**-no-origin-hand**
**[-stdin] **

[Keyworded input]

'cphasematch' will calculate the agreement between two phase sets, represented either by a phase / figure of merit pair, or as a set of Hendrickson Lattman coefficients. By default, cphasematch will check for possible origin shifts between the two sets.

- -mtzin
- Input MTZ file containing the phase sets to be compared. These can be represented as a phase / figure of merit pair, or as a set of Hendrickson Lattman coefficients. These columns can be created from a set of atomic coordinates (i.e. a PDB file) by running csfcalc.
- -mtzout
- Output MTZ file containing, in addition to the input columns, phase information for the second phase set (HL coefficients, phi/fom, Fc depending on what was supplied) adjusted for any origin shift which has been applied.
- The FOMs for the input phase sets as a function of resolution.
- The mean phase difference between the sets as a function of resolution. This is given unweighted, weighted by the FOM of the first set, and weighted by the FOM of the second set.
- The correlation coefficient between the structure factor amplitudes of the first and second sets, weighted by the cosine of the phase difference, as a function of resolution. A second graph is included for normalised structure factor amplitudes (Es).
- Histogram of the input figures of merit, given for each phase set.
- The mean phase difference as a function of the input FOM, given for each phase set. In each case, this is compared with the arccosine of the input FOM which is an estimate of the mean phase error for that set. Thus, one can compare the phase difference between the two sets to the phase error of each set.
- <dphi>
- mean phase difference
- w1<dphi>
- mean phase difference weighted by the FOM of the first set
- wFcorr
- correlation coefficient between the structure factor amplitudes of the first and second sets, weighted by the cosine of the phase difference
- Qfom1
- Average ratio between the cosines of the phase difference and the phase error (latter from the FOM).

Specify the Fobs column in the input MTZ file, e.g. "*/*/[FP,SIGFP]"

Specify the Hendrickson Lattman coefficients for the first phase set, e.g. "*/*/[nat.ABCD.A,nat.ABCD.B,nat.ABCD.C,nat.ABCD.D]"

As an alternative to -colin-hl-1, specify the phase/FOM for the first phase set, e.g. "*/*/[nat.Phi_fom.phi,nat.Phi_fom.fom]"

As an alternative to -colin-hl-1 or -colin-phifom-1, specify an Fcalc/phi pair for the first phase set, e.g. "*/*/[nat.F_phi.F,nat.F_phi.phi]". The associated figure of merit is set to 0.9998.

Specify the Hendrickson Lattman coefficients for the second phase set.

As an alternative to -colin-hl-2, specify the phase/FOM for the second phase set.

As an alternative to -colin-hl-2 or -colin-phifom-2, specify an Fcalc/phi pair for the second phase set.

Default: "phasematch"

Specify the root of the output MTZ columns.

Default: 12

Specify the number of resolution bins for output statistics.

By default, cphasematch will check for possible origin shifts, and changes of hand. Use this option to turn off this behaviour.

Keywords may appear on the command line, or by specifying the '-stdin' flag, on standard input. In the latter case, one keyword is given per line and the '-' is optional, and the rest of the line is the argument of that keyword if required, so quoting is not used in this case. End input with <Ctrl-D> (END is not recognised).

The program outputs phase statistics as a function of resolution, and as a function of FOM. In general, figures of merit (FOM) should lie between 0 and 1, with higher values being better. Correlation coefficients should lie between 1 (perfect correlation) and -1 (perfect anti-correlation).

The following graphs are output:

Finally, the program gives overall average values for several quantities, calculated over the full dataset, including:

None known.

Kevin Cowtan, York.