ipyvasp 1.1.4__py2.py3-none-any.whl → 1.1.6__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__ = "1.1.4"
1
+ __version__ = "1.1.6"
@@ -774,7 +774,7 @@ class BrZoneData(Dict2Data):
774
774
  nxyz : list or tuple of 3 ints
775
775
  Number of tiles along each cartesian direction [nx, ny, nz].
776
776
  Must be 3 positive integers.
777
- If primitive = False, result is not guaranteed to be same size as ``nx * ny * nz`` due to shape distortion.
777
+ If primitive = False, result is not guaranteed to be same size as ``nx * ny * nz`` due to lack of basis alignment with orthogonal axes.
778
778
  filter : callable, optional
779
779
  Function filter(x,y,z) that takes normalized (to 1) cartesian coordinates and returns bool.
780
780
  primitive : bool
@@ -810,14 +810,15 @@ class BrZoneData(Dict2Data):
810
810
  pts = pts[mask]
811
811
  return pts
812
812
 
813
- # Orthogonal/Cartesian-aligned case
814
- target_span = np.linalg.norm(self.basis.sum(axis=0)) * (np.array(nxyz) - 1)
813
+ # Orthogonal/Cartesian-aligned case, span of cell must be considered in cartesian space
814
+ scale = np.ptp(self.normals[:3],axis=1) # X,Y,Z, shape (3, N) are face centers
815
+ target_span = (np.array(nxyz) - 1) * scale # total span in cartesian space
815
816
 
816
- # 2. Map Cartesian box corners to Lattice Space
817
+ # Map Cartesian box corners to Lattice Space
817
818
  corners_cart = np.array([[i, j, k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]) * target_span
818
819
  corners_frac = self.to_fractional(corners_cart)
819
820
 
820
- # 3. Find integer bounds (Must use +1 for inclusive arange)
821
+ # Find integer bounds (Must use +1 later for inclusive arange)
821
822
  n_min = np.floor(corners_frac.min(axis=0)).astype(int)
822
823
  n_max = np.ceil(corners_frac.max(axis=0)).astype(int)
823
824
 
@@ -825,18 +826,13 @@ class BrZoneData(Dict2Data):
825
826
  grid_n = np.array(np.meshgrid(*ranges, indexing='ij')).T.reshape(-1, 3)
826
827
 
827
828
  all_pts = self.to_cartesian(grid_n)
828
-
829
- # 4. Clipping with a slightly more generous epsilon to prevent missing bridge points
830
- eps = 1e-9
829
+
830
+ eps = 1e-9 # Clip points to target span in cartesian space
831
831
  mask = (all_pts >= -eps).all(axis=1) & (all_pts <= target_span + eps).all(axis=1)
832
832
  pts = all_pts[mask]
833
-
834
- N = np.cumprod(nxyz)[-1]
835
- if len(pts) > N: # box becomes too much inclusive at larger points, restrict that
836
- dist = np.linalg.norm(pts - pts.mean(axis=0), axis=1)
837
- pts = pts[np.argsort(dist)[:N]]
833
+ pts = pts - pts.min(axis=0) # shift to zero, in case of cell, they don't start at zero
838
834
 
839
- # 5. Apply Global Normalized filter (preserves geometry)
835
+ # Apply Global Normalized filter (preserves geometry)
840
836
  if filter and len(pts) > 0:
841
837
  p_min, p_max = pts.min(axis=0), pts.max(axis=0)
842
838
  global_range = np.max(p_max - p_min) or 1.0
@@ -855,7 +851,7 @@ class CellData(Dict2Data):
855
851
  _req_keys = ("basis", "faces", "vertices")
856
852
 
857
853
  def __init__(self, d):
858
- super().__init__({k: v for k, v in d.items() if k != "primitive"})
854
+ super().__init__({**d, "primitive": True}) # to use BZ methods properly, but only in primitive mode
859
855
 
860
856
  @property
861
857
  def faces_coords(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 1.1.4
3
+ Version: 1.1.6
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
@@ -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=LW20S2p_jx4bth5JedFnsvAvw6iWT1wLMmoi0Acsz2Y,108120
5
- ipyvasp/_version.py,sha256=PZhUTNgGE_in6n-SwcZzX-gYtmYPohHIX-3AQqOiJEY,23
5
+ ipyvasp/_version.py,sha256=x9FL2OT2SXh3wQnwMN-1smbRacRTCOYcgAuQFQqi_0s,23
6
6
  ipyvasp/bsdos.py,sha256=hVHpxkdT2ImRsxwFvMSMHxRSo4LqDM90DnUhwTP8vcs,32192
7
7
  ipyvasp/cli.py,sha256=-Lf-qdTvs7WyrA4ALNLaoqxMjLsZkXdPviyQps3ezqg,6880
8
8
  ipyvasp/evals_dataframe.py,sha256=n2iSH4D4ZbrxlAV4yDTVHbcl3ycfD0zfQYmTBcxjfkE,20789
@@ -15,11 +15,11 @@ ipyvasp/widgets.py,sha256=Bpa4Y3Eopk_ZPFsVetfysClZP2q_2ONvmOwUol9vVGI,53154
15
15
  ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  ipyvasp/core/parser.py,sha256=o-uHyL_w9W0pmxoSt3JmLwwmmT3WRHlHSs_NoiHO-hs,39401
17
17
  ipyvasp/core/plot_toolkit.py,sha256=ru8-FLJp8-X2p_Ft0F3K68qNSUJhy3jQD_S2zW50FWg,40930
18
- ipyvasp/core/serializer.py,sha256=JhtvuWjqBVSWzsDodUzsO_avTxC5yBH8NkFTM95-FEk,42385
18
+ ipyvasp/core/serializer.py,sha256=Rm1PQlE3NubDl61a4yT89o-8ZwWySbfMJo89L0lIB9o,42387
19
19
  ipyvasp/core/spatial_toolkit.py,sha256=dXowREhiFzBvvr5f_bApzFhf8IzjH2E2Ix90oCBUetY,14885
20
- ipyvasp-1.1.4.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
- ipyvasp-1.1.4.dist-info/METADATA,sha256=pUPSVUeAInyhEuZ_XGLmVUc2ndKaW8SUtqGdvgU1Yus,3218
22
- ipyvasp-1.1.4.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
23
- ipyvasp-1.1.4.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
24
- ipyvasp-1.1.4.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
- ipyvasp-1.1.4.dist-info/RECORD,,
20
+ ipyvasp-1.1.6.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
+ ipyvasp-1.1.6.dist-info/METADATA,sha256=Ti7-dOcP95hKKkDkJKyONM7j6aiPgog96Z6EWRhAS4Q,3218
22
+ ipyvasp-1.1.6.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
23
+ ipyvasp-1.1.6.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
24
+ ipyvasp-1.1.6.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
+ ipyvasp-1.1.6.dist-info/RECORD,,