aiida_quantumespresso.tools.pwinputparser#

Utilities to parse Quantum ESPRESSO pw.x input files into AiiDA nodes or builders.

Module Contents#

Classes#

PwInputFile

Parser of Quantum ESPRESSO pw.x input file into AiiDA nodes.

Functions#

create_builder_from_file(input_folder, ...[, ...])

Create a populated process builder for a PwCalculation from a standard QE input file and pseudo (upf) files.

Attributes#

UpfData

aiida_quantumespresso.tools.pwinputparser.UpfData[source]#
class aiida_quantumespresso.tools.pwinputparser.PwInputFile(content, *, qe_version=None, validate_species_names=True)[source]#

Bases: aiida_quantumespresso.tools.base.StructureParseMixin, qe_tools.parsers.PwInputFile

Parser of Quantum ESPRESSO pw.x input file into AiiDA nodes.

Note

This mixes in StructureParseMixin which adds the functionality to parse a StructureData from the input file, instead of a plain dictionary returned by qe_tools.parsers.qeinputparser.get_structure_from_qeinput. Note that one cannot directly add this functionality to a sub class of ~qe_tools.parsers.qeinputparser.QeInputFile and then subsequently sub class that here, because the ~qe_tools.parsers.qeinputparser.CpInputFile is also required and sub classing both leads to problems with the MRO.

get_kpointsdata()[source]#

Return a KpointsData object based on the data in the input file.

Note

If the calculation uses only the gamma k-point (if self.k_points[‘type’] == ‘gamma’), it is necessary to also attach a settings node to the calculation with gamma_only = True.

Returns:

KpointsData object of the kpoints in the input file

Return type:

KpointsData

Raises:

NotImplementedError – if the kpoints are in a format not yet supported.

aiida_quantumespresso.tools.pwinputparser.create_builder_from_file(input_folder, input_file_name, code, metadata, pseudo_folder_path=None)[source]#

Create a populated process builder for a PwCalculation from a standard QE input file and pseudo (upf) files.

Parameters:
Raises:

NotImplementedError – if the structure is not ibrav=0

Returns:

a builder instance for PwCalculation