diff --git a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py index 82d0aae..d11cb89 100644 --- a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py +++ b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicmodel.py @@ -105,6 +105,10 @@ def set_model_state(self, parameters: dict): setattr(self, k, v) def _get_default(self, trait): + if trait in ["h_vec", "k_vec"]: + return [1, 1, 1, 100, 1] + elif trait == "Q0_vec": + return [0.0, 0.0, 0.0] return self.traits()[trait].default_value def get_model_state(self): diff --git a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicwidget.py b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicwidget.py index b11f245..7fe0014 100644 --- a/src/aiidalab_qe_vibroscopy/app/widgets/euphonicwidget.py +++ b/src/aiidalab_qe_vibroscopy/app/widgets/euphonicwidget.py @@ -118,7 +118,9 @@ class EuphonicSuperWidget(ipw.VBox): In between, we trigger the initialization of plots via a button. """ - def __init__(self, mode="aiidalab-qe app plugin", model=None, fc=None, q_path=None): + def __init__( + self, mode="aiidalab-qe app plugin", model=None, node=None, fc=None, q_path=None + ): """ Initialize the Euphonic utility class. Parameters: @@ -148,6 +150,7 @@ def __init__(self, mode="aiidalab-qe app plugin", model=None, fc=None, q_path=No self.mode = mode self._model = model # this is the single crystal model. + self._model.node = node self._model.fc_hdf5_content = None self.rendered = False