Nicholas M. Glykos' group

mcps - a CCP4 map to postscript converter.


synopsis



mcps [options] <CCP4 map file>


description



mcps will plot a section (or a stack of sections) from a CCP4 map file using both a (dithered monochrome) grayscale representation and contour lines. This may be useful in cases where the electron or potential density distribution has "high valleys" or "low peaks" that make simple contour-line plots confusing.

The program comes with a (hopefully) sensible set of default values which should allow you to give it a try with just mcps my.map (to plot the first section of the map), or mcps -first 3 my.map to plot the 3rd section.

The output (postscript) file is always written to a file whose name is constructed by appending the suffix ".ps" to the name of the input CCP4 map file.


defaults



mcps will plot the grayscale gradient starting from 1.0 sigma below the mean (white), to 3.0 sigma above the mean (black). Contour lines will be plotted starting from 0.50 sigma below the mean and then every 0.50 sigma. All contour lines that correspond to density higher that 3.0 sigma above the mean (and are, thus, on a black background) will be drawn white.


examples



To plot the first section of a CCP4 map file with the name myfile.map using both contours and a grayscale representation, give

      mcps myfile.map

To plot the 6th section of the map with tick marks every 0.250 fractional units, give

      mcps -first 6 -ticks 0.250 myfile.map


options



All input to the program is through (case-insensitive) command-line options. Abbreviated (but uniquely identifiable) forms of the various flags are also valid.


-first W1



Where W1 is the (integer) section to be plotted, or the first of a stack of sections. The valid range of values for this parameter is defined by the contents of the map and you can find it from the map header that mcps is writing out when it starts (look for the last two numbers on the line starting with "Start and stop points on ...")


-last W2



Where W2 is the (integer) last section for plotting a stack of sections. See the description in the next keyword for an explanation of what is the actual calculation performed.


-sum



This keyword changes the way the stack of sections is calculated. Because the expression "stack of sections" may (rightly) create confusion, I should explain that due to the grayscale representation, the transparency of the individual sections is lost, and so, what is plotted is not a stack of sections, but a projection of these sections. How is this projection calculated ? In the default mode the program will go through all sections, and for each grid point will keep the maximum value encountered. This avoids problems with negative regions (which could mask high density features on a previous or forthcoming sections), but will also increase the noise level. When the keyword -sum is present, the program will calculate the average value (over all sections) of each grid point, and it is this "average density map" that will be plotted.


-min RHO



Where RHO is the minimum density (of the map file) for the grayscale gradient. Areas with density below RHO will appear "white" in the final plot (unless, of course, the contrast is inverted with the option -reverse).


-max RHO



Where RHO is the maximum density (of the map file) for the grayscale gradient. Areas with density greater than RHO will appear "black" in the final plot (unless, of course, the contrast is inverted with the option -reverse).


-cstart RHO



Where RHO is the density (of the map file) at which the first contour line will be plotted.


-cstep RHO



Where RHO is the interval of density (of the map file) for plotting successive (after the first) contour lines.


-creverse RHO



Where RHO is the density (of the map file) at which the contrast of the contour lines will be reversed (from black to white, or the reverse depending on the absence or presence of the -reverse flag).


-nocontour



If this flag is present, the plotting of contour lines will be switched-off (leaving only the grayscale representation).


-reverse



If this flag is present, the contrast of the whole plot will be reversed (don't you just hate those fancy laser printer toners ?).


-scale VAL



Where VAL is a scale factor to be applied to the final graph. Please note that this does not change the resolution (see -resol) of the plot. The result is that if you use the default resolution (of 300 dpi) with a -scale 0.5, the final plot will have an effective resolution of 600 dpi. The way to produce a smaller plot with the same resolution is to simultaneously define -resol and -scale (for example, the flags "-reso 0.5 -scale 0.5" would produce a postscipt file with half the size of the default plot but at a constant resolution of 300dpi).


-resol VAL



Where VAL is a scale factor to be applied to the resolution of the final graph. Take care with this keyword : the default resolution for the program is 300dpi and if you double it (with "-resol 2.0") you may well find that you need a large amount of physical memory for performing the calculation [the program will warn you (and pause for a few seconds) if more than 32 MBytes of memory are about to be requested]. See also second paragraph in the section Bugs.


-flip



If this flag is present, the orientation of the axes in the final plot will be swapped, that is, the graph will be drawn with the medium-changing axis vertical (instead of the default, which has the fast-changing axis running vertically).


-noaxes



If this flag is present, the plotting of axes and tick marks will be switched off.


-ticks VAL



Where VAL is the interval in fractional coordinates for drawing tick marks along the axes.


-verbose



Some additional (meaningless) numbers are written out during program execution. Not useful.


Bugs



mcps will not re-calculate any of map statistics (like mean, minimum, maximum, rms deviation, etc.). These are all taken from the map header, and if they are not correct, neither will the plot be.

mcps will always produce a postscript file which at the default magnification will have (depending of the unit cell dimensions) a width of 7 inches or a height of 10 inches. Because this whole area is sampled at the default resolution of 300 dpi, the resulting postscript files (although bitmapped monochrome) will be quite large (of the order of MBytes) and the procedure of calculating them is much slower than for normal contour plots.

mcps produces a bitmapped dithered monochrome image at a default resolution of 300dpi. The problem with this is, that while the result will look quite good when printed, the usual pre-viewing methods (even ghostscript) will produce a rather loosy approximation to it. One of the possible work-arounds is to actually produce an intermediate file at the correct resolution, which you then display at a reduced magnification. If, for example, you have ImageMagick on your machine, you can try something like display -density 300 -geometry 50% myccp4.map.ps


Authors



Nicholas M. Glykos, Department of Molecular Biology and Genetics, Democritus University of Thrace, Alexandroupolis, Greece.


Latest version



You can get the latest release of the program via http://utopia.duth.gr/~glykos/