Authors: Debra Holland, Keith Watenpaugh and Jim Stewart
Contact: Keith Watenpaugh, The Upjohn Company,
Physical and Analytical Chemistry, Kalamazoo, MI 49001, USA
MAKBRK converts a FOURR map into a random-access bricked electron density file suitable for use by the FRODO graphics program.
MAKBRK reads an electron density map stored on a bdf by FOURR. Using logical record 21 to describe its size and layout, MAKBRK partitions the electron density map into bricks of density of specified dimensions. The input map can be generated using any XYZ Fourier summation order. However, the bricks are organized in a predetermined row-column-page order expected by FRODO; the map will be sectioned along z, with y running fastest.
The electron density bricks can be output in one of two FRODO formats. The fmt1 option (default) generates a bricked map readable by the UCSD and RICE version of FRODO as a DSN6 file. The fmt2 option produces a bricked file that can be read by the Cambridge version of FRODO and used as any one of the four background maps. The dimension of bricks output in the fmt2 format can be controlled by the user, whereas the size of the fmt1-formatted bricks is a constant 8x8x8.
fmt1 Output Format
fmt1 produces a random-access unformatted binary file with a record size of 512 bytes. The header record for this file contains 256 2-byte integers:
integer 1-3 lower limits for x,y,z
4-6 limit range for x,y,z
7-9 number of grid points in x,y,z
10-12 cell dimensions (times F1) in x,y,z
13-15 cell angles (times F1) in x,y,z
16 multiplicative term (times F2) for density value to map to [0,255]
17 additive term (times F2) for density value to map to [0,255]
The density values are stored in the bricks in 1-byte values, 512 values per record. Since bricks are sized as 8x8x8 for the fmt1 format, one brick per record is stored.
fmt2 Output Format
fmt2 produces a random-access unformatted binary brick file with a record size of 1024 bytes. The header record for this file contains 256 4-byte reals:
real 1-3 number of points in input map for x,y,z
4 storage format type, always 10 to denote bricked byte map
5-7 lower limits of map in x,y,z
8-10 grid sampling along x,y,z
11-13 cell dimensions
14-16 cell angles
17 column direction to axis mapping (1,2,3 for x,y,z)
18 row direction to axis mapping (1,2,3 for x,y,z)
19 page direction to axis mapping (1,2,3 for x,y,z)
20 minimum density value stored in bricks
21 maximum density value stored in bricks
22 average density value stored in bricks
23 space group number (not used)
24-37 not used
38 multiplicative term for packing density values into [0,255]
39 additive term for packing density values into [0,255]
40-42 brick size in xyz
43-54 not used
55 rms deviation of map from mean density
56-256 not used
The density values are stored in the bricks as 1-byte values, 1024 density values per record. The brick sizes can differ from 8x8x8 for the fmt2 format, thus dictating the number of bricks per record. It is not mandatory that an integral number of bricks be stored in a record; bricks can be split between records in the output file. Another difference between the fmt1 and fmt2 files exists in that adjacent bricks of the fmt2 format files share an edge, whereas fmt1 bricks are completely disjoint from one another.
Reads FOURR map from file map
Writes FRODO file to file fro
MAKBRK fmt1 swap
limits 1 50 1 50 1 70
Map output as 8x8x8 bricks in the UCSD format for FRODO. Byte-swapping is applied so that the bricked file can be transferred to another machine where the bit order (low to high) is the opposite of that on the source machine. All density values are scaled by 1.2 before storing. Only a portion of the map is used as specified by the limits line in grid units. The brick file can be read by FRODO as DSN6.