Notes calculating electron density maps from native data
and derivative data (MIR) using CNS.

(input files for this example are on hermione in /home/dave/cns_examples/MIR_phase_L9)

Things you need:

1) native x-ray data;  2) derivative x-ray data; and
3) you must know the coordinates of your heavy atoms, usually obtained
by solving the Patterson map.

First run merge.inp to merge the native and derivative data
into one hkl file:   cns_solve < merge.inp > merge.log &

Next, run scale.inp to scale the native and derivative data:
    cns_solve < scale.inp > scale.log &

Heavy atom coordinates go into ".sdb" files
(see iod.sdb as an example, containing L9 iodine coordinates).

Next, run "ir_phase.inp" to calculate the phase for each reflection:
     cns_solve < ir_phase.inp > ir_phase.log &

Output from ir_phase is a new file called  "ir_phase.hkl" which
contains a phase (described by Henderson-Lattmann coefficients) to go
with each observed reflection.

The "ir_phase.hkl" file serves as input to "fourier_map_mir.inp", which
is used to calculate an electron density map.

The electron density map can be improved by solvent flatteining.
To run the solvent flattening program:

    cns_solve < density_modify.inp > density_modify.log &

Output is a new file with modified phase values called  "density_modify.hkl" which contains
a new phase (described by Henderson-Lattmann values) to go with each observed reflection.

Also, a solvent flattened electron density map is output (called "density_modify.map").

Solvent flattened MIR map for L9, using CNS.

Working examples of "merge.inp", "scale.inp", "ir_phase.inp" and
"fourier_map.inp" and "density_modify.inp"  can be found on hermione in

       /home/dave/cns_examples/MIR_phase_L9/

You can copy the files into your own directory if you want to run them. The required native
and derivative data sets, and heavy atom positions, are also in this same directory.

Also see the file "dave_notes_mir" in the same directory on hermione.