aiida_quantumespresso.parsers.pw
#
Parser implementation for the PwCalculation calculation job class.
Module Contents#
Classes#
Parser implementation for the PwCalculation calculation job class. |
- class aiida_quantumespresso.parsers.pw.PwParser(node: aiida.orm.CalcJobNode)[source]#
Bases:
aiida_quantumespresso.parsers.base.BaseParser
Parser implementation for the PwCalculation calculation job class.
- parse(**kwargs)[source]#
Parse the retrieved files of a completed PwCalculation into output nodes.
Two nodes that are expected are the default ‘retrieved’ FolderData node which will store the retrieved files permanently in the repository. The second required node is a filepath under the key retrieved_temporary_files which should contain the temporary retrieved files.
- validate_premature_exit(logs)[source]#
Analyze problems that will cause a pre-mature termination of the calculation, controlled or not.
- validate_electronic(trajectory, parameters, logs)[source]#
Analyze problems that are specific to electronic type calculations: i.e. scf, nscf and bands.
- validate_dynamics(trajectory, parameters, logs)[source]#
Analyze problems that are specific to dynamics type calculations: i.e. md and vc-md.
- validate_ionic(trajectory, parameters, logs)[source]#
Analyze problems that are specific to ionic type calculations: i.e. relax and vc-relax.
- is_ionically_converged(trajectory, except_final_scf=False)[source]#
Verify that the calculation was ionically converged.
For a relax calculation this means the forces stored in the trajectory are all below the force convergence threshold which is retrieved from the input parameters. For a vc-relax calculation, the stress should also give a pressure that is below the pressure convergence threshold.
- Parameters:
trajectory – the output trajectory data
except_final_scf – if True will return whether the calculation is converged except for the final scf.
- parse_xml(dir_with_bands=None, parser_options=None)[source]#
Parse the XML output file.
- Parameters:
dir_with_bands – absolute path to directory containing individual k-point XML files for old XML format.
parser_options – optional dictionary with parser options
- Returns:
tuple of two dictionaries, first with raw parsed data and second with log messages
- parse_stdout(parameters, parser_options=None, parsed_xml=None, crash_file=None)[source]#
Parse the stdout output file.
- Parameters:
parameters – the input parameters dictionary
parser_options – optional dictionary with parser options
parsed_xml – the raw parsed data from the XML output
- Returns:
tuple of two dictionaries, first with raw parsed data and second with log messages
- static build_output_parameters(parsed_stdout, parsed_xml)[source]#
Build the dictionary of output parameters from the raw parsed data.
The output parameters are based on the union of raw parsed data from the XML and stdout output files. Currently, if both raw parsed data dictionaries contain the same key, the stdout version takes precedence, but this should not occur as the parse_stdout method should already have solved these conflicts.
- Parameters:
parsed_stdout – the raw parsed data dictionary from the stdout output file
parsed_xml – the raw parsed data dictionary from the XML output file
- Returns:
the union of the two raw parsed data dictionaries
- build_output_structure(parsed_structure)[source]#
Build the output structure from the raw parsed data.
- Parameters:
parsed_structure – the dictionary with raw parsed structure data
- Returns:
a new StructureData created from the parsed data iff the calculation type produces a new structure and the parsed data contained a cell definition. In all other cases, the input structure will be returned.
- static build_output_trajectory(parsed_trajectory, structure)[source]#
Build the output trajectory from the raw parsed trajectory data.
- Parameters:
parsed_trajectory – the raw parsed trajectory data
- Returns:
a TrajectoryData or None
- build_output_kpoints(parsed_parameters, structure)[source]#
Build the output kpoints from the raw parsed data.
- Parameters:
parsed_parameters – the raw parsed data
- Returns:
a KpointsData or None
- build_output_bands(parsed_bands, parsed_kpoints=None)[source]#
Build the output bands from the raw parsed bands data.
- Parameters:
parsed_bands – the raw parsed bands data
parsed_kpoints – the KpointsData to use for the bands
- Returns:
a BandsData or None
- static get_parser_settings_key()[source]#
Return the key that contains the optional parser options in the settings input node.