printkey

# Print Keys

To control the output of information or properties often printkeys are used. A printkey is a section that has a default value that says at which print level to start printing the corresponding values, and keywords to control their output. Normally printkeys are kept together in a PRINT section.

To understand how to control the output it is necessary to first understand the iteration level. During the calculations cp2k keeps a global iteration level which is a set of integers that keep track which iteration one is doing at that moment.

The exact meaning of each iteration level depends on the run type, for example doing an MD with the QS GPW method an iteration level of 1_4_5 means that the program is doing the 5th scf step of the 4th md step, whereas 1_9 means the we are at the 9th md setp (outside the scf loop). The first 1 is a root iteration level that stays always 1 during a normal md run

• section parameter: Level starting at which this property is printed, valid values are ON, OFF, SILENT, LOW, MEDIUM, HIGH, DEBUG. No section means the default value, the presence of the prind sections implies a value of ON (always printed), if one wants to selectively switch off the printkey it is possible the give it the explicit value OFF, i.e. &SECTION OFF
• EACH: How often this proprety is printed, this is matched with the actual iteration level from the right replacing non present levels with 1. For example “2 1” for an scf property during an scf means to write each scf step each 2 md step. How to handle the last iteration is treated separately in ADD_LAST (this mean that EACH 0 might print the last iteration)
• ADD_LAST: If the last iteration should be added, and if it should be marked symbolically (with l) or with the iteration number. Not every process is able to identify the last iteration early enough to be able to output. Valid keywords: NO, NUMERIC, SYMBOLIC
• COMMON_ITERATION_LEVELS: How many iterations levels should be written in the same file (no extra information about the actual iteration level is written to the file). If it is 0 then all iterations go to different files, if it is 1 then (if the current property is an SCF property and one is doing an MD then each MD step goes to a separate file (but different scf steps are in the same file)
• FILENAME: controls part of the filename for output.
• Use STD_OUT (exactly as written here) for the screen or standard logger.
• Use “filename” to get “projectname-filename[-middlename]-iteration.extension”
• Use “./filename” (or any path that contains at least one “/”) to get “./filename[-middlename]-iteration.extension”
• Use “=filename” to get exactly filename as output file (please note that this can be dangerous because different output/iterations might write on the same file