2.27                     ********************
                                 *  MDLMSK WRITE-UP *
                                 ********************
        
           This program creates a mask file by identifying all points on a map 
        grid which are within a given distance from any atom in an input 
        model. It therefore can be used to create model based masks for use in 
        averaging (or solvent flattening, if the mask is symmetrized in 
        MAPVIEW and expanded to a full cell in BLDCEL). The program is 
        interactive and prompts for the names of the standard parameter file, 
        an input coordinate file, an output mask file, the atomic radius, a 
        mask number (from 1 to 12) uniquely identifying the molecule and 
        parameters for the map grid. The output mask file can be viewed in 
        MAPVIEW, provided one selects a map region identical to the mask 
        region, and uses the same grid. If multiple molecules are present in 
        the asymmetric unit, MDLMSK can be run several times over each 
        molecule separately (but covering a volume which encompasses all 
        molecules), specifying a unique mask number for each, but covering the 
        same region and using the same map grid. The separate ouput files can 
        then be combined into a single mask file with MRGMSK, which will 
        retain the identity of each molecular envelope mask. This combined 
        mask file can then be used for averaging or for refinement of 
        noncrystallographic symmetry operators in LSQROTGEN. If the 
        noncrystallographic symmetry is purely rotational with periodicity N 
        where N is an integer, then only a single mask is needed which 
        encompases the entire dimer, trimer etc. In that case the output mask 
        can be used for refinement in LSQROT. 
        
                                  ****** FILES ******
        
              
        INPUT COORDINATE FILE - ASCII with format ( 7X, A1, I3, A4, 5F10.5, I5)
        
                            Each record should contain
            
            RT, IRES, ATOM, X, Y, Z, B, OCC, ITYP      
            
                            where
        
                  RT    = single letter amino acid code (not used)
            
                IRES    = sequence number (MUST be present and unique for each
                          residue)
            
                ATOM    = atom name (not used)
            
             X, Y, Z    = fractional atomic coordinates
            
                   B    = Isotropic thermal factor  (not used)
            
                 OCC    = Occupancy factor  (not used)
                 
                ITYP    = Atomic type identifier (not used)
        
        Note! This format is identical to that used by PHASIT, in
        structure factor calculation mode.
        
            
        
           OUTPUT MASK FILE (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 mask follows as (IYMX-IYMN+1)*(IZMX-IZMN+1) records, with each 
        containing one row (IXMX-IXMN+1 BYTE values) along X, starting at 
        IXMN. Y is slowest varying, i.e. the file could have been created with 
        the following FORTRAN code, where array MASK is defined to be FORTRAN 
        type BYTE:
        
               DO 30 IY=IYMN,IYMX
                DO 20 IZ=IZMN,IZMX
        20     WRITE(LU)(MASK(IX,IY,IZ),IX=IXMN,IXMX)
        30     CONTINUE