Skip to content

Commit cdcc0b0

Browse files
mbercxt-reents
authored andcommitted
PwParser: Add the XML schema for Quantum ESPRESSO v7.3.1
In the new schema, the `number_of_atomic_wfc` is moved to the `atomic_structure` tag as an attribute. In case the former is not present, we extract the value from the latter.
1 parent 291d23e commit cdcc0b0

File tree

6 files changed

+3853
-10
lines changed

6 files changed

+3853
-10
lines changed

src/aiida_quantumespresso/parsers/parse_xml/parse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ def parse_xml_post_6_2(xml):
303303

304304
num_k_points = band_structure['nks']
305305
num_electrons = band_structure['nelec']
306-
num_atomic_wfc = band_structure['num_of_atomic_wfc']
306+
307+
# In schema v240411 (QE v7.3.1), the `number_of_atomic_wfc` is moved to the `atomic_structure` tag as an attribute
308+
num_atomic_wfc = band_structure.get('num_of_atomic_wfc', None) or outputs['atomic_structure']['@num_of_atomic_wfc']
307309
num_bands = band_structure.get('nbnd', None)
308310
num_bands_up = band_structure.get('nbnd_up', None)
309311
num_bands_down = band_structure.get('nbnd_dw', None)

0 commit comments

Comments
 (0)