-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7486b06
commit 8ea879c
Showing
9 changed files
with
134 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from aiidalab_qe.common.mvc import Model | ||
from aiida.common.extendeddicts import AttributeDict | ||
import traitlets as tl | ||
|
||
|
||
class DielectricModel(Model): | ||
vibro = tl.Instance(AttributeDict, allow_none=True) | ||
|
||
dielectric_data = {} |
38 changes: 38 additions & 0 deletions
38
src/aiidalab_qe_vibroscopy/app/widgets/dielectricwidget.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import ipywidgets as ipw | ||
from aiidalab_qe_vibroscopy.app.widgets.dielectricmodel import DielectricModel | ||
from aiidalab_qe.common.widgets import LoadingWidget | ||
|
||
|
||
class DielectricWidget(ipw.VBox): | ||
""" | ||
Widget for displaying dielectric properties results | ||
""" | ||
|
||
def __init__(self, model: DielectricModel, dielectric_node: None, **kwargs): | ||
super().__init__( | ||
children=[LoadingWidget("Loading widgets")], | ||
**kwargs, | ||
) | ||
self._model = model | ||
|
||
def render(self): | ||
if self.rendered: | ||
return | ||
|
||
self.dielectric_results_help = ipw.HTML( | ||
"""<div style="line-height: 140%; padding-top: 0px; padding-bottom: 5px"> | ||
The DielectricWorkchain computes different properties: <br> | ||
<em style="display: inline-block; margin-left: 20px;">-High Freq. Dielectric Tensor </em> <br> | ||
<em style="display: inline-block; margin-left: 20px;">-Born Charges </em> <br> | ||
<em style="display: inline-block; margin-left: 20px;">-Raman Tensors </em> <br> | ||
<em style="display: inline-block; margin-left: 20px;">-The non-linear optical susceptibility tensor </em> <br> | ||
All information can be downloaded as a JSON file. <br> | ||
</div>""" | ||
) | ||
|
||
self.children = [ | ||
self.dielectric_results_help, | ||
] | ||
|
||
self.rendered = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters