ipyvasp 1.0.4__py2.py3-none-any.whl → 1.0.5__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ipyvasp/_version.py +1 -1
- ipyvasp/core/plot_toolkit.py +1 -1
- ipyvasp/widgets.py +21 -21
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/METADATA +2 -2
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/RECORD +9 -9
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/LICENSE +0 -0
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/WHEEL +0 -0
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/entry_points.txt +0 -0
- {ipyvasp-1.0.4.dist-info → ipyvasp-1.0.5.dist-info}/top_level.txt +0 -0
ipyvasp/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.5"
|
ipyvasp/core/plot_toolkit.py
CHANGED
|
@@ -20,7 +20,7 @@ import PIL # For text image.
|
|
|
20
20
|
|
|
21
21
|
import plotly.graph_objects as go
|
|
22
22
|
from plotly.io._base_renderers import open_html_in_browser
|
|
23
|
-
from
|
|
23
|
+
from dashlab import patched_plotly
|
|
24
24
|
|
|
25
25
|
from .spatial_toolkit import to_R3, rotation
|
|
26
26
|
from ..utils import _sig_kwargs
|
ipyvasp/widgets.py
CHANGED
|
@@ -33,7 +33,7 @@ import pandas as pd
|
|
|
33
33
|
import ipywidgets as ipw
|
|
34
34
|
import traitlets
|
|
35
35
|
import plotly.graph_objects as go
|
|
36
|
-
import
|
|
36
|
+
import dashlab as dl
|
|
37
37
|
|
|
38
38
|
# Internal imports
|
|
39
39
|
from . import utils as gu
|
|
@@ -241,7 +241,7 @@ class Files:
|
|
|
241
241
|
def _unique(self, *files_tuples):
|
|
242
242
|
return tuple(np.unique(np.hstack(files_tuples)))
|
|
243
243
|
|
|
244
|
-
@_sub_doc(
|
|
244
|
+
@_sub_doc(dl.interactive)
|
|
245
245
|
def interactive(self, *funcs, auto_update=True, post_init:callable=None,**kwargs):
|
|
246
246
|
if 'file' in kwargs:
|
|
247
247
|
raise KeyError("file is a reserved keyword argument to select path to file!")
|
|
@@ -259,9 +259,9 @@ class Files:
|
|
|
259
259
|
if funcs and not has_file_param: # may be no func yet, that is test below
|
|
260
260
|
raise KeyError("At least one of funcs should take 'file' as parameter, none got it!")
|
|
261
261
|
|
|
262
|
-
return
|
|
262
|
+
return dl.interactive(*funcs,auto_update=auto_update, post_init=post_init, file = self.to_dropdown(), **kwargs)
|
|
263
263
|
|
|
264
|
-
@_sub_doc(
|
|
264
|
+
@_sub_doc(dl.interact)
|
|
265
265
|
def interact(self, *funcs, auto_update=True, post_init:callable=None,**kwargs):
|
|
266
266
|
def inner(func):
|
|
267
267
|
display(self.interactive(func, *funcs,
|
|
@@ -583,10 +583,10 @@ def _get_css(mode):
|
|
|
583
583
|
},
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
class _ThemedFigureInteract(
|
|
586
|
+
class _ThemedFigureInteract(dl.DashboardBase):
|
|
587
587
|
"Keeps self._fig anf self._theme button attributes for subclasses to use."
|
|
588
588
|
def __init__(self, *args, **kwargs):
|
|
589
|
-
self._fig =
|
|
589
|
+
self._fig = dl.patched_plotly(go.FigureWidget())
|
|
590
590
|
self._theme = Button(icon='sun', description=' ', tooltip="Toggle Theme")
|
|
591
591
|
super().__init__(*args, **kwargs)
|
|
592
592
|
|
|
@@ -611,7 +611,7 @@ class _ThemedFigureInteract(ei.InteractBase):
|
|
|
611
611
|
"which should only call super()._update_theme(fig, theme) in its body.")
|
|
612
612
|
super().__init_subclass__()
|
|
613
613
|
|
|
614
|
-
@
|
|
614
|
+
@dl.callback
|
|
615
615
|
def _update_theme(self, fig, theme):
|
|
616
616
|
require_dark = (theme.icon == 'sun')
|
|
617
617
|
theme.icon = 'moon' if require_dark else 'sun' # we are not observing icon, so we can do this
|
|
@@ -710,7 +710,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
710
710
|
return _data # since we know customdata, we can flatten dict
|
|
711
711
|
|
|
712
712
|
|
|
713
|
-
@
|
|
713
|
+
@dl.callback
|
|
714
714
|
def _update_theme(self, fig, theme):
|
|
715
715
|
super()._update_theme(fig, theme)
|
|
716
716
|
self._kb_fig.layout.template = fig.layout.template
|
|
@@ -736,7 +736,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
736
736
|
hdata = ipw.HTML(), # to show data in one place
|
|
737
737
|
)
|
|
738
738
|
|
|
739
|
-
@
|
|
739
|
+
@dl.callback('out-selected')
|
|
740
740
|
def _plot_data(self, kb_fig, sdata):
|
|
741
741
|
kb_fig.data = [] # clear in any case to avoid confusion
|
|
742
742
|
if not sdata: return # no change
|
|
@@ -761,7 +761,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
761
761
|
margin=dict(l=40, r=0, b=40, t=40, pad=0),font=dict(family="stix, serif", size=14)
|
|
762
762
|
)
|
|
763
763
|
|
|
764
|
-
@
|
|
764
|
+
@dl.callback('out-data')
|
|
765
765
|
def _load_data(self, file):
|
|
766
766
|
if not file: return # First time not available
|
|
767
767
|
self._bands = (
|
|
@@ -795,19 +795,19 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
795
795
|
)
|
|
796
796
|
self._show_data(self._result) # Load into view
|
|
797
797
|
|
|
798
|
-
@
|
|
798
|
+
@dl.callback
|
|
799
799
|
def _toggle_footer(self, showft):
|
|
800
800
|
self.pane_heights = [0,100 - showft, showft]
|
|
801
801
|
|
|
802
|
-
@
|
|
802
|
+
@dl.callback
|
|
803
803
|
def _set_krange(self, krange):
|
|
804
804
|
self._kws["kpairs"] = [krange,]
|
|
805
805
|
|
|
806
|
-
@
|
|
806
|
+
@dl.callback
|
|
807
807
|
def _warn_update(self, file, kticks, brange, krange, projs):
|
|
808
808
|
self.params.button.description = "🔴 Update Graph"
|
|
809
809
|
|
|
810
|
-
@
|
|
810
|
+
@dl.callback('out-graph')
|
|
811
811
|
def _update_graph(self, fig, button):
|
|
812
812
|
if not self.bands: return # First time not available
|
|
813
813
|
fig.layout.autosize = True # must
|
|
@@ -850,7 +850,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
850
850
|
fig.selected = {} # avoid data from previous figure
|
|
851
851
|
button.description = "Update Graph" # clear trigger
|
|
852
852
|
|
|
853
|
-
@
|
|
853
|
+
@dl.callback('out-click')
|
|
854
854
|
def _click_save_data(self, cdata):
|
|
855
855
|
if self.params.cpoint.value is None: return # at reset-
|
|
856
856
|
data_dict = self._result.copy() # Copy old data
|
|
@@ -984,7 +984,7 @@ class KPathWidget(_ThemedFigureInteract):
|
|
|
984
984
|
info = ipw.HTML(), # consise information in one place
|
|
985
985
|
)
|
|
986
986
|
|
|
987
|
-
@
|
|
987
|
+
@dl.callback('out-fig')
|
|
988
988
|
def _update_fig(self, file, fig):
|
|
989
989
|
if not file: return # empty one
|
|
990
990
|
|
|
@@ -1007,7 +1007,7 @@ class KPathWidget(_ThemedFigureInteract):
|
|
|
1007
1007
|
) # add path that will be updated later
|
|
1008
1008
|
self._show_info("Click points on plot to store for kpath.")
|
|
1009
1009
|
|
|
1010
|
-
@
|
|
1010
|
+
@dl.callback('out-click')
|
|
1011
1011
|
def _click(self, click):
|
|
1012
1012
|
# We are setting value on select multiple to get it done in one click conveniently
|
|
1013
1013
|
# But that triggers infinite loop, so we need to check if click is different next time
|
|
@@ -1024,21 +1024,21 @@ class KPathWidget(_ThemedFigureInteract):
|
|
|
1024
1024
|
elif self.params.lock.icon == "unlock": # only add when open
|
|
1025
1025
|
self._add_point(kp)
|
|
1026
1026
|
|
|
1027
|
-
@
|
|
1027
|
+
@dl.callback('out-kpt')
|
|
1028
1028
|
def _take_kpt(self, kpt):
|
|
1029
1029
|
print("Add kpoint e.g. 0,1,3 at selection(s)")
|
|
1030
1030
|
self._set_kpt(kpt)
|
|
1031
1031
|
|
|
1032
|
-
@
|
|
1032
|
+
@dl.callback('out-lab')
|
|
1033
1033
|
def _set_lab(self, lab):
|
|
1034
1034
|
print("Add label[:number] e.g. X:5,Y,L:9")
|
|
1035
1035
|
self._add_label(lab)
|
|
1036
1036
|
|
|
1037
|
-
@
|
|
1037
|
+
@dl.callback
|
|
1038
1038
|
def _update_theme(self, fig, theme):
|
|
1039
1039
|
return super()._update_theme(fig, theme)
|
|
1040
1040
|
|
|
1041
|
-
@
|
|
1041
|
+
@dl.callback
|
|
1042
1042
|
def _respond_click(self, lock, delp):
|
|
1043
1043
|
if lock.clicked:
|
|
1044
1044
|
self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipyvasp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: A processing tool for VASP DFT input/output processing in Jupyter Notebook.
|
|
5
5
|
Home-page: https://github.com/massgh/ipyvasp
|
|
6
6
|
Author: Abdul Saboor
|
|
@@ -24,7 +24,7 @@ Requires-Dist: pandas>=1.4.4
|
|
|
24
24
|
Requires-Dist: plotly>=6.2.0
|
|
25
25
|
Requires-Dist: requests>=2.28.1
|
|
26
26
|
Requires-Dist: typer>=0.9.0
|
|
27
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: dashlab
|
|
28
28
|
Requires-Dist: sympy
|
|
29
29
|
Provides-Extra: extra
|
|
30
30
|
Requires-Dist: jupyterlab>=3.5.2; extra == "extra"
|
|
@@ -2,7 +2,7 @@ ipyvasp/__init__.py,sha256=pzTqeKuf6sN2GQmaexmMgG677ggT3sxIFyQDXq_2whU,1422
|
|
|
2
2
|
ipyvasp/__main__.py,sha256=eJV1TZSiT8mC_VqAeksNnBI2I8mKMiPkEIlwikbtOjI,216
|
|
3
3
|
ipyvasp/_enplots.py,sha256=gJ7S9WBmrxvDEbmoccDRaJG01kpx9oNlRf7mozigbgY,37872
|
|
4
4
|
ipyvasp/_lattice.py,sha256=4xI8LBypEhTLFxSSsUCGSJjKesxcymIyYBLeM21sO6Q,106414
|
|
5
|
-
ipyvasp/_version.py,sha256=
|
|
5
|
+
ipyvasp/_version.py,sha256=lfZikIZ2prlMV6RkxhMRZj5dAeD0TCswIWS46kSjXw0,23
|
|
6
6
|
ipyvasp/bsdos.py,sha256=omEiQrdbyZDI0Vd39bktzEyw2Il_w9rFsmYR_jEF-Xk,32180
|
|
7
7
|
ipyvasp/cli.py,sha256=-Lf-qdTvs7WyrA4ALNLaoqxMjLsZkXdPviyQps3ezqg,6880
|
|
8
8
|
ipyvasp/evals_dataframe.py,sha256=KWbkvQJSyXeTSG6LJGcZKs0s5-tor5uPee2P8FJd7vs,20759
|
|
@@ -11,15 +11,15 @@ ipyvasp/misc.py,sha256=ItSsG_aWiQZNRXM2F23atmNVdedyXFYtoShflYRvzOU,2645
|
|
|
11
11
|
ipyvasp/potential.py,sha256=tzA73c5lkp6ahLSJchMrU043-QWaOV0nIOUA7VMmfKQ,11408
|
|
12
12
|
ipyvasp/surface.py,sha256=MjE5oB0wW6Pca_C-xu8rN6OMH7lUEeNPNyM7Kz_Im-8,23766
|
|
13
13
|
ipyvasp/utils.py,sha256=1eVDhYzK3dr0AC_CouWrU3xIhbVJu7AABscV-qi_vAA,18000
|
|
14
|
-
ipyvasp/widgets.py,sha256=
|
|
14
|
+
ipyvasp/widgets.py,sha256=nzWRidECiLZ5UzU_j181zleGGGhKOdW3_z0QpMiYThU,53190
|
|
15
15
|
ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
ipyvasp/core/parser.py,sha256=i1lMlfVPEA0-UFDz9lQnlVlMnVFBkEHBsqYPF3ez_2I,39805
|
|
17
|
-
ipyvasp/core/plot_toolkit.py,sha256=
|
|
17
|
+
ipyvasp/core/plot_toolkit.py,sha256=9zecMlDVXQZbAqV7SsKyED7E3jlt9rxcdFnRG1Dh0qE,36231
|
|
18
18
|
ipyvasp/core/serializer.py,sha256=aEc7K5jVga8gxm9Tt2OgBw8wnsmWZGtODBnwRJ_5sf0,38423
|
|
19
19
|
ipyvasp/core/spatial_toolkit.py,sha256=dXowREhiFzBvvr5f_bApzFhf8IzjH2E2Ix90oCBUetY,14885
|
|
20
|
-
ipyvasp-1.0.
|
|
21
|
-
ipyvasp-1.0.
|
|
22
|
-
ipyvasp-1.0.
|
|
23
|
-
ipyvasp-1.0.
|
|
24
|
-
ipyvasp-1.0.
|
|
25
|
-
ipyvasp-1.0.
|
|
20
|
+
ipyvasp-1.0.5.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
|
|
21
|
+
ipyvasp-1.0.5.dist-info/METADATA,sha256=oR9v8_MpS2J32Dg28G7L7M-okfs-EJRFqluxKjzOsLY,3218
|
|
22
|
+
ipyvasp-1.0.5.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
|
23
|
+
ipyvasp-1.0.5.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
|
|
24
|
+
ipyvasp-1.0.5.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
|
|
25
|
+
ipyvasp-1.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|