Skip to content

Commit

Permalink
fix logic of band_kpoints_distance for periodicity x and xy
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresOrtegaGuerrero committed Nov 6, 2023
1 parent 7224f00 commit ed8bc53
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/aiidalab_qe/app/result/summary_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
(True, False, False): "x",
}

# Bands_kpoints_distance from protocol for x and xy from protocol bands (aiida-quantumespresso)
BANDS_KPOINTS_DISTANCE = {
"fast": 0.1,
"moderate": 0.025,
"precise": 0.015,
}


def generate_report_parameters(qeapp_wc):
"""Generate the report parameters from the ui parameters and workchain's input.
Expand Down Expand Up @@ -111,9 +118,15 @@ def generate_report_parameters(qeapp_wc):
)
# hard code bands and pdos
if "bands" in qeapp_wc.inputs:
report[
"bands_kpoints_distance"
] = qeapp_wc.inputs.bands.bands_kpoints_distance.value
if "bands_kpoints_distance" in qeapp_wc.inputs.bands:
report[
"bands_kpoints_distance"
] = qeapp_wc.inputs.bands.bands_kpoints_distance.value
else:
report["bands_kpoints_distance"] = BANDS_KPOINTS_DISTANCE[
report["protocol"]
]

if "pdos" in qeapp_wc.inputs:
report[
"nscf_kpoints_distance"
Expand Down

0 comments on commit ed8bc53

Please sign in to comment.