CCP4 Suite (CCP4: Basic)


ccp4 - introduction to the CCP4 Program Suite under Unix


program [ -n ] [ -v level ] [ -d file ] [ -e file ] [ -i ] [ -nohtml ] [ -nosummary ] [ Logical_Name Real_Name ... ]


program is the name of the CCP4 program that you want to run. The Logical_name / Real_name pairs are used to assign the input and output files to be used. File extensions are optional and if omitted default values will be used.

Input files that do not exist are reported and the program stops processing.

Output files that already exist will also cause the program to stop unless the environment variable CCP4_OPEN is set to `UNKNOWN' when they will be truncated to zero, overwritten and a warning message displayed.

The programs normally read two initialisation files (held in the directory pointed to by environment variable CINCL ). First the file environ.def is read - this specifies the logical names that can be expected and some information about the type of file associated with each logical name. Then default.def is read, which specifies some common `logical names' defined for all CCP4 processes and the corresponding file names (whose path defaults to the value of environment variable CLIBD ). The logical names actually correspond variables in the program's environment; the values defined in default.def don't override existing values of the environment variables corresponding to the relevant logical names, so defaults may be set by the shell's environment which a program inherits (e.g. with setenv in csh or the Bourne shell assignment and export mechanism). Finally the command line arguments are parsed so that the user can override the defaults on the command line. Logical names specified on the command line are upper-cased for VMS compatibility, but not their values. Thus the value of logical name FOO will come from the following sources in order of precedence:

  1. The command line, e.g.:
    program foo ... value ...
  2. The environment, e.g. (C shell):
    setenv FOO value # NOT using set

    or Bourne shell:
    FOO=value; export FOO
  3. Values from default.def.

If a logical name hasn't been defined when a program tries to use it, e.g. by opening HKLIN , the name of the variable will be used as its value if it is meant to define a file.


Most CCP4 programs read `command' input to set parameters on stdin in the form of `keyworded' records. These have a leading keyword followed, possibly, by arguments which might be numbers or strings or keyword/value pairs of the form keyword=value.
Such arguments are separated by spaces, tabs, commas or `=' characters. The details of the input expected is given in the documentation for each program, of course. However, there are some general rules:


Do not read the global files default.def and environ.def.
-v level
Verbose output; the amount depends on the value of level, which may have a value between 0 and 9, higher values giving more information. This mainly affects output from the CCP4 library routines. The Logical_name / Real_name assignments are displayed as they are processed along with other debug information. The default value is 1. Choose 0 if you want to suppress some output, or 2 or higher if you want extra output.
-d file
Use the next argument to specify an alternative to the default.def file.
-e file
Use the next argument to specify an alternative to the environ.def file.
Print CCP4 library version, program name and program version to standard output, and exit.
Suppresses the writing of HTML tags in the program output. This is an alternative to setting the CCP_SUPPRESS_HTML environment variable.
Suppresses the writing of summary tags in the program output. This is an alternative to setting the CCP_SUPPRESS_SUMMARY environment variable.


f2mtz hklin xylose.hkl hklout xylose.mtz <<EOF
LABOUT H   K  L   F  SIGF   FreeRflag 
CTYPE  H   H  H   F  Q      X 
Alternatively, if the keywords are in the file keywords then it is possible to simply use:
f2mtz hklin xylose.hkl hklout xylose.mtz <keywords




Write up for the program you want to run.


If a file name ends in .lib , .bes , .prt or .dic and is not a an explicit path name i.e., with directory information in front of the file name, like ./ or /foo/bar.baz, then the environment variable $CLIBD will be prepended to the file name. This can seem to cause files to be written in the wrong area. A solution is to write (say) SYMOP ./my_symop.lib or use a different extension.

If a file name ends in .scr , and is not the full path name then the environment variable $CCP4_SCRATCH will be pre-appended to the file name. The extension scr will in all cases be replaced by the process number to give the file a (reasonably) distinct name.