Skip to content

Commit

Permalink
Implement a hack to resync basic model spin orbit on process load (#1104
Browse files Browse the repository at this point in the history
)

#984 neglected to address this. The hack ensures that when a process is loaded, the unpacked parameters applied to `spin_orbit` in the advanced model are synchronized with the basic model (and UI by observation).
  • Loading branch information
edan-bainglass authored Jan 19, 2025
1 parent 2f53644 commit 6dc762b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/aiidalab_qe/app/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ def __init__(self, model: ConfigurationStepModel, **kwargs):
)
self._model.add_model("advanced", advanced_model)

# HACK due to spin orbit moving to basic settings (#984), we need to
# sync the basic model's spin orbit when the advanced model's spin
# orbit is set from loaded process
ipw.dlink(
(self._model.get_model("advanced"), "spin_orbit"),
(self._model.get_model("workchain"), "spin_orbit"),
)

self.settings = {
"workchain": self.workchain_settings,
"advanced": self.advanced_settings,
Expand Down

0 comments on commit 6dc762b

Please sign in to comment.