ipyvasp 1.0.2__py2.py3-none-any.whl → 1.0.4__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/_lattice.py CHANGED
@@ -2378,7 +2378,7 @@ def convert_poscar(poscar_data, atoms_mapping, basis_factor):
2378
2378
 
2379
2379
 
2380
2380
  .. note::
2381
- This can be used to strain basis vectors uniformly only. For non-uniform strain, use :func:`ipyvasp.POSCAR.strain`.
2381
+ This can be used to strain basis vectors uniformly only. For non-uniform strain, use :func:`ipyvasp.POSCAR.deform`.
2382
2382
  """
2383
2383
  poscar_data = poscar_data.to_dict() # Avoid modifying original
2384
2384
  poscar_data["types"] = {
@@ -2572,6 +2572,7 @@ def replace_atoms(poscar_data, func, name):
2572
2572
  for i, k in enumerate(new_types.keys())
2573
2573
  if len(new_types[k]) != 0
2574
2574
  }
2575
+ data["SYSTEM"] = "".join(data["types"].keys()) # Update system name
2575
2576
  return serializer.PoscarData(data) # Return new POSCAR
2576
2577
 
2577
2578
  def sort_poscar(poscar_data, new_order):
ipyvasp/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.0.2"
1
+ __version__ = "1.0.4"
ipyvasp/cli.py CHANGED
@@ -74,7 +74,7 @@ def get_gap(files: List[Path]):
74
74
  from .widgets import summarize
75
75
 
76
76
  def gap_summary(path):
77
- gap = Vasprun(path).bands.gap
77
+ gap = Vasprun(path, skipk=0).bands.gap # don't skip k-points here
78
78
  delattr(gap, "coords") # remove coords info
79
79
  d = gap.to_dict()
80
80
  d["kvbm"] = "(" + ",".join(str(round(k, 4)) for k in d["kvbm"]) + ")"
@@ -25,18 +25,11 @@ from einteract import patched_plotly
25
25
  from .spatial_toolkit import to_R3, rotation
26
26
  from ..utils import _sig_kwargs
27
27
 
28
- try:
29
- from IPython.display import set_matplotlib_formats # old style in < py3.9
30
- except ImportError:
31
- from matplotlib_inline.backend_inline import set_matplotlib_formats
32
28
 
33
- def global_matplotlib_settings(rcParams={}, display_format="svg"):
29
+ def global_matplotlib_settings(rcParams={}, display_format="svg"):
34
30
  "Set global matplotlib settings for notebook."
35
- # Set display format only if the backend is the default inline backend.
36
- # This avoids interfering with other backends like 'ipympl' which are
37
- # required for interactive plotting.
38
- if get_ipython() and "inline" in mpl.get_backend():
39
- set_matplotlib_formats(display_format)
31
+ if ip := get_ipython():
32
+ ip.run_line_magic("config", f"InlineBackend.figure_formats = ['{display_format}', 'svg', 'retina','png','jpeg']")
40
33
 
41
34
  # Gloabal settings matplotlib with some defaults
42
35
  rcParams = {
@@ -234,7 +227,6 @@ def get_axes(
234
227
  pass
235
228
 
236
229
  plt.subplots_adjust(**subplots_adjust_kwargs)
237
-
238
230
  return axs
239
231
 
240
232
 
ipyvasp/widgets.py CHANGED
@@ -242,7 +242,7 @@ class Files:
242
242
  return tuple(np.unique(np.hstack(files_tuples)))
243
243
 
244
244
  @_sub_doc(ei.interactive,{"ipyslides.interaction":"einteract"})
245
- def interactive(self, *funcs, auto_update=True, app_layout=None, grid_css={},**kwargs):
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!")
248
248
 
@@ -259,13 +259,13 @@ 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 ei.interactive(*funcs,auto_update=auto_update, app_layout = app_layout, grid_css=grid_css, file = self.to_dropdown(), **kwargs)
262
+ return ei.interactive(*funcs,auto_update=auto_update, post_init=post_init, file = self.to_dropdown(), **kwargs)
263
263
 
264
264
  @_sub_doc(ei.interact,{"ipyslides.interaction":"einteract"})
265
- def interact(self, *funcs, auto_update=True, app_layout=None, grid_css={},**kwargs):
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,
268
- auto_update=auto_update, app_layout = app_layout, grid_css=grid_css,
268
+ auto_update=auto_update, post_init=post_init,
269
269
  **kwargs)
270
270
  )
271
271
  return func
@@ -686,7 +686,7 @@ class BandsWidget(_ThemedFigureInteract):
686
686
  traitlets.dlink((self.params.fig,'clicked'),(self, 'clicked_data'))
687
687
  traitlets.dlink((self.params.fig,'selected'),(self, 'selected_data'))
688
688
 
689
- self.relayout(
689
+ self.set_layout(
690
690
  left_sidebar=[
691
691
  'head','file','krange','kticks','brange', 'ppicks',
692
692
  [HBox(),('theme','button')], 'kb_fig',
@@ -960,7 +960,7 @@ class KPathWidget(_ThemedFigureInteract):
960
960
  traitlets.dlink((self.params.file,'value'),(self, 'file')) # update file trait
961
961
 
962
962
  btns = [HBox(layout=Layout(min_height="24px")),('lock','delp', 'theme')]
963
- self.relayout(
963
+ self.set_layout(
964
964
  left_sidebar=['head','file',btns, 'info', 'sm','out-kpt','kpt', 'out-lab', 'lab'],
965
965
  center=['fig'], footer = [c for c in self.groups.outputs if not c in ('out-lab','out-kpt')],
966
966
  pane_widths=['25em',1,0], pane_heights=[0,1,0], # footer only has uselessoutputs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 1.0.2
3
+ Version: 1.0.4
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
@@ -1,25 +1,25 @@
1
1
  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
- ipyvasp/_lattice.py,sha256=-RQzY7jjNOT5xltXzLkJLf3ZIspKk3jktGVwAaew8ao,106340
5
- ipyvasp/_version.py,sha256=LZTFaiDdXahAtu6Prb5WEPk4QX_pfMd7zDoNQSzcGsI,23
4
+ ipyvasp/_lattice.py,sha256=4xI8LBypEhTLFxSSsUCGSJjKesxcymIyYBLeM21sO6Q,106414
5
+ ipyvasp/_version.py,sha256=kwEyWwKLIIqYSnkf5eXgPtRgw9Bz51riSupwtvDpJMA,23
6
6
  ipyvasp/bsdos.py,sha256=omEiQrdbyZDI0Vd39bktzEyw2Il_w9rFsmYR_jEF-Xk,32180
7
- ipyvasp/cli.py,sha256=aWFEVhNmnW8eSOp5uh95JaDwLQ9K9nlCQcbnOSuhWgw,6844
7
+ ipyvasp/cli.py,sha256=-Lf-qdTvs7WyrA4ALNLaoqxMjLsZkXdPviyQps3ezqg,6880
8
8
  ipyvasp/evals_dataframe.py,sha256=KWbkvQJSyXeTSG6LJGcZKs0s5-tor5uPee2P8FJd7vs,20759
9
9
  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
13
  ipyvasp/utils.py,sha256=1eVDhYzK3dr0AC_CouWrU3xIhbVJu7AABscV-qi_vAA,18000
14
- ipyvasp/widgets.py,sha256=JcLKjn_Wbi5VXgNOB-SB30dD_-dPTslaKFpJwGgr0Mg,53319
14
+ ipyvasp/widgets.py,sha256=JEKe0knbNAQDuR2INkAODcqVwlRGFGu0bfXf7o68GF0,53268
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=Pz5ZBsInM3Y2tmNxKPGEkX6pg81BDptcTIK7b3upbVg,36560
17
+ ipyvasp/core/plot_toolkit.py,sha256=459jw5WELvEYWgAvDNF5pxmgEUB6UJIdIJDbTgthWoo,36233
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.2.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
- ipyvasp-1.0.2.dist-info/METADATA,sha256=l336yZiQA8J7QQvW3afAJnDyUcL8I1bhkY6FSG4jJ5c,3220
22
- ipyvasp-1.0.2.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
23
- ipyvasp-1.0.2.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
24
- ipyvasp-1.0.2.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
- ipyvasp-1.0.2.dist-info/RECORD,,
20
+ ipyvasp-1.0.4.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
+ ipyvasp-1.0.4.dist-info/METADATA,sha256=m-NzBqNVTQ7oTd83oTEOa6nk_d0djZ4BYUsNBHX-6yo,3220
22
+ ipyvasp-1.0.4.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
23
+ ipyvasp-1.0.4.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
24
+ ipyvasp-1.0.4.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
+ ipyvasp-1.0.4.dist-info/RECORD,,