Newsletter contents... UP

mcps: contour-grayscale
rendering of CCP4 map sections

Nicholas M. Glykos
Crystallography Group, IMBB, FORTH,
PO Box 1527, 71110 Heraklion, Crete, Greece.
Tel ++30-(0)81-394429, Fax ++30-(0)81-394351

March 2001

Program description

The program 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, as illustrated in the following figure :

Figure 1: Comparison between the output from npo-pltdev (left panel) and mcps (right panel) for an 8Å potential density projection map of a large multiprotein complex.
Comparison between the output from npo and mcps

The program comes with a (hopefully) sensible set of default values which should allow you to give it a try with just mcps (to plot the first section of the map), or mcps -first 3 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.

User interface and program defaults.

All interaction with the program is through command-line arguments. This brings mcps closer to the unix tradition than the CCP4 tradition and has two important consequences. The first is that it is almost impossible to remember what is this week's name for the flag that changes the contouring level. This is somewhat remedied through the inclusion (with the distribution) of a formatted manual page. The second consequence is that the program must have a sensible set of default values (because very few of us would be prepared to type three lines worth of command-line flags to make it run). The program comes with the following defaults : the grayscale gradient will be plotted 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. With these defaults the emphasis is placed at the low density regions (which are the most difficult to follow with the traditional contouring methods). The high density areas will resemble a reverse-contrast npo plot as shown below for a map with well-resolved high-density peaks.

Figure 2: Output from mcps for a section from a 1.8Å electron density map.
Section from a 1.8Å electron density map.

Because the emphasis is placed on the low density areas of the map, mcps will not perform well with outstandingly strong features such as the origin peak of Patterson functions.


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


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

mcps -first 6 -ticks 0.250

To make plot the first section of the map without axes and tick-marks, and with the contrast reversed :

mcps -noaxes -reverse

To produce an image sampled at 600dpi (instead of the default of 300dpi) :

mcps -scale 0.50 -resol 2.0

Bugs and ``features''.

mcps will not re-calculate any of the 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 (and 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%

Program availability

mcps is free software and is immediately available for dowload via The distribution includes documentation (html, manual page) and precompiled executables suitable for Irix, Linux, OSF and Solaris. When the author's load level permit, the source code of the program will be made human-readable and released.

NMG, March 2001

Newsletter contents... UP