2.25                       *****************
                                   * SKEW WRITE-UP *
                                   *****************
        
           Program SKEW, for the conversion of a "normal" input map (and 
        optionally, mask) to a "skewed" cell, such that the new b axis will 
        correspond to a specified direction. The input map is usually created 
        by MAPVIEW or EXTRMAP, and the input mask (if any) is usually created 
        by MAPVIEW or EXTRMSK. This program is generally used if the input 
        noncrystallographic symmetry operator is purely rotational, with the 
        rotational order given by 360/N where N is an integer, i.e. pure 
        twofolds, threefolds etc. In that case it is much easier to create the 
        averaging mask (in MAPVIEW) when looking directly down the 
        noncrystallographic symmetry axis, and convert it back to the standard 
        orientation (via program TRNMSK) for use in averaging cycles. Thus one 
        would use MAPVIEW or EXTRMAP to extract a region from the map 
        encompassing the dimer, trimer etc. to be averaged, skew that 
        extracted map, input it into MAPVIEW to trace out the mask in the 
        skewed direction, and then convert the skewed mask from MAPVIEW back
        into the standard orientation with TRNMSK. One would then input the 
        standard (non-skewed) mask into MAPVIEW again, along with the submap
        from which the skewed map was originally created, and invoke the
        MAKE ASU option. This last step allows one to check for redundant
        entries (by CRYSTAL symmetry) within the envelope, and to correct them
        prior to saving the final mask for averaging.  
        
                                                       
                              INPUT DATA (UNIT 5)
        
                                                 
        CARD I       PAMFIL      (free format)
        
                     PAMFIL = Input parameter file containing cell and symmetry
                              information, used only to get "running log" file
              
                                                                        
        
        CARD II      INPMAP      (free format)
        
                     INPMAP = Input map file, from MAPVIEW or EXTRMAP
        
        
        
        CARD III     PHI, PSI, OX, OY, OZ       (free format)
        
                    Spherical polar angles defining direction of             
            PHI =   noncrystallographic symmetry axis, oriented with respect 
                    to orthogonal frame X,Y,Z with X along a, Y along c* cross
            PSI =   a, and Z along X cross Y (i.e. c*). PSI = angle between NC
                    symmetry axis and +Y axis. PHI = angle between projection
                    of NC symmetry axis on XZ plane and +X axis. +PHI= CCW
                    rotation about +Y axis as measured from +X axis. 
        
             OX =
                    Origin of NC symmetry rotation axis, in angstroms with 
             OY =  
                    respect to the orthogonal axes. The axis passes through 
                    this point.
             OZ =
        
        
        
        CARD IV      IRANGE, IMASK      (free format)
        
            IRANGE  = 0 for normal operation (coordinate range for OUTPUT 
                        skewed map will be input to the program by the user)
                
                    = 1 to determine coordinate range for OUTPUT map which just
                        encompasses the input volume, output it, and stop.
        
        
             IMASK  = 0 for normal operation (only skewed map created)
        
                    = 1 to additionally create skewed mask, from input mask 
        
        
        
                  ****** FOLLOWING CARDS READ ONLY IF IRANGE=0 ******
        
                                        
        CARD V       OUTMAP      (free format)
        
                     OUTMAP = Output (skewed) map file
        
        
        
        CARD VI  CELL,MX,MY,MZ, LXMN,LXMX,LYMN,LYMX,LZMN,LZMX   (free format) 
                        
           CELL = length (in Angstroms) for "cell" parameters in "skewed" cell.
        
           MX = 
                Number of grid points defining one "cell length" along
           MY = respective axis in "skewed" cell. Implicitly defines grid 
                spacing as del x = CELL/MX, del y = CELL/MY and del z = CELL/MZ
           MZ =
        
           LXMN, LXMX =  
                        Minimum, maximum grid index defining output map region 
           LYMN, LYMX = such that  x (fractional) = LX * (del x) / CELL  etc. 
                        There are no restrictions on magnitudes or signs.
           LZMN, LZMX = 
        
                                                                             
                  ****** FOLLOWING CARDS READ ONLY IF IMASK=1 ******
        
         CARD VII    INPMSK      (free format)
        
                     INPMSK = Input mask file (standard orientation)
        
        
        
         CARD VIII   OUTMSK      (free format)
        
                     OUTMSK = Output (skewed) mask file.
        
        
                                                        
                                ******** FILES ********
        
                 INPUT (AND OUTPUT) MAP FILES (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
        
        
        
         NOTES:  If a mask is input, it must coincide exactly with the input 
                 map.
        
                INPUT (AND OUTPUT) MASK FILES (BINARY)  
        
        Header record identical to map files.
        
        Mask records similar to normal map records except that the mask values 
        are written as FORTRAN type "BYTE" (INTEGER*1). Grid points with mask 
        values of 0, 10, 20, 30, 40 etc correspond to envelope masks 
        1,2,3,4,5 etc, respectively.