 ICM Manual v.3.8
by Ruben Abagyan,Eugene Raush and Max Totrov
Jun 20 2021

 Prev ICM Language Reference Maps and factors Next

# How to manipulate with structure factors

The basic description of structure factors is given in the Glossary.

# How to calculate phases of reflections given a 3D model and a cell

Basic steps:
• define crystallographic cell, map gridstep, and resolution (i.e. max h,k and l)
• build electron density map with the specified parameters
• calculate structure factors

Example:
```
myCell   = Cell(a_1.)
gridstep = 0.5
# map dimensions
maxHKL = Iarray(0.45 * myCell[1:3]/gridstep)
defSymGroup = 19  # P212121 group
make map gridstep
make factor maxHKL "mySF"
fcalc = Sqrt( mySF.ac * mySF.ac + mySF.bc * mySF.bc )
phase = Atan2(mySF.bc , mySF.ac)
group table mySF phase
show mySF
```

In order to compare calculated phases I would recommend using the same factor table when calculating the _second_ set of phases. Then "ac" and "bc" columns will be simply replaced by the new calculated data, and new "phase2" column would be right next to the "phase" column, relating to the original object. In addition to the previous script:
```
myCell   = Cell(a_1.)
gridstep = 0.5
maxHKL = Iarray(0.45 * myCell[1:3]/gridstep)
defSymGroup = 19 # Symgroup("P 21 21 21")
make map "myMap" gridstep
make factor maxHKL "mySF"
phase = Atan2(mySF.bc , mySF.ac)
# ... now the 2nd object ...
read pdb "1crn"	      # the second PDB, not 1crn, of course
superimpose a_1. a_2.
# you may need an alignment, see superimpose
make map cell "myMap" gridstep myCell     # to have the same cell!
make factor maxHKL "mySF"
phase2 = Atan2(mySF.bc , mySF.ac)
delta = Remainder(phase2-phase , 360.0)
group table mySF phase phase2 delta  # maybe something else
show mySF
```

# How to automatically place a fragment into density

This section needs to be written. Make maps, set GRID.margin to about the size of the ligand and run montecarlo.

 PrevBuild helix HomeUp NextPlotting