Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding spin-orbit coupling to process label #954

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
17 changes: 16 additions & 1 deletion src/aiidalab_qe/app/submission/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ def update_process_label(self):
"workchain",
{"properties": []},
)

soc_parameters = self.input_parameters["advanced"]["pw"]["parameters"][
"SYSTEM"
].get("lspinorb", False)

soc_info = "spin-orbit coupling" if soc_parameters else ""

properties = [p for p in workchain_data["properties"] if p != "relax"]
relax_type = workchain_data.get("relax_type", "none")
relax_info = "unrelaxed"
Expand All @@ -109,7 +116,15 @@ def update_process_label(self):
if workchain_data["spin_type"] != "none":
protocol_and_magnetic_info += ", magnetic"
properties_info = f"→ {', '.join(properties)}" if properties else ""
label = f"{structure_label} [{relax_info}, {protocol_and_magnetic_info}] {properties_info}".strip()

label_details = [
relax_info,
protocol_and_magnetic_info,
soc_info,
]
filtered_label_details = [detail for detail in label_details if detail]
label = f"{structure_label} [{', '.join(filtered_label_details)}] {properties_info}".strip()

self.process_label = label

def update_submission_blockers(self):
Expand Down
1 change: 1 addition & 0 deletions src/aiidalab_qe/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def get_builder_from_protocol(
"base_final_scf": parameters["advanced"],
}
protocol = parameters["workchain"]["protocol"]

relax_builder = PwRelaxWorkChain.get_builder_from_protocol(
code=codes["global"]["codes"].get("quantumespresso.pw")["code"],
structure=structure,
Expand Down
Loading