2.26                      *******************
                                  * BLDCEL WRITE-UP *
                                  *******************
        
           BLDCEL is a program to rebuild an electron density (and optionally 
        a mask) map covering one complete unit cell, from an input map (and 
        mask) covering an asymmetric unit. Typically an asymmetric unit 
        encompassing a dimer, trimer etc is extracted from a FSFOUR map by 
        EXTRMAP or MAPVIEW, and averaging is done only within that submap in 
        program MAPAVG. The averaged asymmetric unit map and corresponding 
        mask is input here, along with the FSFOUR map from which the 
        asymmetric unit map was extracted. An exact copy of the FSFOUR map is 
        first created, but then density values at grid points which lie within 
        the averaging envelopes are replaced by their values from the averaged 
        map. Averaged density also replaces values at grid points related by 
        crystal symmetry to the input averaged map. Thus the output map 
        corresponds to the averaged map, except that it covers one full cell 
        and conforms to the space group symmetry. Density at values which were 
        not averaged simply retain their values from the original map. The 
        format is identical to that produced by FSFOUR, thus this map is 
        suitable for inversion, peak search etc. If desired, the input 
        asymmetric unit mask can also be expanded to a full cell mask. There 
        is never any need to do this for averaging purposes, but it is useful 
        if one wants to use SOLVENT FLATTENING masks which were edited by 
        program MAPVIEW. In that case one would extract a region from the 
        solvent mask (created by BNDRY, option 1) which covers an asymmetric 
        unit, by using MAPVIEW or EXTRMSK. Edit the extracted solvent mask in 
        MAPVIEW. Then use the MAKE ASU expansion option in MAPVIEW to create 
        an edited mask file obeying crystal symmetry. Finally, input the 
        edited mask file here, and request that it also gets expanded to a 
        full cell. The output mask file then can be used for solvent 
        flattening, since it covers a full cell, obeys space group symmetry 
        and has the same structure as a normal solvent flattening mask.
        
        
                           INPUT DATA  (UNIT 5)
        
        RECORD 1    PAMFIL       (free format)
                          
                    PAMFIL = Input parameter file specifying cell and symmetry
                             information.
        
        
        
        RECORD 2    INPMAP       (free format)
        
                    INPMAP = Input map file (unaveraged, full cell, from 
                             FSFOUR)
        
        
        
        RECORD 3    OUTMAP       (free format)
        
                    OUTMAP = Output map file (full cell, averaged)
        
        
        
        RECORD 4    INPASU       (free format)
        
                    INPASU = Input map (averaged, asymmetric unit)
        
        
        
        RECORD 5    INPMSK       (free format)
        
                    INPMSK = Input mask (asymmetric unit)
        
        
        
        RECORD 6    NEWMSK       (free format)
        
                    NEWMSK = 0 for no expansion of mask to full cell
        
                           = 1 to also expand input mask to full cell
        
        
        
        RECORD 7    OUTMSK       (free format)
        
                 ******* include this record only if NEWMSK=1 *******
        
               OUTMSK = Output mask file (full cell)
        
        
        
                                   ***** FILES *****
        
           INPUT MAP FILE "INPMAP" (BINARY)
        
           Standard FSFOUR map, default orientation i.e. NORN=0
        
        
        
           OUTPUT MAP FILE "OUTMAP" (BINARY) 
        
           Same structure as input file "INPMAP"
        
        
        
           INPUT MAP FILE "INPASU" (BINARY)
        
           record 1)  A,B,C,AL,BE,GA,NX,NY,NZ,IXMN,IYMN,IZMN,IXMX,IYMX,IZMX
        
           with first 6 values REAL*4, next 9 INTEGER*4, lengths in Angstroms,
           angles in degrees.
        
        NX = 
              Number of grid points defining one "cell length" along
        NY =  respective axis. Implicitly defines grid spacing as 
              del x = A/NX, del y = B/NY and del z = C/NZ
        NZ =
        
        IXMN, IXMX =  
                     Minimum, maximum grid index defining map region such
        IYMN, IYMX = that  x (fractional) = IX * (del x) / A  etc. 
                     There are no restrictions on magnitudes or signs.
        IZMN, IZMX = 
        
        The map follows as (IYMX-IYMN+1)*(IZMX-IZMN+1) records, with each 
        containing one row (IXMX-IXMN+1 REAL*4 values) along X, starting at 
        IXMN. Y is slowest varying, i.e. the file could have been created with 
        the following FORTRAN code:
        
               DO 30 IY=IYMN,IYMX
                DO 20 IZ=IZMN,IZMX
        20     WRITE(LU)(RHO(IX,IY,IZ),IX=IXMN,IXMX)
        30     CONTINUE
        
        
        
           INPUT MASK FILE "INPMSK" (BINARY) 
        
        Header record identical to map file INPASU.
        
        Mask records similar to normal map records in INPASU except that the 
        mask values are written as FORTRAN type "BYTE" (INTEGER*1). Only grid 
        points with mask values of 0, 10, 20, 30, 40 etc will be used (i.e. 
        inside envelope masks 1,2,3,4,5 etc, respectively).
        
        
                                                                     
           OUTPUT MASK FILE OUTMSK (BINARY) 
        
        Same structure as input mask file INPMSK, but covers full cell