aiida_quantumespresso.parsers.parse_xml.versions
#
Module Contents#
Classes#
An enum with the versions of XML output file known to exist for Quantum ESPRESSO. |
Functions#
|
Return the version of the Quantum ESPRESSO pw.x and cp.x XML output file. |
|
Return the absolute filepath to the XML schema file that can be used to parse the given XML. |
Return the absolute filepath to the default XML schema file. |
|
|
Return the filename of the schema file that corresponds to the given XML object. |
Return the filenames of the available XML schemas. |
|
Return whether the given XML object corresponds to an XML output file of Quantum ESPRESSO pw.x post v6.2. |
|
Returns whether the given XML object corresponds to an XML output file of Quantum ESPRESSO pw.x pre v6.2. |
Attributes#
- class aiida_quantumespresso.parsers.parse_xml.versions.QeXmlVersion(*args, **kwds)[source]#
Bases:
enum.Enum
An enum with the versions of XML output file known to exist for Quantum ESPRESSO.
- aiida_quantumespresso.parsers.parse_xml.versions.get_xml_file_version(xml)[source]#
Return the version of the Quantum ESPRESSO pw.x and cp.x XML output file.
- Parameters:
xml – the pre-parsed XML object
- Raises:
XMLUnsupportedFormatError – if the file cannot be read, parsed or if the version cannot be determined
- aiida_quantumespresso.parsers.parse_xml.versions.get_schema_filepath(xml)[source]#
Return the absolute filepath to the XML schema file that can be used to parse the given XML.
- Parameters:
xml – the pre-parsed XML object
- Returns:
the XSD absolute filepath
- aiida_quantumespresso.parsers.parse_xml.versions.get_default_schema_filepath()[source]#
Return the absolute filepath to the default XML schema file.
- Parameters:
xml – the pre-parsed XML object
- Returns:
the XSD absolute filepath
- aiida_quantumespresso.parsers.parse_xml.versions.get_schema_filename(xml)[source]#
Return the filename of the schema file that corresponds to the given XML object.
- Parameters:
xml – the pre-parsed XML object
- Returns:
the XSD filename
- aiida_quantumespresso.parsers.parse_xml.versions.get_available_xml_schemas()[source]#
Return the filenames of the available XML schemas.
These are essentially all the files with the .xsd extenstion in the DIRPATH_SCHEMAS folder
- Returns:
a list of XML schema filenames
- aiida_quantumespresso.parsers.parse_xml.versions.is_valid_post_6_2_version(xml)[source]#
Return whether the given XML object corresponds to an XML output file of Quantum ESPRESSO pw.x post v6.2.
These versions of the output XML are parsable with an XSD schema file
- Parameters:
xml – a parsed XML output file
- Returns:
boolean, True when the XML is parsable with an XSD schema file, False otherwise
- aiida_quantumespresso.parsers.parse_xml.versions.is_valid_pre_6_2_version(xml)[source]#
Returns whether the given XML object corresponds to an XML output file of Quantum ESPRESSO pw.x pre v6.2.
- Parameters:
xml – a parsed XML output file
- Returns:
boolean, True when the XML was produced by Quantum ESPRESSO with the old XML format