Skip to content

Commit

Permalink
Implement user-specified configuration for summary view format
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Dec 29, 2024
1 parent 993bd00 commit 83bc48a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/aiidalab_qe/app/parameters/qeapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ codes:
code: xspectra-7.2@localhost
hp:
code: hp-7.2@localhost

summary_format: list
12 changes: 10 additions & 2 deletions src/aiidalab_qe/app/result/components/summary/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
from aiida import orm
from aiida.cmdline.utils.common import get_workchain_report
from aiida_quantumespresso.workflows.pw.bands import PwBandsWorkChain
from aiidalab_qe.app.parameters import DEFAULT_PARAMETERS
from aiidalab_qe.app.result.components import ResultsComponentModel
from aiidalab_qe.app.static import styles, templates

DEFAULT: dict = DEFAULT_PARAMETERS # type: ignore


FUNCTIONAL_LINK_MAP = {
"PBE": "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.77.3865",
"PBEsol": "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.100.136406",
Expand Down Expand Up @@ -69,7 +73,11 @@ def _fmt_yes_no(truthy):
"fmt_yes_no": _fmt_yes_no,
}
)
template = files(templates).joinpath("workflow_list_summary.jinja").read_text()
template = (
files(templates)
.joinpath(f"workflow_{DEFAULT['summary_format']}_summary.jinja")
.read_text()
)
style = files(styles).joinpath("style.css").read_text()
parameters = self._generate_report_parameters()
report = {key: value for key, value in parameters.items() if value is not None}
Expand Down Expand Up @@ -231,7 +239,7 @@ def _generate_report_parameters(self):
qeapp_wc.inputs.structure.pbc, "xyz"
)

# Spin-Oribit coupling
# Spin-Orbit coupling
report["spin_orbit"] = pw_parameters["SYSTEM"].get("lspinorb", False)

if hubbard_dict := ui_parameters["advanced"].pop("hubbard_parameters", None):
Expand Down

0 comments on commit 83bc48a

Please sign in to comment.