aiida_quantumespresso.parsers.projwfc#

Module Contents#

Classes#

ProjwfcParser

Parser implementation for the ProjwfcCalculation calculation job class.

Functions#

find_orbitals_from_statelines(out_info_dict)

This function reads in all the state_lines, that is, the lines describing which atomic states, taken from the

spin_dependent_subparser(out_info_dict)

This find the projection and bands arrays from the out_file and out_info_dict. Used to handle the different

natural_sort_key(sort_key[, _nsre])

Pass to key for str.sort to achieve natural sorting. For example, ["2", "11", "1"] will be sorted to

spin_dependent_pdos_subparser(out_info_dict)

Finds and labels the pdos arrays associated with the out_info_dict.

aiida_quantumespresso.parsers.projwfc.find_orbitals_from_statelines(out_info_dict)[source]#

This function reads in all the state_lines, that is, the lines describing which atomic states, taken from the pseudopotential, are used for the projection. Then it converts these state_lines into a set of orbitals.

Parameters:

out_info_dict – contains various technical internals useful in parsing

Returns:

orbitals, a list of orbitals suitable for setting ProjectionData

aiida_quantumespresso.parsers.projwfc.spin_dependent_subparser(out_info_dict)[source]#

This find the projection and bands arrays from the out_file and out_info_dict. Used to handle the different possible spin-cases in a convenient manner.

Parameters:

out_info_dict – contains various technical internals useful in parsing

Returns:

ProjectionData, BandsData parsed from out_file

aiida_quantumespresso.parsers.projwfc.natural_sort_key(sort_key, _nsre=re.compile('([0-9]+)'))[source]#

Pass to key for str.sort to achieve natural sorting. For example, ["2", "11", "1"] will be sorted to ["1", "2", "11"] instead of ["1", "11", "2"]

Parameters:

sort_key – Original key to be processed

Returns:

A list of string and integers.

aiida_quantumespresso.parsers.projwfc.spin_dependent_pdos_subparser(out_info_dict)[source]#

Finds and labels the pdos arrays associated with the out_info_dict.

Parameters:

out_info_dict – contains various technical internals useful in parsing

Returns:

(pdos_name, pdos_array) tuples for all the specific pdos

class aiida_quantumespresso.parsers.projwfc.ProjwfcParser(node: aiida.orm.CalcJobNode)[source]#

Bases: aiida_quantumespresso.parsers.base.BaseParser

Parser implementation for the ProjwfcCalculation calculation job class.

Parses projection arrays that map the projection onto each point in the bands structure, as well as pdos arrays, which map the projected density of states onto an energy axis.

parse(**kwargs)[source]#

Parse the retrieved files from a ProjwfcCalculation into output nodes.

_parse_xml(retrieved_temporary_folder)[source]#

Parse the XML file.

The XML must be parsed in order to obtain the required information for the orbital parsing.

_parse_bands_and_projections(out_info_dict)[source]#

Function that parses the standard output into bands and projection data.

Parameters:

out_info_dict – used to pass technical internal variables to helper functions in compact form

Returns:

append_nodes_list a list containing BandsData and ProjectionData parsed from standard_out