Calculation parsers

This section describes the different parsers classes for calculations.

Voronoi Parser

class aiida_kkr.parsers.voro.VoronoiParser(calc)[source]

Parser class for parsing output of voronoi code..

__init__(calc)[source]

Initialize the instance of Voronoi_Parser

parse(debug=False, **kwargs)[source]

Parse output data folder, store results in database.

Parameters:

retrieved – a dictionary of retrieved nodes, where the key is the link name

Returns:

nothing if everything is fine or an exit code defined in the voronoi calculation class

KKRcode Parser

Parser for the KKR Code. The parser should never fail, but it should catch all errors and warnings and show them to the user.

class aiida_kkr.parsers.kkr.KkrParser(calc)[source]

Parser class for parsing output of KKR code..

__init__(calc)[source]

Initialize the instance of KkrParser

parse(debug=False, **kwargs)[source]

Parse output data folder, store results in database.

Parameters:

retrieved – a dictionary of retrieved nodes, where the key is the link name

Returns:

a tuple with two values (bool, node_list), where:

  • bool: variable to tell if the parsing succeeded

  • node_list: list of new nodes to be stored in the db (as a list of tuples (link_name, node))

KKRcode - calculation importer Parser

Parser for the KKR imprter, slight modification to KKr parser (dealing of missing output files). The parser should never fail, but it should catch all errors and warnings and show them to the user.

class aiida_kkr.parsers.kkrimporter.KkrImporterParser(calc)[source]

Parser class for parsing output of KKR code after import

__init__(calc)[source]

Initialize the instance of KkrParser

KKRimp Parser

Parser for the KKR-impurity Code. The parser should never fail, but it should catch all errors and warnings and show them to the user.

class aiida_kkr.parsers.kkrimp.KkrimpParser(calc)[source]

Parser class for parsing output of the KKRimp code..

__init__(calc)[source]

Initialize the instance of KkrimpParser

_check_file_existance(files, keyname, fname, icrit, file_errors)[source]

Check if file called fname exists and then add it to the files dict with a given keyname. The icrit index determines how critical it is if a file is not found (1=critical error, 2=only a warning).

parse(debug=False, ignore_nan=True, **kwargs)[source]

Parse output data folder, store results in database.

Parameters:

retrieved – a dictionary of retrieved nodes, where the key is the link name

KKRnano Parser

Created on Mon Dec 13 14:38:59 2021

@author: markus

class aiida_kkr.parsers.kkrnano.KKRnanoParser(calc)[source]

Parser class for parsing output of the KKRnano code

__init__(calc)[source]

Initialize

_convert_all_values_2_python_natives(sub_dictionary)[source]

convert all dtypes of numpy to python native data types in a given (potentially nested) dictionary.

_dict_from_table(captions_columns, captions_lines, array)[source]

returns a dictionary from a table using specified captions for columns and lines

_extract_l_valence_charges(lines, captions)[source]

extract the l-decomposed valence charges charges from the output file of a KKRnano run: reads the used captions and turns the used tables into a dict

_findSimpleEntries(string2find, retrieved_folder, output_file_name, lineindices=[-1], simpleEntry=True)[source]

read out entries that are simply given at the end of a line preceeded by the string2find. returns a list of said entries

_find_block(lines, string, retrieved_folder, output0_file_name)[source]

finds a block which contains the indicated string in passed lines. Can be used for the output of the –prepare step which is indicated by a borderlines of “===”, returns a list of the lineindices in the passed lines.

_get_index_list(string2find, retrieved_folder, output_file_name='', lines=[])[source]

returns list of indicies of lines containting the passed string. opens file, if a file name and no string is passed.

_get_lines(retrieved_folder, output_file_name)[source]

returns list of string lines

_identifyBlocks(lines)[source]

identify the DOS blocks in the respective output files

_process_DOS_file(retrieved_folder, filename)[source]

reading in DOS file output from KKRnano

_read_table_block(lines, retrieved_folder, output0_file_name, index_multiple_tables=-1)[source]

reads a table in the output of the –prepare step which is indicated by a borderlines of “—”, returns a string array of said table.

_stringFromList(stringlist)[source]

turn a list of strings into a single string

parse(debug=False, **kwargs)[source]

Parse output data folder, store results in database.

Parameters:

retrieved – a dictionary of retrieved nodes, where the key is the link name

Returns:

nothing if everything is fine or an exit code defined in the voronoi calculation class