CCP4 web logo CCP4i: Graphical User Interface
Documentation for Programmers
WriteIdentifier

next button previous button top button

NAME

WriteIdentifier - Write standard CCP4i file header

SYNOPSIS

WriteIdentifier f script [extra_params]

DESCRIPTION

All files created by CCP4i have a header which identifies the file type, CCP4i version, creation date and the name of the user who created the file in the form of keyword and parameter pairs:

#CCP4I VERSION CCP4Interface 1.1
#CCP4I SCRIPT MR fit toxd 
#CCP4I DATE 17 Sep 1999  17:43:20
#CCP4I USER lizp
#CCP4I PROJECT  test
#CCP4I PROJECT_JOB_ID  215

This example is taken from an 'mr' file containing molecular replacement solutions. Here the file type is given by the keyword 'SCRIPT' and the parameter 'MR'; and there is some extra information: 'fit', to identify the stage of the solution, and 'toxd', the model. This example has two extra keyword-parameter pairs identifying the poject and the job-id.

The input argument f should be the channel id of a currently open file to which the header will be written or it should be a null character (i.e. {}) in which case the header text will be returned as the result of the procedure. The argument script should be the text which will appear after the keyword SCRIPT in the header. The parameters for VERSION DATE and USER are provided by WriteIdentifier. The optional extra_params argument gives additional keyword-parameter pairs (see the example below which generates the header shown above and returns the text as the result of the procedure):

  set header text [WriteIdentifier {} "MR fit toxd" PROJECT test PROJECT_JOB_ID 215 ]

You are strongly recommended to use this procedure rather than write header text yourself, as the format of the header may change in the future and the WriteIdentifier procedure will handle any changes.

KEYWORDS