aim2dat.io.cp2k

Modules to read output and write input files for the CP2K code.

Submodules

Package Contents

Functions

read_atom_proj_density_of_states(→ dict)

Read the atom projected density of states from CP2K.

read_band_structure(→ dict)

Read band structure file from CP2K.

read_optimized_structure(→ Union[dict, List[dict]])

Read optimized structures from 'restart'-files.

read_restart_structure(→ Union[dict, List[dict]])

Read structures from 'restart'-files.

read_stdout(→ dict)

Read standard output file of CP2K.

aim2dat.io.cp2k.read_atom_proj_density_of_states(folder_path: str) dict[source]

Read the atom projected density of states from CP2K.

Parameters:

folder_path (str) – Path to the folder of the pdos files.

Returns:

pdos (dict) – Dictionary containing the projected density of states for each kind.

aim2dat.io.cp2k.read_band_structure(file_name: str) dict[source]

Read band structure file from CP2K.

Parameters:

file_name (str) – Path of the output-file of CP2K containing the band structure.

Returns:

band_structure (dict) – Dictionary containing the k-path and the eigenvalues as well as the occupations.

aim2dat.io.cp2k.read_optimized_structure(folder_path: str) dict | list[dict][source]

Read optimized structures from ‘restart’-files.

Parameters:

folder_path (str) – Path to the folder containing the CP2K ouput-files.

Returns:

dict or list – Dictionary containing the structural information. In case of a farming job a list of dictionaries is returned. In case several calculations have been run in the same folder a nested dictionary is returned.

aim2dat.io.cp2k.read_restart_structure(folder_path: str) dict | list[dict][source]

Read structures from ‘restart’-files.

Parameters:

folder_path (str) – Path to the folder containing the CP2K ouput-files.

Returns:

dict or list – Dictionary or list of dictionaries containing the structural information. In case of a farming job or several calculations have been run in the same folder, a list of dictionaries is returned.

aim2dat.io.cp2k.read_stdout(file_name: str, parser_type: str = 'standard') dict[source]

Read standard output file of CP2K.

Parameters:
  • file_name (str) – Path to the output file.

  • parser_type (str) – Defines the quantities that are being parsed. Supported options are 'standard', 'partial_charges' and 'trajectory'.

Returns:

dict – Dictionary containing the parsed values.