Running high-throughput calculations using CP2K

The high-throughput work chains for CP2K can be divided in two different types both inheriting the AiiDA WorkChain or RestartWorkChain classes (further information is available on the AiiDA documentation page):

  • The core work chains perform specific tasks, e.g. cell optimization, calculation of the electronic band structure, identifying parameters that converge the SCF-cycles, etc. As such the core work chains can be understood as wrappers for one or several calculations of the AiiDA class CalculationJob. The input parameters of the work chains include most of the input parameters of the CP2K CalculationJob but add on-top some parameters to facilitate the usage.

  • The combined work chains combine and call one or several core work chains to calculate a set of properties. The input parameters of the combined work chain are completely custom and combine several core work chains.

The core work chains

The core work chains are designed to perform specific tasks, the following work chains are implemented:

  • find_scf_p work chain: This work chain runs SCF-calculations using different pre-defined numerical parameters to find a set of parameters that can converge the Kohn-Sham equations.

  • geo_opt work chain: Optimization of the atomic positions minimizing the internal forces.

  • cell_opt work chain: Optimization of the atomic positions and the unit cell minimizing the internal pressure and forces.

  • band_structure work chain: Calculation of the band structure of a crystal.

  • pdos work chain: Calculation of the electronic projected density of states using a Gamma-point only super cell calculation.

  • eigenvalues work chain: Calculation of the electronic eigenvalues of the structure.

  • partial_charges work chain: Calculation of the partial charges. So far the Mulliken and Hirshfeld schemes are implemented using the internal routines of CP2K. The DDEC schemes can be used via the chargemol code and the Bader scheme can be used via the critic2 code.

  • cube work chain: Calculation and storage of cube files.

  • planar_fields work chain: Calculation of planar fields using CP2K and critic2.

The combined work chains

  • electronic_properties work chain: Calculation of the relaxed unit cell and different electronic properties.

  • surface_opt work chain: Calculation of the converged and relaxed surface slab.

Exit-codes

All error messages in AiiDA are defined by a positive integer number. In this library we obey the follwoing conventions:

  • 0-399: These numbers are reserved for AiiDA-internal error codes (see here).

  • 400-599: Numbers used for the cp2k calculation jobs.

  • 600-699: Numbers used for core work chains.

  • 700-799: Numbers used for combined work chains.

List of all exit status messages:

Calculation job:

  • 400 - ERROR_OUT_OF_WALLTIME: The calculation stopped prematurely because it ran out of walltime.

  • 401 - ERROR_INTERRUPTED: The calculation did not finish properly.

  • 402 - ERROR_ODD_NR_ELECTRONS: Odd number of electrons, UKS or ROKS has to be used.

  • 403 - ERROR_NEED_ADDED_MOS: Unoccupied orbitals have to be added.

  • 404 - ERROR_ILL_CONDITIONED_MATRIX: Cholesky decompose failed due to ill-conditioned matrix.

  • 405 - ERROR_BAD_CONDITION_NUMBER: Bad condition number R_COND (smaller than the machine working precision).

  • 500 - ERROR_GEOMETRY_CONVERGENCE_NOT_REACHED: The ionic minimization cycle did not converge for the given thresholds.

Core work chains:

  • 600 - ERROR_INPUT_WRONG_VALUE: Input parameter “{parameter}” contains an unsupported value.

  • 601 - ERROR_INPUT_DEPENDENCY: Input parameter “{parameter1}” needs “{parameter2}” to be set.

  • 602 - ERROR_INPUT_LOGICAL: Either input parameter “{parameter1}” or “{parameter2}” have to be set.

  • 610 - ERROR_SCF_PARAMETERS: No parameters found to converge the Kohn-Sham equations.

  • 611 - ERROR_CALCULATION_ABORTED: Calculation did not finish properly.

  • 612 - ERROR_OPTIMIZATION_NOT_CONVERGED: Could not optimize the structure below the set thresholds.

Combined work chains:

  • 700 - ERROR_SCF_PARAMETERS: SCF-parameters could not be retrieved.

  • 701 - ERROR_CELL_OPT: Crystal structure could not be converged.

  • 702 - ERROR_BAND_STRUCTURE: Band structure could not be calculated.

  • 703 - ERROR_EIGENVALUES: Eigenvalues could not be calculated.

  • 704 - ERROR_PDOS: PDOS could not be calculated.