Authors: Debra Holland and Keith Watenpaugh
Contact:Keith Watenpaugh, Physical and Analytical Chemistry,
7255-209-1, The Upjohn Company, Kalamazoo, MI 49007, USA
APMASK is used to apply a masking map, created by MKMASK, to a related fourier electron density map . The mask describes two discrete regions of the density map, the molecule and the solvent regions. Density indicated by the mask to be molecule density is modified using specified scales and offset values whereas solvent densities are essentially "flattened" .
The density map to be modified is read from logical records 21 and 22 of the MAP bdf. The mask is read from an unformatted binary file stored by MKMASK. Important: Since the mask produced by MKMASK represents the entire unit cell, so must the electron density map generated by FOURR. The dimensions and orientation of the masking grid and the electron density grid must be identical.
A two-pass procedure is used to create the modified density map. During the initial pass, density values identified by the masking map as belonging to the solvent region are flagged. Also, density within the non-solvent region is modified using the current scale factor. Statisics regarding density values in both regions are recorded. The average solvent density value can be calculated using this data.
During the second pass of the procedure, the density is modified by the user-defined or program-calculated offsets and scales. Each density value in the solvent region is either set to a specified valued supplied by the solden line or is set to an averaged solvent density value and is offset by a f-zero/volume (FZOVOL) value. This offset value can be specified directly by the fzovol line or calculated by the program using the SRATIO value supplied by the user on the sratio line. If calculated, the offset is:
FZOVOL = (SRATIO*MAXDEN-AVGSOL)/(1-SRATIO)
where MAXDEN = max scaled density value for the entire input density map
AVGSOL = average solvent density value.
Each density value in the molecule region is adjusted with the offset value as well. Negative density can be replaced by a zero value.
The resulting modified density map is output to mmp with the same dimensions and orientation as the source map. The resultant map can be used as input to programs such as RRFOUR to obtain a new set of phases or to the maximum entropy programs, MEDENS and MEFFIT, for further density modification.
Reads cell dimensions and fourier map from map bdf
Reads masking map, produced by MKMASK, from msk file
Writes modified density map to mmp file
This set of input lines would apply the input mask map to the electron density map such that all densities would be offset by a calculated value of FZOVOL, using the SRATIO value supplied. Density in the solvent region would initially be set to the average solvent density value and then adjusted by this FZOVOL value. Non-solvent region densities would not be scaled and any negative values (after applying the offset) would remain.