Electron density modifications

Electron density can be manipulated by any mean that will yield a more interpretable electron density map, leading towards a completly resolved 3-dimensional structure.

Most of the functions described here are made available via "main_config" utilities. Look below only if some extra "MAIN" programing is required and is not covered by in MAIN_DOC:1mol/1mol.html and MAIN_DOC:nmol/nmol.html.

USUALLY YOU DO NOT READ BELOW.

MAIN offers a map manipulation language, which allows you to do much more as can be possibly described here. If you want to master more than the usual essentials, you are advised to read the "MAKE MAP" commands from the "Reference manual".

Section "Solvent flattening" describes how to run the standard reals space procedure (Wang, ) and the fast one, which uses the Parseval's correlation theorem to calculate the molecular envelope in reciprocal space. Section "Electron density averaging" brings you essentialls of how to setup an electron density averaging procedure. Two procedures in two subsections are described. Subsection "Averaging of electron density: 2 molecules" explains a procedure within a single unit cell and is easy expandable to any number of equivelent density regions. Subsection "Averaging density between 2 different crystal forms" explains how to average electron density of two equal molecules in two different crystal forms. Section "Electron density combination" explains how and why combine different origin electron density maps in order to construct better maps. Its extension partial model refinement is described in chapter "Crystallographic refinement" in section "Partial model refinement".

Besides these there are some auxiliary sections, which help you to deal with certain concepts and tools connected with MAIN map manipulations. Section "Making envelopes" shows how envelopes can be constructed with MAIN. Section "Local histogram matching" introduces s short reciprocal space based histogram correlation procedure, which can be built in into any kind of map calculation. Section "Map concepts" gives insight into map structure and map manipulation command language. Section "Phase combination" describes how to combine phase combination into an electron density modification procedure using CCP4 package.

Map concepts

Molecular envelopes

In the case of proper averaging one molecular envelope (mask) suffices for all molecules, while for improper averaging the procedure should distinguish between different molecular areas. For this reason the concept of labeled masks was introduced by Bricogne. In MAIN this is solved by storing each molecule's mask in a separate map. Since on each map only a single operation can be performed at a time, there are no principle differences between improper and proper averaging procedures.

Crystal cell generation

The usual way to generate a complete crystal cell from an asymmetric unit was to write a procedure that applies the building rules. Building rules tell which grid point in a cell is equivalent to which one from the asymmetric unit. This approach has several drawbacks which can turn averaging (and solvent flattening as well) to a complicated procedure full of errors. First, for each different space group, different rules should be applied and second, in almost any space group it is possible to choose different definitions of an asymmetric unit. The third complication sometimes arises from differing numbers of grid points in a unit cell. These routines are, however, not available for every possible case and have to be, when necessary, programmed. Also when they are available their correctness should be verified for each single case. It happened quite often that there were whole empty layers left. At this point real problems may begin specially for an unskilled programmer. Therefore in MAIN another approach is applied: A crystal cell is generated from an asymmetric unit by applying crystal symmetry operations. The consequence of this generality is that there are no limitations on placement of an asymmetric unit and the routines work generally for any space group. Besides the asymetric unit may consist of several independent parts, each one stored in a separate map. The MAIN approach has also another advantage: since only empty points can be modified, there is no danger of having multiple density in certain regions.

Maps: enevelopes, density filled regions

A map is a 3-dimensional array of grid points, each with a value. According to the value, they are treated as empty, density or mask points. The grid points with values inside the density interval are the density points, the ones with values below the density interval are empty points, and the ones above are mask points. In the case of character*1 maps 0 is an empty point and 255 is a masked point. In the case of real*4 maps the empty points have values below -9999.0 and masked above 9999.0. The region inbetween comprises the density points.

Each map has size, starting coordinates and cell constants (cell constants are needed for transforming maps from differents cells). Grid points lying in different unit cells with the same fractional coordinates are identical. That means that, when a whole unit cell is defined in a map, the program can expand the density through the whole space.

