aiida_quantumespresso.parsers.parse_raw.pw
#
A collection of function that are used to parse the output of Quantum Espresso PW.
The function that needs to be called from outside is parse_raw_output(). The functions mostly work without aiida specific functionalities. The parsing will try to convert whatever it can in some dictionary, which by operative decision doesn’t have much structure encoded, [the values are simple ]
Module Contents#
Functions#
|
Reduce the symmetry information parsed from the output to save space. |
Hard coded names and rotation matrices + inversion from QE v 5.0.2 function for Parser class usage only. |
|
|
|
|
Parses the stdout content of a Quantum ESPRESSO pw.x calculation. |
|
Attributes#
- aiida_quantumespresso.parsers.parse_raw.pw.reduce_symmetries(parsed_parameters, parsed_structure, logger)[source]#
Reduce the symmetry information parsed from the output to save space.
In the standard output, each symmetry operation print two rotation matrices:
S_cryst^T: matrix in crystal coordinates, transposed
S_cart: matrix in cartesian coordinates,
The XML files only print one matrix:
S_cryst: matrix in crystal coordinates
The raw parsed symmetry information from the XML is large and will load the database heavily if stored as is for each calculation. Instead, we will map these dictionaries onto a static dictionary of rotation matrices generated by the _get_qe_symmetry_list static method. This dictionary will return the rotation matrices in cartesian coordinates, i.e. S_cart. In order to compare the raw matrices from the XML to these static matrices we have to convert S_cryst into S_cart. We derive here how that is done:
S_cryst * v_cryst = v_cryst’
where v_cryst’ is the rotated vector v_cryst under S_cryst We define cell where cell vectors are rows. Converting a vector from crystal to cartesian coordinates is defined as:
cell^T * v_cryst = v_cart
The inverse of this operation is defined as
v_cryst = cell^Tinv * v_cart
Replacing the last equation into the first we find:
S_cryst * cell^Tinv * v_cart = cell^Tinv * v_cart’
Multiply on the left with cell^T gives:
cell^T * S_cryst * cell^Tinv * v_cart = v_cart’
which can be rewritten as:
S_cart * v_cart = v_cart’
where:
S_cart = cell^T * S_cryst * cell^Tinv
We compute here the transpose and its inverse of the structure cell basis, which is needed to transform the parsed rotation matrices, which are in crystal coordinates, to cartesian coordinates, which are the matrices that are returned by the _get_qe_symmetry_list staticmethod
- aiida_quantumespresso.parsers.parse_raw.pw.get_symmetry_mapping()[source]#
Hard coded names and rotation matrices + inversion from QE v 5.0.2 function for Parser class usage only.
- Returns:
a list of dictionaries, each containing name (string), inversion (boolean) and matrix (list of lists)
- aiida_quantumespresso.parsers.parse_raw.pw.parse_stdout(stdout, input_parameters, parser_options=None, parsed_xml=None, crash_file=None)[source]#
Parses the stdout content of a Quantum ESPRESSO pw.x calculation.
- Parameters:
stdout – the stdout content as a string
input_parameters – dictionary with the input parameters
crash_file – the content of the
CRASH
file as a string if it was written,None
otherwise.parser_options – the parser options from the settings input parameter node
parsed_xml – dictionary with data parsed from the XML output file
- Returns:
tuple of two dictionaries, with the parsed data and log messages, respectively