Print

Print


On Dec 8, 2011, at 8:39 AM, Ed Pozharski wrote:
> However, I'd see no harm in posting just a small cutout of the map in the region of
> interest.  It's not a difficult task (fft/mapmask or perhaps some usf
> magic), but is there some user-friendly approach to cutting out a small
> map volume? 

There's probably a slick program somewhere, but attached is a command line tool I made several years ago and still use all of the time. To use it, you need ccp4 and mapman from USF in your path. Running the script with "mapreg -h" yields the documentation below. It can cut a map using a box, extend or cut to the ASU, extend a map to a cell, or use a pdb file to make a box. It can also cull a map around a PDB.

To use it, the attachment needs to be untarred (tar zxvf mapreg.tar).

One of these days I may give it a web page.

James


**************************************************
*** mapreg version 0.02
***   output a region of a cns map
***   copyright James C. Stroud, 2008
***   distributed under the GNU Public License
**************************************************
Usage: mapreg [-h] [-c weight] [-b border] [-s symm] [-t type]
              [-x 'a b c alpha beta gamma'] mapfile
              [x1 y1 z1 x2 y2 z2 | ASU | CELL | pdbfile ]

Flags: -h          print this help
       -b border   define a border if using a pdb file to define region
                   default is 5 (5 Angstroms)
       -c weight   culls according to a weighting factor between 0 and 1
       -x cell     the sides and angles *must* be in single quotes
       -s symm     usually symmetry number is needed (ispcgr number)
       -t type     type of input map - default is cns
       -o outfile  name of output file (name generated if not supplied)

Description: Mapreg takes a cns map as input and outputs a new
             region of the map as specified at the command line.

             The possible region specifiers are:
               x1 y1 z1 x2 y2 z2 : the region defined by the two grid unit or
                    fractional coordinate points (x1,y1,z1) and (x2,y2,z2)
               'ASU' : the CCP4 default asymmetric unit
               'CELL' : the whole unit cell
               pdbfile : a pdb file defining the limits of the region
                         if border is defined, then this will be the border
                         in Angstroms around pdbfile to define the region
             If the region specifier is left out, then mapreg will
             output the whole unit cell.

             CULLING
             =======
             If a culling factor is supplied and a pdb file is used
             for trimming, then culling will be attempted.

             Culling trims the map to the the atoms of the pdb file
             if supplied. Without the pdb file, the program terminates
             with an error if a culling factor is supplied.

             The culling weighting factor is, for all practical purposes,
             arbitrary. Play with it to get the desired results.
             Start with 0.1 and go up (tighter) or down (less tight).
             Make sure you are aware of the caveats of culling
             before you use this to make figures for publication.