aiida_quantumespresso.tools.pwinputparser
#
Utilities to parse Quantum ESPRESSO pw.x input files into AiiDA nodes or builders.
Module Contents#
Classes#
Parser of Quantum ESPRESSO pw.x input file into AiiDA nodes. |
Functions#
|
Create a populated process builder for a PwCalculation from a standard QE input file and pseudo (upf) files. |
Attributes#
- 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 aStructureData
from the input file, instead of a plain dictionary returned byqe_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:
- 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:
input_folder (aiida.common.folders.Folder or str) – the folder containing the input file
input_file_name (str) – the name of the input file
code (aiida.orm.AbstractCode or str) – the code associated with the calculation
metadata (dict) – metadata values for the calculation (e.g. resources)
pseudo_folder_path (aiida.common.folders.Folder or str or None) – the folder containing the upf files (if None, then input_folder is used)
- Raises:
NotImplementedError – if the structure is not ibrav=0
- Returns:
a builder instance for PwCalculation