There are 9 elementary operations types that can be done with maps:

The smallest map contains only a header where cell constants and crystal symmetry operations and number of grid points along the cell axes are stored. MAIN can read PROTEIN, X-PLOR and ASCII CCP4 as well as its own native formats of electron density maps. The maps can be written in Lyn Ten Eyck, X-PLOR and MAIN native formats. The native formats are ASCII files with record length 80 so that they can be edited and changed with a text editor. MAIN map files will be changed to unformatted, since some UNIX systems (Hewlett Packard and Silicon Graphics) cause problems when dealing with fixed length ASCII files. CONVEX FORTRAN causes however no problems. Besides a variety of smaller conversion programs were written to enable conversion of maps between PROTEIN, X-PLOR, P1SF, FRODO and native MAIN formats.

Operations on a map grid point can be applied when the point is empty or masked. (The exception is the SET command that can set a value to a grid point in any specified range.)

A new map can be created from an already existing one by taking its cell constants and size or from scratch. The map size, origin, and number of grid points per cell length and cell constants can be taken from an already existing map. The grid points are initialized to a specified value. The map origin and size can also be defined from an atom selection so that selected atoms plus some boundary grid points lie inside it.

Masked or empty points can be defined in several ways:

A map can be transformed (rotated, translated or copied) into the mask points of another map by linear interpolation. This is done so that the position of a mask point is transformed into the space of the map with density. The masked point density value is then obtained by interpolation from the eight surrounding grid points.

Electron density created from atoms can be added to density of a grid point or it can replace the value of an empty grid point. Empty points of a map can be filled with values of the density points of another map by applying crystal symmetry operations. This routine is independent of crystal symmetry. In order to find the position of the grid point into which the density value should be copied rotation matrices and translation vectors are applied.

Two maps at a time can be added or merged together. Adding differs from merging in the way, that only two equipositioned grid points having a density valu can be added together, while merging two maps allows scaling of both map contributions prior to their adding together. When a grid point has no density value its value taken from the other map.

Solvent flattening

