ipyvasp 0.8.8__py2.py3-none-any.whl → 0.8.9__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 +1 -1
- ipyvasp/core/serializer.py +10 -6
- ipyvasp/lattice.py +1 -1
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/METADATA +1 -1
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/RECORD +9 -9
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/LICENSE +0 -0
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/WHEEL +0 -0
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/entry_points.txt +0 -0
- {ipyvasp-0.8.8.dist-info → ipyvasp-0.8.9.dist-info}/top_level.txt +0 -0
ipyvasp/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.8.
|
|
1
|
+
__version__ = "0.8.9"
|
ipyvasp/core/serializer.py
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
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
|
|
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):
|
ipyvasp/lattice.py
CHANGED
|
@@ -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
|
|
@@ -2,11 +2,11 @@ ipyvasp/__init__.py,sha256=7o41i5eYlNKg1Hsv0DLNFZ81GilxB02IXAJN-QiJQi0,1420
|
|
|
2
2
|
ipyvasp/__main__.py,sha256=eJV1TZSiT8mC_VqAeksNnBI2I8mKMiPkEIlwikbtOjI,216
|
|
3
3
|
ipyvasp/_enplots.py,sha256=D38paN8zqZgluNAwmCwcocd7-_h_T0HTGolI1eBkDes,37484
|
|
4
4
|
ipyvasp/_lattice.py,sha256=TaiPj_cbBkmuCd40hM01_grNVLcn2hK70fTCN98GNgU,104018
|
|
5
|
-
ipyvasp/_version.py,sha256=
|
|
5
|
+
ipyvasp/_version.py,sha256=Fj0n620aEHCHlsmEXmEGKx9B0YdzMeN3Yc9ZouxRIBU,23
|
|
6
6
|
ipyvasp/bsdos.py,sha256=ZtQji-W11UdFFicAoWZjlqVhI5tqYu_jpKyPPWKkeeo,30634
|
|
7
7
|
ipyvasp/cli.py,sha256=aWFEVhNmnW8eSOp5uh95JaDwLQ9K9nlCQcbnOSuhWgw,6844
|
|
8
8
|
ipyvasp/evals_dataframe.py,sha256=-sqxK7LPV6sYDO_XXmZ80FznOaXTkVdbqJKKvTUtMak,20637
|
|
9
|
-
ipyvasp/lattice.py,sha256=
|
|
9
|
+
ipyvasp/lattice.py,sha256=Ow9BJa8ceasquLPOqsnpj2ysf45IHta1wLtEXoDHtTw,29642
|
|
10
10
|
ipyvasp/misc.py,sha256=SZJ_ePUR2-HEKYTEpDHVRVE7zpIQVTCjiuw0BCC9UTU,2349
|
|
11
11
|
ipyvasp/potential.py,sha256=tzA73c5lkp6ahLSJchMrU043-QWaOV0nIOUA7VMmfKQ,11408
|
|
12
12
|
ipyvasp/surface.py,sha256=MjE5oB0wW6Pca_C-xu8rN6OMH7lUEeNPNyM7Kz_Im-8,23766
|
|
@@ -15,11 +15,11 @@ ipyvasp/widgets.py,sha256=fZ2b7EYYxuaAVfklnLa0VJ00U9Uyd7SqXrzt0hbLOvI,45400
|
|
|
15
15
|
ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
ipyvasp/core/parser.py,sha256=C3CaZsJbPME_ttYlYy4DXeOdL7dnkXs-cHRwFZL6bio,38058
|
|
17
17
|
ipyvasp/core/plot_toolkit.py,sha256=8t5svyWbOm-PS7ZvIptnK6F46kp6uwoGNdohPv5dQKA,35962
|
|
18
|
-
ipyvasp/core/serializer.py,sha256=
|
|
18
|
+
ipyvasp/core/serializer.py,sha256=57e2ypF18tJI1zZi9kJiHGMBYgXvYEZpLmgnaaDdSk0,36067
|
|
19
19
|
ipyvasp/core/spatial_toolkit.py,sha256=8DBYTiBFWJ7OBKuvOPw7UoEVCyNjJhSW0OcudjYZvAw,14748
|
|
20
|
-
ipyvasp-0.8.
|
|
21
|
-
ipyvasp-0.8.
|
|
22
|
-
ipyvasp-0.8.
|
|
23
|
-
ipyvasp-0.8.
|
|
24
|
-
ipyvasp-0.8.
|
|
25
|
-
ipyvasp-0.8.
|
|
20
|
+
ipyvasp-0.8.9.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
|
|
21
|
+
ipyvasp-0.8.9.dist-info/METADATA,sha256=GcN76IweS9RJKKCj7fxtZwyap1w97BO1_hSDHnEk3Q8,2420
|
|
22
|
+
ipyvasp-0.8.9.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
|
23
|
+
ipyvasp-0.8.9.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
|
|
24
|
+
ipyvasp-0.8.9.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
|
|
25
|
+
ipyvasp-0.8.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|