aiida_hubbard.parsers.hp#

Parser implementation for the HpCalculation plugin.

Module Contents#

Classes#

HpParser

Parser implementation for the HpCalculation plugin.

class aiida_hubbard.parsers.hp.HpParser(node: aiida.orm.CalcJobNode)[source]#

Bases: aiida.parsers.Parser

Parser implementation for the HpCalculation plugin.

property is_initialization_only[source]#

Return whether the calculation was an initialization_only run.

This is the case if the determin_num_pert_only flag was set to True in the INPUTHP namelist. In this case, there will only be a stdout file. All other output files will be missing, but that is expected.

property is_partial_mesh[source]#

Return whether the calculation was a run on a qpoint subset.

This is the case if the determine_q_mesh_only flag was set to True in the INPUTHP namelist. In this case, there will only be a stdout file. All other output files will be missing, but that is expected.

property is_partial_site[source]#

Return whether the calculation computed just a sub set of all sites to be perturbed.

A complete run means that all perturbations were calculated and the final matrices were computed.

property is_complete_calculation[source]#

Return whether the calculation was a complete run.

A complete run means that all perturbations were performed and the final matrices were computed.

parse(**kwargs)[source]#

Parse the contents of the output files retrieved in the FolderData.

parse_stdout()[source]#

Parse the stdout output file.

Parse the output parameters from the output of a Hp calculation written to standard out.

Returns:

log messages

validate_premature_exit(logs)[source]#

Analyze problems that will cause a pre-mature termination of the calculation, controlled or not.

parse_hubbard()[source]#

Parse the hubbard output file.

Returns:

optional exit code in case of an error

parse_hubbard_chi()[source]#

Parse the hubbard chi output file.

Returns:

optional exit code in case of an error

parse_hubbard_parameters()[source]#

Parse the hubbard parameters output file.

Returns:

optional exit code in case of an error

parse_hubbard_dat(folder_path)[source]#

Parse the Hubbard parameters output file.

Returns:

optional exit code in case of an error

get_hubbard_structure()[source]#

Set in output an HubbardStructureData with standard Hubbard U formulation.

parse_chi_content(handle)[source]#

Parse the contents of the file {prefix}.chi.dat as written by a HpCalculation.

Parameters:

filepath – absolute filepath to the chi.dat output file

Returns:

dictionary with parsed contents

parse_hubbard_content(handle)[source]#

Parse the contents of the file {prefix}.Hubbard_parameters.dat as written by a HpCalculation.

Parameters:

filepath – absolute filepath to the Hubbard_parameters.dat output file

Returns:

dictionary with parsed contents

static parse_hubbard_matrix(data)[source]#

Parse one of the matrices that are written to the {prefix}.Hubbard_parameters.dat files.

Each matrix should be square of size N, which is given by the product of the number of q-points and the number of Hubbard species. Each matrix row is printed with a maximum number of 8 elements per line and each line is followed by an empty line. In the parsing of the data, we will use the empty line to detect the end of the current matrix row.

Parameters:

data – a list of strings representing lines in the Hubbard_parameters.dat file of a certain matrix

Returns:

square numpy matrix of floats representing the parsed matrix