It is assumed that the areas of the electron density map where protein lies have areas of greater positive electron density than the solvent areas. The solvent occupied areas inside the crystal have no rigid structure, so they can be `flattened' (all grids points in the solvent region obtain a single density value - usually zero). (B.C. Wang, Methods in Enzymology, 1985). Solvent flattening, when successfully applied, defines clear boundaries between solvent and protein regions and improves interpretability of an electron density map.

There are several variations of the score map calculations available. They can be performed either in real or reciprocal space using linear or gaussian distance dependent density or RMS deviations of density weighting. I recommand the use of WEIGHT GAUSSIAN.

First variables use later on throught the procedures are defined.


> set vari MAP_DENS = 1
> set vari MAP_FO = 2
> set vari MAP_FOFC = 3
> set vari MAP_2FOFC = 4
> set vari MAP_MASK = 5
> set vari SOLV_RAD = 8.0
> set vari HIST_TEMP = 0.0
> set vari SOLV_CUT 0.40

and symmetry operators read.


> read file>symm/c2.symm symm

The MAP_ variables assign different maps, SOV_RAD is the sphere radius, HIST_TEMP is the B value of the atom used for local histogram matching and SOLV_CUT is the proportion of the map that will be flattened.

You can either continue by reading an initial map


> read file ../prodef_mir.xmap map xpl
> read file ../refl/catl.fobs refl init resol  3.0 100. limit -99 0 -99

or calculating it from FOBS and MIR phases


> read file cell.dat cell
> read file ../refl/catl.fobs refl init resol  3.0 100. limit -99 0 -99
> set vari AGRID = 70
> set vari BGRID = 50
> set vari CGRID = 120
> make map MAP_DENS from 0 init 0 real grid AGRID BGRID CGRID cell
> make map MAP_DENS conv complex
> refl fill MAP_DENS defined
> four map map MAP_DENS back
> make map MAP_DENS rescale

and then create all neccessary maps for the solvent falttening procedure. It is assumed that the map 1 (MIR_MAP) contains the whole unit cell density. The MIR_MAP is here never altered in order to allow variations of paramaters during different runs. At each restart the MAP_DENS map density should be COPIED into the MAP_FO (2) map.


> make map MAP_FO from MAP_DENS init 9999 real cell copy
> make map 3 from MAP_DENS init -9999 real cell
> make map 4 from MAP_DENS init -9999 real cell

The real space procedure

The calculation can be significantly accelerated if only points in an asymmetric unit are solvent flattened, however the BOX should be at least one grid larger then the actual asymetric unit.


> make map MAP_MASK from MAP_FO init 9999 box 0 0 0 37 50 62

The procedure is faster then the original programs (Wang, Methods in Enzymology, 1985). The summ of density above the specified threshold value (CUT 0.0) at all grid points FROM map MAP_FO within the specified radius (SOLV_RAD) around the central point WEIGHTED LINEARLY by distance is stored into the equivalent central point in map MAP_MASK.


> make map MAP_MASK from MAP_FO cut 0.0 radi SOLV_RAD \
> weight linear

WEIGHT GAUSSIAN 2.0 replaces the linear weighting, it however introduces additional parameter: a gaussian sigma value exp( - dist**2 / radius**2 * sigma**2). The default sigma is 2.0.

An additional keyword RMS calculates instead of density its RMS deviations within the specified sphere (Abrahams Acta. Cryst. D52, 30-42, 1996).

The reciprocal space (fast) procedure

The difference between the standard solvent flattening procedure described by Wang and the herein described fast procedure is in the scrore map calculation. The standard procedure calculates the weighted sum of positive electron density within a sphere. The fast procedure is based on Parseval's theorem which allows to calculate the scoring map (basis of a molecular envelope) in reciprocal space. Fourier coefficients of the weighting scheme P1 map and Fourier coefficients of the positive parts of the map to be flattened are multiplied and then backtransformed. The resulting map is a score map: convolution of the weighting scheme and the posiive parts of the map (Leslie, Acta Cryst. A43, 134-136).

The fast procedure is not numerically identical to the standard one because of Foruier series truncation error, however, it is sufficiently accurate to be used. The major advantage of the fast procedure is that it is incomparable faster than the standard one. It can be performed interactively at a workstation display. Its speed is not sphere radius dependent.

WARNING: Accuracy of the reciprocal space procedure depends on the completness of the low resolution data. If substantial part of low resolution data is missing use the real space procedures only.

You can generate the Leslie's analytical structure factors for the convlution sphere directly


> reflect solv_flat SOLV_RAD

or use your own form of weighting scheme by generating its density via atoms. I recommand use of the GAUSSIAN form.

Initiate a unit cell with the density set to EMPTY and a density of an atom that is placed at coordinate system origin and which density FUNCTION uses LINEAR or GAUSSIAN distance dependance (1. - d / SOLV_RAD). Set the empty points to zero, Fourier transform the map and save its Fourier coeficients in the FWORKSET array.


> make map MAP_SOLV from MAP_FO init -9999  cell real
> make map MAP_SOLV atom function SOLV_RAD gaussian 2.
> make map MAP_SOLV set -100000 0 0.0
> fourier map MAP_SOLV

And then store in both cases the obtained FCALC structure factors in the FWORK set:


> reflect set ampl phase fwork = fcalc * 1.0

Copy the MAP_FO into the MAP_SOLV, set all negative density values to zero and Fourier transform it. R-value calculation is performed in order to follow convergence of a further procedure.


> make map MAP_SOLV from MAP_FO init 9999  cell real
> make map MAP_SOLV from MAP_FO copy
> make map MAP_SOLV set -99999 0 0.0
> fourier map MAP_SOLV
> reflect shells 10 r-values

Multiply FWORKSET (sphere model) and FCALCULATE (truncated MIR density) Fourier coeficients, convert the MAP_SOLV map to a convex map, fill it with the multiplied Fourier coefficients and Fourier BACK transform it. (The DEFINE option and application of all symmetry operators in the reflection fill-map command is OK too.)


> reflect set ampl phase fwork = fwork * 1.0  *  fcalc * 1.0
> make map MAP_SOLV conv complex
> make map MAP_SOLV zero
> refl fill-map MAP_MASK
> four map MAP_SOLV back
> make map MAP_SOLV rescale

The score map histogram

The map MAP_MASK is further analyzed - a histogram of density points in the 256 density intervals is prepared. (Number of intervals can vary from 1 to the maximal number of atoms your MAIN can accept). This histogram serves for the envelope cut. Note that in the case of convoultion theorem based score MAP_SOLV should be equal to MAP_MASK.


> analyze init
> analyze map MAP_MASK step 256


> make map MAP_MASK analyzes range SOLV_CUT

Filling holes and removeing clouds


> set vari HOLE_SIZE = 6

At this stage you can in addition influence the maps either by FILLING the holes or remove the cloudes of the scattered mask. The command can be iterated.


> make map MAP_MASK + 1 from MAP_MASK init 9999 copy
> make map MAP_MASK from MAP_MASK + 1 remove HOLE_SIZE


> make map MAP_MASK + 1 from MAP_MASK init 9999 copy
> make map MAP_MASK from MAP_MASK + 1 fill HOLE_SIZE

Geneartion of the unit cell

The map MAP_SOLV is converted to a real*4 map empty map, with density values set to -9999. The regions occupied with molecule obtain density, while the solvent region remains empty.


> make map MAP_MASK from MAP_FO copy
> make map MAP_SOLV conv real
> make map MAP_SOLV zero
> make map MAP_SOLV set -1 1 -9999.
> make map MAP_SOLV from MAP_MASK cell

Note that in the case of convolution theorem based score map calculation no extra map is needed (MAP_MASK should be equal to MAP_SOLV) and that the unit cell generation step is superficial, so you only need to copy the density into the masked MAP_SOLV:


> make map MAP_SOLV from MAP_FO copy

Flattening and flipping of the solvent region

In order to flatten the solvent (empty) region its value can be simply set to zero or to some small negative value as -0.1.

For current macro see MAIN_UTILS:re_fft_map.com.


> make map MAP_SOLV set -10000 -9900 0.0

For any other solvent region maipulations the solvent needs first to be converted into a mask


> make map MAP_SOLV set -10000 -9900 9999.0

and then flipped


> make map MAP_SOLV from MAP_FO invert reshift

or set to its average value


> make map MAP_SOLV from MAP_FO invert reshift scale 0.0

For further possibilities see "Command Reference Manual" MAKE MAP commands.

Fourier transformation of the solvent flattened map.


> fourier map MAP_SOLV
> reflect shells 10 r-values


> reflect set ampl phase fwork = fcalc * 1.0

Use FOBS


> reflect set ampl fwork = fobs * 1.0

or 2FOBS - FCALC map for further calculation


> reflect set ampl scale fcalc fwork = fobs * 2.0 - fcalc * 1.0

At this point you can call the MAIN atomic probability function (See below the section "Local Histogram Matching".)


> if ( HIST_TEMP .gt. 2.0 )<>utils/hist_match

or include phase combination (see the section "Phase Combination")


> make map MAP_FO zero
> make map MAP_FO conv complex
> refl fill-map MAP_FO defined
> four map MAP_FO back
> make map MAP_FO rescale

At this stage the procedure ends. The results can be stored or a new cycle started.


> write over file FILE_MAP map MAP_FO xpl

Solvent flattening procedure based on a skeletonized map

See menu items SKELETON and SOLV_MAS in menu block MAP_ATOM. In a while a better description will appear also here.

Generating molecular envelopes

Molecular envelope or a mask is a region within a map, which is accounted to one or several molecules. Points of a molecular mask in the real*4 map presentations have values larger than 9998.0.

Masks can be created with help of atoms by masking all grid points within a ceratin radii from the selected atoms and write it to a file.


> make map MAP_MASK from 1 init -9999 around 10 select segm name A end
> make map MAP_MASK select segm name A end atom mask 4.0
> write fils model_mask.xmap map MAP_MASK xplor

In the simplest case a molecule is already available, so we can simply used it for the mask. In cases when this is not, a mask should be created out of a given electron density map. As soon as the electron density electron density interpretation proceeds, include the current models in mask editing procedures.

Filling holes and removing lonely clouds

Remove cloudes, which have less than a HOLE_SIZE in diameter, from a mask:


> make map MAP_MASK + 1 from MAP_MASK init 9999 copy
> make map MAP_MASK from MAP_MASK + 1 remove HOLE_SIZE

Enlarge the mask for the holes which have less than HOLE_SIZE in diameter.


> make map MAP_MASK + 1 from MAP_MASK init 9999 copy
> make map MAP_MASK from MAP_MASK + 1 fill HOLE_SIZE

Avoiding mask overlap(s) in a unit cell

Since the masks are based on atoms, the simplest is to check the symmetry overlap interactively on the screen by adapting a "re_image.cmds" and "symmetry.cmds" files so that they will generate images of the atoms used for a mask generation and their symmetry equivalents. Fiddle with the atoms until no overlap is seen (display maps and use them for defining an asymmetric unit when they are available).

The mask atoms in contact their symmatry mates need a reduce radius. The simplest way, however, is, to generate the symmetry mates around the masked atoms and then used them to remove the regions, they occupy, from a mask. Of course their radii should be reduced when compared to the radii used for the mask creation.


> delete atom sele segm name #* end
> symmetry select mask_atoms end around select mask_atoms end dist 10. cut
> make map MASK_MAP atom clear 1.8 sele segm name #* end

You can inspect the mask overlap also by using the masks to generate the unit cell.

Using secondary structure elements (helices)

A polypeptide chain folded into a secondary structure (a helix) can be used to efficiently mask substantial regions of space. With this models it is easy to check possible overlaps with a symmetry related regions. It is enough to master the elementary model building features and the way to ab initio envelope creation is open. The disadvantage of maps based on secondary structure models is that such models only approximately follow a map.

Exploiting map skeletons

Skeleton is a way of an electron density map presentation, where skeleton atoms are conected with covalent bonds and displayed. The implemented algorithm is based on S. Swansons ideas. Skeleton atoms are placed at local density maxima and on saddle points connecting them. The maxima as well the saddle points have to be above a chosen density threshold level. See MAIN_MENU:map_mask.html for further instructions.

It remains to select the molecular regions. The easiest way to prepare masks is by using the SELECT menu block items and when needed to break connection and delete one or several atoms. For this purpose the key 'active' is exploited.

Use only the default flags of the SELECT (light blue) menu block. Items 'KEY_ACTI', 'SEL_LAST', 'SELE_nn ' and 'SEL_MOLE' should be activated. With this flags on, you will choose only whole networks of covalent bonds (molecules). By picking atoms and functions 'SEL .or.', 'SEL.and.' and 'SEL.not.' enable you to select whole segments with help of logical operations: with 'SEL .or.' you include into the key 'active' additional network of skeleton atoms, with 'SEL.and.' you keep only the last picked network and with 'SEL.not.' you exclude the last network from the key. If a network is too large you can break it into smaller pieces by breaking bonds ('DELE_BON') or deleting some of its atoms ('DELE_ATO').

After the process is finished you can write the selected atoms to a file or immediately create a mask.

Procedures based on map statistics

The simplest approach is mask definition during a solvent flattening cycle.

Placing atoms on a 10 grid lattice

Electron density averaging

Electron density averaging requires clear boundaries between protein and solvent volumes, it should be almost inevitably preceded by a solvent flattening in the case of multiple isomorphous replacement phase evaluation.

There are two types of non-crystallographic or local symmetry: proper (also called spherical) and improper symmetry. Molecules of an asymetric unit are related by proper symmetry when they can be superimposed upon each other by a single rotation about a local symmetry axis, while in the case of improper local symmetry, superposition of the molecules require other operations (rotation usually combined with translation). Therefore, procedures for proper and improper symmetry averaging differ. For proper symmetry averaging, equivalent areas do not have to be separated, while for improper averaging it is necessary to distinguish between them.

Besides improving the phases (and the electron density maps) of the starting resolution range, it is possible to evaluate phases of higher resolution reflections by gradually increasing the resolution range. The procedure is called phase extension. The larger the number of molecules in an asymmetric unit, the better the results which can be obtained with phase extension, with however the condition that the initial phases are sufficiently correct for the procedure to converge properly ( Bricogne, 1974, Podjarny, 1990).

To perform real space electron density averaging some initial set of phases, equivalent areas and geometric transformations (rotation and translation parameters) are required.

In a molecular replacement procedure, the equivalent areas are defined from the initial model placement. Transformations between them can be easily constructed by superimposing the molecular models (as demonstrated in the cases of cathepsin B and riboflavin synthase).

In the case of a single or multiple isomorphous replacement procedure, it is possible to construct the transformation parameters from the heavy atom positions when they fulfill the local symmetry conditions. When they do not, it is necessary to construct the rotational parameters by an autocorrelation of a Patterson map and then to find the center of rotation and corresponding translational components by autocorrelating electron density (as demonstrated in the case of carbamoylsarcosine hydrolase). To recognize the boundaries of equivalent areas, it is recommended first to average the initial electron density map, whereby the uncorrelated areas are supposed to smear out, and in this averaged density to then find the borders (envelope) of the equivalent areas interactively at a graphical display by going through all the layers of an asymmetric unit (2-dimensional construction using a program such as X-CONTOUR (Buchberger, 1990)) or by preparing a 3-dimensional map representation of a whole asymmetric unit and determining the equivalent parts from its 3-dimensional skeletonized image (this can be done with MAIN).

The theoretical basis for electron density averaging or real space averaging was established in late 1960s and early 1970s (Rossman, 1972). Bricogne has written a review (Bricogne, 1974) of the method, its application and limitations. There it was shown that the averaging in direct space is equivalent to the procedure in reciprocal space and that averaging in direct space has advantages over reciprocal space procedures. The reason seems to lie in the greater computational inaccuracies in reciprocal space calculations. In 1976 he published a description of his program (Bricogne, 1976). Besides Bricogne's program, other attempts have also been made, but none of them (Johnson in Rayment et al., 1978; Nordman, 1980) is used so widely and in so many variations as Bricogne's. Recently, Lawrence (Lawrence, 1991) reviewed the method and its applications to {\it de novo} determined structures.

Averaging of electron density: 2 molecules

See MAIN_DOC:nmol/nmol.html. If you are intersted in the syntax run the "menu_dens_mod.sh" and corresponding "create_...pl" scripts and inspect the outcoming macros.

Averaging density between 2 different crystal forms

The configuration scripts are yet not capable to create macros for averaging of electron density between several crystal forms.

A runable case for averaging and refinement of a molecule in two crystal forms can be found in MAIN:cases/2cryst/. The files therein should be edited.

This procedure differs from the above described single crystal form averaging in the following:

Since MAIN is not capable to deal with several refelction sets and symmetry groups simoultaneously these have to be read each time when they are referenced. To make file manipulation easier (and error free) "MAIN:cases/2cryst/get_data_hex.com" and "MAIN:cases/2cryst/get_data_ortho.com" files were created. They are only seting values of string variable to apprpriate file names.

A standard "MAIN:cases/2cryst/rms_fit.cmds" calculates the rotation and translational parameters of the procedure for all equivalent molecules.

The standard "MAIN:cases/2cryst/make_masks.cmds" is a bit modified, because there is no overlap between molecules from different crystal forms.

Of course there is also the "MAIN:cases/2cryst/read.com" file.

The "MAIN:cases/2cryst/dm_prep.cmds" prepares averaging and "MAIN:cases/2cryst/dm_prep.cmds" continues and calls "MAIN:cases/2cryst/aver_loop.com", which finaly does it including a map calculation for each map separately.

The new unit cell generation and a new 2Fobs-Fcalc map calculation for each crystal form independently:


> <get_data_hex
> read file FILE_CELL cell
> read file FILE_SYMM symm
> read file FILE_REFL reflect init resol RESOL_HEX 100. limit 0 0 0 friedel
> set vari MAP_CELL = 1
> make map MAP_CELL zero
> make map MAP_CELL set -1 1 -9999.
> make map MAP_CELL from 3 cell
> <calc_a_map


> <get_data_ortho
> read file FILE_CELL cell
> read file FILE_SYMM symm
> read file FILE_REFL reflect init resol RESOL_ORT 100. limit 0 0 0 friedel
> set vari MAP_CELL = 2
> make map MAP_CELL zero
> make map MAP_CELL set -1 1 -9999.
> make map MAP_CELL from 4 cell
> <calc_a_map
> rewind file

Averaging: yeast proteasome schell script

Lars Ditzel gaved us his script "yeast_prot/aver-ypr.com" for the yeast proteasome averaging. It runs in background with no graphics involved.

Local histogram matching

Local histogram matching in contrary to global history matching, where histogram of the whole map is matched, calculates match of an density map with an atom locally for each point of the whole unit cell map.

The following procedure >utils/hist_match.com generates electron density of a single atom (sulphur) placed at the coordinate system origin in a P1 cell with its' b-value equal to HIST_TEMP and calculates convolution of the single atom with the underlaying map using the convoluion theorem. (Structure factors of single atom map are multiplied with structure factors of the underlaying map and then backtransformed into a map.)

This procedure is intended to be called from other procedures as a subprocedue, which, after a structure factor calculation and its storage in the "fwork" array, multiplies it with the structure factors of the histogram. Product can be afterwards (after the return) transformed into a map that serves for inspection or further calculations.

This file is made to be called from a solvent flattening procedure and utilizes the MAP_SOLV for its structure factor calculation. In your own cases change the variable name or assign accordingly the MAP_SOLV and HIST_TEMP values.


 main/utils/hist_match.com


> read atom
> *
> SGX


> set weight sele numb atom natom end 1.0
> set temp sele numb atom natom end HIST_TEMP
> make map MAP_SOLV zero
> make map MAP_SOLV conv real
> make map MAP_SOLV atom dens sele numb atom natom end
> delete atom sele numb atom natom end
> four map MAP_SOLV
> reflect set ampl phase fwork = fwork * 1.0  *  fcalc * 1.0
> return

Phase combination

MAIN does not include its own phase combination procedure. Herein a link to CCP4 SIGMAA program (written by R. Read) is described (use "PHASE_CMB" on page 10 MAIN_CMDS:phase_comb.cmds). Parts of the macro can be used also to exchange structure factor information between MAIN and CCP4 .

The FCALC are written to a file for further processing with CCP4 programs. The spawn command starts a shell script MAIN:doc/dens_mod/phase_comb/main_2_sigmaa_2_main.ccp4 and preforms the phase combination. The example file is in the MAIN:doc/dens_mod/phase_comb/ directory.


> write over file main_fcalc.phase refl polar select defined end
> spawn main_2_sigmaa_2_main.ccp4> sigmma.out
> read file sigmaa.phase refl over resol RESOL_MIN RESOL_MAX friedel

The retrieved phases are stored in FOBS, so click the "FOBS_MAP" item and calling MAIN_CMDS:calc_fo_map.cmds macro to calculate the new map.