ipyvasp 0.8.1__py2.py3-none-any.whl → 0.8.3__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 +28 -16
- ipyvasp/_version.py +1 -1
- ipyvasp/lattice.py +1 -1
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/METADATA +1 -1
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/RECORD +9 -9
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/LICENSE +0 -0
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/WHEEL +0 -0
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/entry_points.txt +0 -0
- {ipyvasp-0.8.1.dist-info → ipyvasp-0.8.3.dist-info}/top_level.txt +0 -0
ipyvasp/_lattice.py
CHANGED
|
@@ -1728,7 +1728,7 @@ def iplot_lattice(
|
|
|
1728
1728
|
colors = [_atom_colors[elem] for elem in uelems.keys()]
|
|
1729
1729
|
colors = ["rgb({},{},{})".format(*[int(_c * 255) for _c in c]) for c in colors]
|
|
1730
1730
|
|
|
1731
|
-
_colors = np.array([colors[i] for i, vs in enumerate(uelems.values()) for v in vs])
|
|
1731
|
+
_colors = np.array([colors[i] for i, vs in enumerate(uelems.values()) for v in vs],dtype=object) # could be mixed color types
|
|
1732
1732
|
|
|
1733
1733
|
if np.any(pairs):
|
|
1734
1734
|
coords_p = coords[pairs] # paired points
|
|
@@ -1742,25 +1742,37 @@ def iplot_lattice(
|
|
|
1742
1742
|
colors_n = [*colors_n, *_c] # same shape.
|
|
1743
1743
|
|
|
1744
1744
|
coords_n = np.array(coords_n)
|
|
1745
|
-
colors_n = np.array(colors_n)
|
|
1745
|
+
colors_n = np.array(colors_n, dtype=object)
|
|
1746
|
+
|
|
1747
|
+
# Instead of plotting for each pair, we can make only as little lines as types of atoms to speec up
|
|
1748
|
+
unqc = [] # mixed colors type can't be sorted otherwise
|
|
1749
|
+
for c in colors_n:
|
|
1750
|
+
if c not in unqc:
|
|
1751
|
+
unqc.append(c)
|
|
1752
|
+
|
|
1753
|
+
clabs = [unqc.index(c) for c in colors_n] # few colors categories
|
|
1754
|
+
corder = np.argsort(clabs) # coordinates order for those categories
|
|
1755
|
+
|
|
1756
|
+
groups = dict([(i,[]) for i in range(len(unqc))])
|
|
1757
|
+
for co in corder:
|
|
1758
|
+
groups[clabs[co]].append(coords_n[co])
|
|
1759
|
+
groups[clabs[co]].append([[np.nan, np.nan, np.nan]]) # nan to break links outside bonds
|
|
1760
|
+
|
|
1761
|
+
for i in range(len(unqc)):
|
|
1762
|
+
groups[i] = np.concatenate(groups[i], axis=0)
|
|
1746
1763
|
|
|
1747
1764
|
bond_kws = {"line_width": 4, **bond_kws}
|
|
1748
1765
|
|
|
1749
|
-
for
|
|
1766
|
+
for i, cp in groups.items():
|
|
1750
1767
|
showlegend = True if i == 0 else False
|
|
1751
|
-
fig.add_trace(
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
showlegend=showlegend,
|
|
1760
|
-
name="Bonds",
|
|
1761
|
-
**bond_kws,
|
|
1762
|
-
)
|
|
1763
|
-
)
|
|
1768
|
+
fig.add_trace(go.Scatter3d(x=cp[:, 0].T, y=cp[:, 1].T, z=cp[:, 2].T,
|
|
1769
|
+
mode="lines",
|
|
1770
|
+
line_color=unqc[i],
|
|
1771
|
+
legendgroup="Bonds",
|
|
1772
|
+
showlegend=showlegend,
|
|
1773
|
+
name="Bonds",
|
|
1774
|
+
**bond_kws,
|
|
1775
|
+
))
|
|
1764
1776
|
|
|
1765
1777
|
site_kws = {
|
|
1766
1778
|
**dict(line_color="rgba(1,1,1,0)", line_width=0.001, opacity=1),
|
ipyvasp/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.8.
|
|
1
|
+
__version__ = "0.8.3"
|
ipyvasp/lattice.py
CHANGED
|
@@ -530,7 +530,7 @@ class POSCAR:
|
|
|
530
530
|
|
|
531
531
|
|
|
532
532
|
def update_weas(self, handle):
|
|
533
|
-
"""Send result of any
|
|
533
|
+
"""Send result of any operation to view on opened weas widget handle with default parameters becuase any operations
|
|
534
534
|
can be incompatible with presious state of POSCAR. VESTA color scheme is used here.
|
|
535
535
|
Useful in Jupyterlab side panel to look operations results on POSCAR."""
|
|
536
536
|
handle.from_ase(self.to_ase())
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
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
|
-
ipyvasp/_lattice.py,sha256=
|
|
5
|
-
ipyvasp/_version.py,sha256=
|
|
4
|
+
ipyvasp/_lattice.py,sha256=GlSoBwS_LckiZIArtZ3CbFfktG29oBqEAZtLHwYtzak,104390
|
|
5
|
+
ipyvasp/_version.py,sha256=AM0-MB9td9-Rmee_1ARKY1bWYwq-qbjwR15DCGe0x6o,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=t_aIkfVtD9Thi0b3ACEtAYcTuzt0SGCtub7hKV-Q83c,28468
|
|
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
|
|
@@ -17,9 +17,9 @@ ipyvasp/core/parser.py,sha256=C3CaZsJbPME_ttYlYy4DXeOdL7dnkXs-cHRwFZL6bio,38058
|
|
|
17
17
|
ipyvasp/core/plot_toolkit.py,sha256=cktbPZTJ4K0_6-vKYqtQ1xIIPZg-gHJY5793M9XoYQ0,35754
|
|
18
18
|
ipyvasp/core/serializer.py,sha256=cHGlaDEyhlfsNgy5SDMcZewc2DIy7uyMyCmsrvOAqlM,33539
|
|
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.3.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
|
|
21
|
+
ipyvasp-0.8.3.dist-info/METADATA,sha256=D-Nih1mFlk8fKFpiqyWI-BRn-WjTO71qajTgY0V_IRc,2436
|
|
22
|
+
ipyvasp-0.8.3.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
|
23
|
+
ipyvasp-0.8.3.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
|
|
24
|
+
ipyvasp-0.8.3.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
|
|
25
|
+
ipyvasp-0.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|