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

Refactoring Euphonic MVC. #108

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
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
10 changes: 3 additions & 7 deletions src/aiidalab_qe_vibroscopy/app/result/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
from aiidalab_qe_vibroscopy.app.widgets.phononwidget import PhononWidget
from aiidalab_qe_vibroscopy.app.widgets.phononmodel import PhononModel

from aiidalab_qe_vibroscopy.app.widgets.euphonicwidget import (
EuphonicSuperWidget as EuphonicWidget,
)
from aiidalab_qe_vibroscopy.app.widgets.euphonicwidget import EuphonicWidget
from aiidalab_qe_vibroscopy.app.widgets.euphonicmodel import (
EuphonicBaseResultsModel as EuphonicModel,
EuphonicResultsModel as EuphonicModel,
)
# from aiidalab_qe_vibroscopy.app.widgets.euphonic.model import EuphonicModel
# from aiidalab_qe_vibroscopy.app.widgets.euphonic.widget import EuphonicWidget


class VibroResultsPanel(ResultsPanel[VibroResultsModel]):
Expand Down Expand Up @@ -76,7 +72,7 @@ def render(self):
)
tab_data.append(("Dielectric Properties", dielectric_widget))

needs_euphonic_tab = False # self._model.needs_euphonic_tab()
needs_euphonic_tab = self._model.needs_euphonic_tab()
if needs_euphonic_tab:
euphonic_model = EuphonicModel()
euphonic_widget = EuphonicWidget(
Expand Down
2 changes: 1 addition & 1 deletion src/aiidalab_qe_vibroscopy/app/widgets/euphonic/model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from aiidalab_qe.common.panel import ResultsModel
from aiida.common.extendeddicts import AttributeDict
import traitlets as tl
from aiidalab_qe_vibroscopy.utils.euphonic.data_manipulation.intensity_maps import (
from aiidalab_qe_vibroscopy.utils.euphonic.data.export_vibronic_to_euphonic import (
export_euphonic_data,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def update_parameters(self):
"save_to": None,
"asr": None,
"dipole_parameter": 1.0,
"use_c": None,
"n_threads": None,
# "use_c": False,
# "n_threads": None,
}

def _update_spectra(self):
Expand Down
Loading
Loading