ipyvasp 0.9.94__py2.py3-none-any.whl → 0.9.96__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.94"
1
+ __version__ = "0.9.96"
ipyvasp/widgets.py CHANGED
@@ -595,6 +595,14 @@ class _ThemedFigureInteract(ei.InteractBase):
595
595
  raise AttributeError("subclass must include already initialized "
596
596
  "{'fig': self._fig,'theme':self._theme} in returned dict of _interactive_params() method.")
597
597
  self._update_theme(self._fig,self._theme) # fix theme in starts
598
+ self.observe(self._autosize_figs, names = 'isfullscreen') # fix figurewidget problem
599
+
600
+ def _autosize_figs(self, change):
601
+ for w in self._all_widgets.values():
602
+ # don't know yet about these without importing
603
+ if re.search('plotly.*FigureWidget', str(type(w).__mro__)):
604
+ w.layout.autosize = False # Double trigger is important
605
+ w.layout.autosize = True
598
606
 
599
607
  def _interactive_params(self): return {}
600
608
 
@@ -612,15 +620,14 @@ class _ThemedFigureInteract(ei.InteractBase):
612
620
  self.set_css() # automatically sets dark/light, ensure after icon set
613
621
  fig.layout.autosize = True # must
614
622
 
615
- @_sub_doc(ei.InteractBase.set_css) # overriding to alway be able to set_css
616
- def set_css(self, main=None, center=None):
623
+ def _set_css(self, main=None, center=None): # allowed overriding, but not set_css
617
624
  # This is after setting icon above, so logic is fliipped
618
625
  style = _get_css("light" if self._theme.icon == 'sun' else 'dark') # infer from icon to match
619
626
  if isinstance(main, dict):
620
627
  style = {**style, **main} # main should allow override
621
628
  elif main is not None:
622
629
  raise TypeError("main must be a dict or None, got: {}".format(type(main)))
623
- super().set_css(style, center)
630
+ super()._set_css(style, center)
624
631
 
625
632
  @property
626
633
  def files(self):
@@ -1030,25 +1037,23 @@ class KPathWidget(_ThemedFigureInteract):
1030
1037
 
1031
1038
  @ei.callback
1032
1039
  def _update_theme(self, fig, theme):
1033
- super()._update_theme(fig, theme) # call parent method, but important
1034
-
1035
-
1036
- @ei.callback
1037
- def _toggle_lock(self, lock):
1038
- self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
1039
- self._show_info(f"{self.params.lock.icon}ed adding/deleting kpoints!")
1040
+ return super()._update_theme(fig, theme)
1040
1041
 
1041
1042
  @ei.callback
1042
- def _del_point(self, delp):
1043
- if self.params.lock.icon == 'unlock': # Do not delete locked
1044
- sm = self.params.sm
1045
- for v in sm.value: # for loop here is important to update selection properly
1046
- sm.options = [opt for opt in sm.options if opt[1] != v]
1047
- self._update_selection() # update plot as well
1043
+ def _respond_click(self, lock, delp):
1044
+ if lock.clicked:
1045
+ self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
1046
+ self._show_info(f"{self.params.lock.icon}ed adding/deleting kpoints!")
1047
+ elif delp.clicked:
1048
+ if self.params.lock.icon == 'unlock': # Do not delete locked
1049
+ sm = self.params.sm
1050
+ for v in sm.value: # for loop here is important to update selection properly
1051
+ sm.options = [opt for opt in sm.options if opt[1] != v]
1052
+ self._update_selection() # update plot as well
1053
+ else:
1054
+ self._show_info("Select point(s) to delete")
1048
1055
  else:
1049
- self._show_info("Select point(s) to delete")
1050
- else:
1051
- self._show_info("cannot delete point when locked!", 'red')
1056
+ self._show_info("cannot delete point when locked!", 'red')
1052
1057
 
1053
1058
  def _add_point(self, kpt):
1054
1059
  sm = self.params.sm
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.94
3
+ Version: 0.9.96
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
@@ -46,6 +46,10 @@ cd ipyvasp
46
46
  pip install -e .
47
47
  ```
48
48
 
49
+ ## Documentataion
50
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
51
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
52
+
49
53
  ## Showcase Examples
50
54
  Plot 2D BZ layer on top of 3D!
51
55
 
@@ -76,5 +80,5 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
76
80
 
77
81
  ![snip](op.png)
78
82
 
79
-
83
+ ![BandsWidget](Bands.jpg)
80
84
  More coming soon!
@@ -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=6KOenMyIy675EUXlVSxt9RUyv4EcExk1tm0_mANSFLQ,105935
5
- ipyvasp/_version.py,sha256=tididy_89zFD8mTuhJTXjQyeg-yDR_paq8m5o7c-qvs,24
5
+ ipyvasp/_version.py,sha256=LkfgD4k2g1qhFGmhFzf-cIDtAVsrYMYNg3_j7MN8nKU,24
6
6
  ipyvasp/bsdos.py,sha256=omEiQrdbyZDI0Vd39bktzEyw2Il_w9rFsmYR_jEF-Xk,32180
7
7
  ipyvasp/cli.py,sha256=aWFEVhNmnW8eSOp5uh95JaDwLQ9K9nlCQcbnOSuhWgw,6844
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=joImNDyjpe4T3lrw738X3I3qA1-RysyYotJwlN9_z0w,17510
14
- ipyvasp/widgets.py,sha256=FH8_x9eI2VnOLuNAtRgExFiZmC0FvByWM-LOB2Fh-xE,53242
14
+ ipyvasp/widgets.py,sha256=pT7MchxDryslCiFAAibZrSqRZ9gT59-iuub7ed2AdEA,53651
15
15
  ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  ipyvasp/core/parser.py,sha256=0EySeY5tIqJr-aBK_tJn4GfybV_-3OTBchXBj_cv7-k,39811
17
17
  ipyvasp/core/plot_toolkit.py,sha256=XUB8VYBjv81WowafgLEyHELmzQn-PT36KwLJZKXIx_c,36304
18
18
  ipyvasp/core/serializer.py,sha256=v0ma4htirybtQo_wFhIEjkRoZMQk9ETDz85iloaq3YY,38427
19
19
  ipyvasp/core/spatial_toolkit.py,sha256=dXowREhiFzBvvr5f_bApzFhf8IzjH2E2Ix90oCBUetY,14885
20
- ipyvasp-0.9.94.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
- ipyvasp-0.9.94.dist-info/METADATA,sha256=nQeR4osTSGEfmgtRH5K4kr2miGNn7a6HBTMPZCRiKSk,2654
22
- ipyvasp-0.9.94.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
23
- ipyvasp-0.9.94.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
24
- ipyvasp-0.9.94.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
- ipyvasp-0.9.94.dist-info/RECORD,,
20
+ ipyvasp-0.9.96.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
+ ipyvasp-0.9.96.dist-info/METADATA,sha256=ro5a_ivKIKljgYXNYfqF85_ZDXoeT7xELH2EZVHXJpE,2820
22
+ ipyvasp-0.9.96.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
23
+ ipyvasp-0.9.96.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
24
+ ipyvasp-0.9.96.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
+ ipyvasp-0.9.96.dist-info/RECORD,,