**COMBINE: Combining multiple MAD and MIR datasets**

Combining multiple MAD or MIR datasets is easy with SOLVE. You simply read in one dataset, scale and analyze it, then you give SOLVE the keyword "NEW_DATASET" and go on and read in the next dataset, scale and analyze it. When all datasets are input, you tell SOLVE to go ahead and solve the combined datasets with the command "COMBINE_ALL_DATA", followed by "SOLVE" as usual.

When combining datasets, SOLVE first converts MAD datasets to pseudo-MIR + anomalous scattering (i.e., native + 1 derivative + anomalous differences). Then SOLVE uses the first native dataset as the native. It treats the derivatives associated with that native as derivatives in the usual way. SOLVE treats the native for the other datasets as "derivatives" without heavy atoms, and the derivatives for these datasets as ordinary derivatives.

When the COMBINE command is used, SOLVE writes out individual script files (e.g., solve_mad_01.script) that could be used to analyze the individual datasets, then a final script file (solve_combine.script) that can be used to analyze them all together.

SOLVE takes into account any non-isomorphisms among the different datasets by using Bayesian correlated phasing. This phasing method automatically corrects for non-isomorphism that is shared among a group of derivatives (or in this case derivatives and pseudo-derivatives).

NOTE: Unfortunately COMBINE cannot be used with multiple mtz files.
If you have mtz data and want to use COMBINE you will need to dump your
data out to a flat file and read it in using "readformatted".