Skip to content

Commit

Permalink
adding spin-orbit coupling to process label (#954)
Browse files Browse the repository at this point in the history
* adding spin-orbit coupling to process label
  • Loading branch information
AndresOrtegaGuerrero authored Nov 28, 2024
1 parent 92b8299 commit 3720501
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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

0 comments on commit 3720501

Please sign in to comment.