Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/aiidalab_qe/app/result/components/summary/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,15 @@ def _generate_report_parameters(self):
"cell_angles": "{:.0f} {:.0f} {:.0f}".format(*structure.cell_angles),
}

relax_value_mapping = {
"none": "off",
"positions": "atomic positions",
"positions_cell": "full geometry",
}

report |= {
"basic_settings": {
"relaxed": "off"
if basic["relax_type"] == "none"
else basic["relax_type"],
"relaxed": relax_value_mapping.get(basic["relax_type"], "off"),
"protocol": basic["protocol"],
"spin_type": "off" if basic["spin_type"] == "none" else "on",
"electronic_type": basic["electronic_type"],
Expand Down Expand Up @@ -225,6 +229,10 @@ def _generate_report_parameters(self):
"value": f"{pseudo_library} {pseudo_protocol} v{pseudo_version}",
},
}
report["advanced_settings"]["pseudos"] = "<br>".join(
f"<b>{kind}:</b> {(pp := orm.load_node(pp_uuid)).filename} (PK={pp.pk})"
for kind, pp_uuid in advanced.get("pw", {}).get("pseudos", {}).items()
)

# Extract the pw calculation parameters from the ui_parameters
pw_parameters = ui_parameters["advanced"].get("pw", {}).get("parameters", {})
Expand Down
6 changes: 3 additions & 3 deletions src/aiidalab_qe/app/result/components/summary/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@
"type": "link",
"description": "The pseudopotential library used for the calculation"
},
"pseudo_protocol": {
"title": "Pseudopotential protocol",
"pseudos": {
"title": "Pseudopotentials",
"type": "text",
"description": "The pseudopotential protocol used for the calculation"
"description": "The pseudopotentials used for the calculation"
},
"energy_cutoff_wfc": {
"title": "Energy cutoff (wave functions)",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_result/test_summary_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ advanced_settings:
pseudo_library:
url: https://www.materialscloud.org/discover/sssp/table/efficiency
value: SSSP efficiency v1.3
pseudos: <b>Si:</b> Si.upf (PK=3)
scf_kpoints_distance: 0.3 Å<sup>-1</sup>
smearing: cold
spin_orbit: 'off'
Expand All @@ -20,7 +21,7 @@ basic_settings:
electronic_type: metal
periodicity: xyz
protocol: fast
relaxed: positions_cell
relaxed: full geometry
spin_type: 'off'
initial_structure_properties:
cell_angles: 60 60 60
Expand Down