ipyvasp 0.9.99__py2.py3-none-any.whl → 1.0.1__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.99"
1
+ __version__ = "1.0.1"
ipyvasp/core/parser.py CHANGED
@@ -756,7 +756,7 @@ def gen2numpy(
756
756
  for sli, N in zip(slices, shape)
757
757
  ]
758
758
  )
759
- count = int(np.product(new_shape)) # include columns here for overall data count.
759
+ count = int(np.prod(new_shape)) # include columns here for overall data count.
760
760
 
761
761
  # Process generator
762
762
  if include:
@@ -768,7 +768,7 @@ def gen2numpy(
768
768
  gen = (l for l in gen if l.strip()) # remove empty lines
769
769
 
770
770
  gen = islice(
771
- gen, 0, int(np.product(shape[:-1]))
771
+ gen, 0, int(np.prod(shape[:-1]))
772
772
  ) # Discard lines after required data
773
773
 
774
774
  def fold_dim(gen, take, N):
@@ -438,7 +438,7 @@ class PoscarData(Dict2Data):
438
438
  return np.min(dists) if dists.size else np.nan
439
439
 
440
440
 
441
- def get_distances(self, type1, type2, min=-np.infty, max=np.infty):
441
+ def get_distances(self, type1, type2, min=-np.inf, max=np.inf):
442
442
  """Get an array of all distnaces in a range set by min and max between type 1 and type2.
443
443
  For example `get_distances('Ga','As',2,3)[:,-1].mean()` can be used to get average bond length between Ga and As in GaAs.
444
444
  Returned array is of shape (N,3) where first two entries in columns are indices of pairs between which distance was calculated.
ipyvasp/utils.py CHANGED
@@ -459,8 +459,8 @@ RGB = LinearSegmentedColormap.from_list(
459
459
  CMY = LinearSegmentedColormap.from_list(
460
460
  "CMY", [(0, 0.9, 0.9), (0, 0, 0.9), (0.9, 0, 0.9), (0.9, 0, 0), (0.9, 0.9, 0)]
461
461
  )
462
- plt.register_cmap("RGB", RGB)
463
- plt.register_cmap("CMY", CMY)
462
+ plt.colormaps.register(RGB, name="RGB", force=True)
463
+ plt.colormaps.register(CMY, name="CMY", force=True)
464
464
 
465
465
 
466
466
  def create_colormap(name="RB", colors=[(0.9, 0, 0), (0, 0, 0.9)]):
@@ -477,5 +477,5 @@ def create_colormap(name="RB", colors=[(0.9, 0, 0), (0, 0, 0.9)]):
477
477
  Colormap object which you can use to get colors from. like cm = create_colormap(); cm(0.5) which will return a color at center of map
478
478
  """
479
479
  RB = LinearSegmentedColormap.from_list(name, colors)
480
- plt.register_cmap(name, RB)
480
+ plt.colormaps.register(RB, name=name, force=True)
481
481
  return RB
ipyvasp/widgets.py CHANGED
@@ -105,11 +105,17 @@ class Files:
105
105
  files_only : bool, if True, returns only files.
106
106
  dirs_only : bool, if True, returns only directories.
107
107
 
108
- Use methods on return such as `summarize`, `with_name`, `filtered`, `interact` and others.
108
+ Returns
109
+ -------
110
+ Files instance.
111
+
112
+ Notes
113
+ -----
114
+ Use methods on return such as ``summarize``, ``with_name``, ``filtered``, ``interact`` and others.
109
115
 
110
116
  >>> Files(root_1, glob_1,...).add(root_2, glob_2,...) # Fully flexible to chain
111
117
 
112
- WARNING: Don't use write operations on paths in files in batch mode, it can cause unrecoverable data loss.
118
+ **WARNING**: Don't use write operations on paths in files in batch mode, it can cause unrecoverable data loss.
113
119
  """
114
120
  def __init__(self, path_or_files = '.', glob = '*', exclude = None,files_only = False, dirs_only=False):
115
121
  if isinstance(path_or_files, Files):
@@ -235,7 +241,7 @@ class Files:
235
241
  def _unique(self, *files_tuples):
236
242
  return tuple(np.unique(np.hstack(files_tuples)))
237
243
 
238
- @_sub_doc(ei.interactive)
244
+ @_sub_doc(ei.interactive,{"ipyslides.interaction":"einteract"})
239
245
  def interactive(self, *funcs, auto_update=True, app_layout=None, grid_css={},**kwargs):
240
246
  if 'file' in kwargs:
241
247
  raise KeyError("file is a reserved keyword argument to select path to file!")
@@ -255,7 +261,7 @@ class Files:
255
261
 
256
262
  return ei.interactive(*funcs,auto_update=auto_update, app_layout = app_layout, grid_css=grid_css, file = self.to_dropdown(), **kwargs)
257
263
 
258
- @_sub_doc(ei.interact)
264
+ @_sub_doc(ei.interact,{"ipyslides.interaction":"einteract"})
259
265
  def interact(self, *funcs, auto_update=True, app_layout=None, grid_css={},**kwargs):
260
266
  def inner(func):
261
267
  display(self.interactive(func, *funcs,
@@ -812,7 +818,7 @@ class BandsWidget(_ThemedFigureInteract):
812
818
  kmin, kmax = self.params.krange.value or [0,0]
813
819
  kticks = [(int(vs[0]), vs[1])
814
820
  for vs in hsk # We are going to pick kticks silently in given range
815
- if len(vs) == 2 and abs(int(vs[0])) < (kmax - kmin) # handle negative indices too
821
+ if len(vs) == 2 and abs(int(vs[0])) <= (kmax - kmin) # handle negative indices too
816
822
  ] or None
817
823
 
818
824
  _bands = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.99
3
+ Version: 1.0.1
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
@@ -8,28 +8,29 @@ Author-email: mass_qau@outlook.com
8
8
  License: MIT
9
9
  Project-URL: Bug Tracker, https://github.com/massgh/ipyvasp/issues
10
10
  Keywords: Jupyter,Widgets,IPython,VASP,DFT
11
+ Platform: UNKNOWN
11
12
  Classifier: License :: OSI Approved :: MIT License
12
13
  Classifier: Programming Language :: Python :: 3
13
14
  Classifier: Operating System :: OS Independent
14
- Requires-Python: >=3.8
15
+ Requires-Python: >=3.9
15
16
  Description-Content-Type: text/markdown
16
17
  License-File: LICENSE
17
- Requires-Dist: matplotlib ==3.7.0
18
- Requires-Dist: numpy ==1.23.2
19
- Requires-Dist: scipy ==1.9.1
20
- Requires-Dist: ipywidgets >=8.0.4
21
- Requires-Dist: pillow >=9.3.0
22
- Requires-Dist: pandas ==1.4.4
23
- Requires-Dist: plotly ==6.0.1
24
- Requires-Dist: requests ==2.28.1
25
- Requires-Dist: typer ==0.9.0
18
+ Requires-Dist: matplotlib>=3.7.5
19
+ Requires-Dist: numpy>=1.23.2
20
+ Requires-Dist: scipy>=1.9.1
21
+ Requires-Dist: ipywidgets>=8.0.4
22
+ Requires-Dist: pillow>=9.3.0
23
+ Requires-Dist: pandas>=1.4.4
24
+ Requires-Dist: plotly>=6.2.0
25
+ Requires-Dist: requests>=2.28.1
26
+ Requires-Dist: typer>=0.9.0
26
27
  Requires-Dist: einteract
27
28
  Requires-Dist: sympy
28
29
  Provides-Extra: extra
29
- Requires-Dist: jupyterlab >=3.5.2 ; extra == 'extra'
30
- Requires-Dist: ipython >=8.7 ; extra == 'extra'
31
- Requires-Dist: ase >=3.22.1 ; extra == 'extra'
32
- Requires-Dist: nglview >=3.0.4 ; extra == 'extra'
30
+ Requires-Dist: jupyterlab>=3.5.2; extra == "extra"
31
+ Requires-Dist: ipython>=8.7; extra == "extra"
32
+ Requires-Dist: ase>=3.22.1; extra == "extra"
33
+ Requires-Dist: nglview>=3.0.4; extra == "extra"
33
34
 
34
35
 
35
36
  # IPyVASP
@@ -84,3 +85,5 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
84
85
 
85
86
  ![BandsWidget](Bands.jpg)
86
87
  More coming soon! You can test these examples on [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/asaboor-gh/ipyvasp/HEAD?urlpath=%2Fdoc%2Ftree%2Fdocs%2Fsource%2Fnotebooks%2Fquickstart.ipynb).
88
+
89
+
@@ -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=YVUgI4ne0qAZCTwjFoITAv34KcRMoHotpAeNuAx-dW8,105935
5
- ipyvasp/_version.py,sha256=cu1UwpxRD754vXz6SQYYYPzM34JYa9JJEkleYYsPU3c,24
5
+ ipyvasp/_version.py,sha256=j9q3lYMZra0QrErNnn9E5GNXxWLOlDgeOkmX8oXa7ro,23
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
@@ -10,16 +10,16 @@ ipyvasp/lattice.py,sha256=NAe4cmXwkd6V0pRDTw1g5_CoNMfqOIT-NpyOSlSfyv0,33710
10
10
  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
- ipyvasp/utils.py,sha256=1TTULmj2L87tK-sMJdbkO_bHOziyUABLNONWCaGa-J8,17932
14
- ipyvasp/widgets.py,sha256=aJqWD7XkGB7RMYKIJpa8drGd4K1iGEojb-Xdh0dKjVo,53159
13
+ ipyvasp/utils.py,sha256=1eVDhYzK3dr0AC_CouWrU3xIhbVJu7AABscV-qi_vAA,18000
14
+ ipyvasp/widgets.py,sha256=JcLKjn_Wbi5VXgNOB-SB30dD_-dPTslaKFpJwGgr0Mg,53319
15
15
  ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- ipyvasp/core/parser.py,sha256=0EySeY5tIqJr-aBK_tJn4GfybV_-3OTBchXBj_cv7-k,39811
16
+ ipyvasp/core/parser.py,sha256=i1lMlfVPEA0-UFDz9lQnlVlMnVFBkEHBsqYPF3ez_2I,39805
17
17
  ipyvasp/core/plot_toolkit.py,sha256=XUB8VYBjv81WowafgLEyHELmzQn-PT36KwLJZKXIx_c,36304
18
- ipyvasp/core/serializer.py,sha256=v0ma4htirybtQo_wFhIEjkRoZMQk9ETDz85iloaq3YY,38427
18
+ ipyvasp/core/serializer.py,sha256=aEc7K5jVga8gxm9Tt2OgBw8wnsmWZGtODBnwRJ_5sf0,38423
19
19
  ipyvasp/core/spatial_toolkit.py,sha256=dXowREhiFzBvvr5f_bApzFhf8IzjH2E2Ix90oCBUetY,14885
20
- ipyvasp-0.9.99.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
- ipyvasp-0.9.99.dist-info/METADATA,sha256=gRbSCQTFr_3MNMnC9IfiGIHsa7XNzQ7ev9mI_2qaMvQ,3215
22
- ipyvasp-0.9.99.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
23
- ipyvasp-0.9.99.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
24
- ipyvasp-0.9.99.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
- ipyvasp-0.9.99.dist-info/RECORD,,
20
+ ipyvasp-1.0.1.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
+ ipyvasp-1.0.1.dist-info/METADATA,sha256=n2ix06x91IihFM--xF5l9914VZIsbg_CO4PahbgVJlY,3220
22
+ ipyvasp-1.0.1.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
23
+ ipyvasp-1.0.1.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
24
+ ipyvasp-1.0.1.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
+ ipyvasp-1.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
2
  ipyvasp = ipyvasp.cli:app
3
+