ipyvasp 0.8.8__tar.gz → 0.8.9__tar.gz

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.
Files changed (30) hide show
  1. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/PKG-INFO +1 -1
  2. ipyvasp-0.8.9/ipyvasp/_version.py +1 -0
  3. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/core/serializer.py +10 -6
  4. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/lattice.py +1 -1
  5. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/PKG-INFO +1 -1
  6. ipyvasp-0.8.8/ipyvasp/_version.py +0 -1
  7. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/LICENSE +0 -0
  8. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/README.md +0 -0
  9. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/__init__.py +0 -0
  10. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/__main__.py +0 -0
  11. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/_enplots.py +0 -0
  12. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/_lattice.py +0 -0
  13. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/bsdos.py +0 -0
  14. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/cli.py +0 -0
  15. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/core/__init__.py +0 -0
  16. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/core/parser.py +0 -0
  17. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/core/plot_toolkit.py +0 -0
  18. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/core/spatial_toolkit.py +0 -0
  19. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/evals_dataframe.py +0 -0
  20. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/misc.py +0 -0
  21. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/potential.py +0 -0
  22. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/utils.py +0 -0
  23. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp/widgets.py +0 -0
  24. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/SOURCES.txt +0 -0
  25. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/dependency_links.txt +0 -0
  26. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/entry_points.txt +0 -0
  27. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/requires.txt +0 -0
  28. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/ipyvasp.egg-info/top_level.txt +0 -0
  29. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/setup.cfg +0 -0
  30. {ipyvasp-0.8.8 → ipyvasp-0.8.9}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.8.8
3
+ Version: 0.8.9
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
@@ -0,0 +1 @@
1
+ __version__ = "0.8.9"
@@ -422,7 +422,9 @@ class PoscarData(Dict2Data):
422
422
 
423
423
 
424
424
  def get_bond_data(self, site_indices, k = 5):
425
- "Returns a DataFrame with bonds angle, bond length, vector positions etc. that can be used for plotting."
425
+ """Returns a DataFrame with bonds angle, bond length, vector positions etc. that can be used for plotting.
426
+ t_a and t_b are translation vectors to get them near selected sites. You can use `POSCAR.translate` if somehow need nearest coordinates.
427
+ """
426
428
  if k < 3:
427
429
  raise ValueError("k >= 3 is required!")
428
430
 
@@ -434,16 +436,18 @@ class PoscarData(Dict2Data):
434
436
  for j in js:
435
437
  bs = np.array([self.to_cartesian(self.positions[j] + p) for p in product([-1,0,1],[-1,0,1],[-1,0,1])])
436
438
  ds = np.array([np.linalg.norm(a-b) for b in bs])
437
- nears.append((j, bs[ds.argsort()][0]))
439
+ b = bs[ds.argsort()][0]
440
+ t = tuple((self.to_fractional(b) - self.positions[j]).astype(int)) # keep track of translation vector
441
+ nears.append((j, b, t))
438
442
 
439
- for (m,b),(n, c) in combinations(nears,2):
440
- v1, v2 = b-a, c-a
443
+ for (m,b,t1),(n, c,t2) in combinations(nears,2):
444
+ v1, v2 = b - a, c - a
441
445
  n1, n2 = np.linalg.norm(v1), np.linalg.norm(v2)
442
446
  name = '-'.join(self.symbols[[m,i,n]])
443
447
  angle = np.degrees(np.arccos(v1.dot(v2)/(n1*n2)))
444
- out.append([name, m,i,n, angle, n1, n2, *b, *a, *c])
448
+ out.append([name, m,i,n, angle, n1, n2, t1,t2])
445
449
 
446
- columns = 'bond a o b angle d_ao d_bo ax ay az ox oy oz bx by bz'.split()
450
+ columns = 'bond a o b angle d_ao d_bo t_a t_b'.split()
447
451
  return DataFrame(out, columns=columns)
448
452
 
449
453
  def to_fractional(self, coords):
@@ -293,7 +293,7 @@ class _AutoRenderer:
293
293
  return self._kws.copy() # avoid messing original
294
294
 
295
295
  def __repr__(self):
296
- return f"AutoRenderer({self._kws})"
296
+ return f"AutoRenderer(params = {self._kws})"
297
297
 
298
298
  class POSCAR:
299
299
  _cb_instance = {} # Loads last clipboard data if not changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.8.8
3
+ Version: 0.8.9
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 +0,0 @@
1
- __version__ = "0.8.8"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes