ipyvasp 1.0.8__py2.py3-none-any.whl → 1.0.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/_lattice.py +4 -4
- ipyvasp/_version.py +1 -1
- ipyvasp/bsdos.py +2 -2
- ipyvasp/core/parser.py +3 -14
- ipyvasp/core/plot_toolkit.py +1 -1
- ipyvasp/evals_dataframe.py +1 -1
- ipyvasp/widgets.py +5 -7
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/METADATA +1 -1
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/RECORD +13 -13
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/LICENSE +0 -0
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/WHEEL +0 -0
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/entry_points.txt +0 -0
- {ipyvasp-1.0.8.dist-info → ipyvasp-1.0.9.dist-info}/top_level.txt +0 -0
ipyvasp/_lattice.py
CHANGED
|
@@ -645,7 +645,7 @@ def get_kpath(
|
|
|
645
645
|
Reciprocal basis 3x3 array to use for calculating uniform points.
|
|
646
646
|
|
|
647
647
|
|
|
648
|
-
If `outfile = None`,
|
|
648
|
+
If `outfile = None`, a tuple of header and kpoints array (Nx3) is returned.
|
|
649
649
|
"""
|
|
650
650
|
if isinstance(kpoints, str):
|
|
651
651
|
kpoints = _str2kpoints(kpoints)
|
|
@@ -769,7 +769,7 @@ def get_kpath(
|
|
|
769
769
|
with open(outfile, "w", encoding="utf-8") as f: # allow unicode
|
|
770
770
|
f.write(out_str)
|
|
771
771
|
else:
|
|
772
|
-
|
|
772
|
+
return top_str, points # return points as well for any processing by user.
|
|
773
773
|
|
|
774
774
|
|
|
775
775
|
# Cell
|
|
@@ -804,7 +804,7 @@ def get_kmesh(
|
|
|
804
804
|
Default True, include endpoints in mesh at edges away from origin.
|
|
805
805
|
|
|
806
806
|
|
|
807
|
-
If `outfile = None`,
|
|
807
|
+
If `outfile = None`, a tuple of header and kpoints array (Nx3) is returned.
|
|
808
808
|
|
|
809
809
|
"""
|
|
810
810
|
if len(args) not in [1, 3]:
|
|
@@ -882,7 +882,7 @@ def get_kmesh(
|
|
|
882
882
|
with open(outfile, "w", encoding="utf-8") as f:
|
|
883
883
|
f.write(out_str)
|
|
884
884
|
else:
|
|
885
|
-
|
|
885
|
+
return top_str, points # return points as well for any processing by user.
|
|
886
886
|
|
|
887
887
|
|
|
888
888
|
# Cell
|
ipyvasp/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.9"
|
ipyvasp/bsdos.py
CHANGED
|
@@ -270,7 +270,7 @@ class Bands(_BandsDosBase):
|
|
|
270
270
|
|
|
271
271
|
Parameters
|
|
272
272
|
----------
|
|
273
|
-
source : instance of `ipyvasp.DataSource` such as `ipyvasp.Vasprun` or
|
|
273
|
+
source : instance of `ipyvasp.DataSource` such as `ipyvasp.Vasprun` or a user defined subclass.
|
|
274
274
|
You can define your own class to parse data with same attributes and methods by subclassing `ipyvasp.DataSource`.
|
|
275
275
|
"""
|
|
276
276
|
|
|
@@ -627,7 +627,7 @@ class DOS(_BandsDosBase):
|
|
|
627
627
|
|
|
628
628
|
Parameters
|
|
629
629
|
----------
|
|
630
|
-
source : instance of `ipyvasp.DataSource` such as `ipyvasp.Vasprun` or
|
|
630
|
+
source : instance of `ipyvasp.DataSource` such as `ipyvasp.Vasprun` or a user defined subclass.
|
|
631
631
|
You can define your own class to parse data with same attributes and methods by subclassing `ipyvasp.DataSource`.
|
|
632
632
|
"""
|
|
633
633
|
|
ipyvasp/core/parser.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__all__ = ["Vasprun", "
|
|
1
|
+
__all__ = ["Vasprun", "minify_vasprun", "xml2dict","read"]
|
|
2
2
|
|
|
3
3
|
import re
|
|
4
4
|
from io import StringIO
|
|
@@ -14,7 +14,8 @@ from . import serializer
|
|
|
14
14
|
|
|
15
15
|
class DataSource:
|
|
16
16
|
"""Base class for all data sources. It provides a common interface to access data from different sources.
|
|
17
|
-
Subclass it to get data from a source and implement the
|
|
17
|
+
Subclass it to get data from a source such as recently implemented `vaspout.h5` file and implement the required
|
|
18
|
+
methods with same output as done in Vasprun class."""
|
|
18
19
|
|
|
19
20
|
def __init__(self, path, skipk=None):
|
|
20
21
|
self._path = Path(path).absolute()
|
|
@@ -122,18 +123,6 @@ class DataSource:
|
|
|
122
123
|
)
|
|
123
124
|
|
|
124
125
|
|
|
125
|
-
class Vaspout(DataSource):
|
|
126
|
-
"Read data from vaspout.h5 file on demand."
|
|
127
|
-
# These methods are accessible from parent class, but need here for including in sphinx documentation
|
|
128
|
-
get_evals_dataframe = DataSource.get_evals_dataframe
|
|
129
|
-
poscar = DataSource.poscar
|
|
130
|
-
dos = DataSource.dos
|
|
131
|
-
bands = DataSource.bands
|
|
132
|
-
|
|
133
|
-
def __init__(self, path, skipk=None):
|
|
134
|
-
# super().__init__(path, skipk)
|
|
135
|
-
raise NotImplementedError("Vaspout is not implemented yet.")
|
|
136
|
-
|
|
137
126
|
def read(file, start_match, stop_match=r'\n', nth_match=1, skip_last=False,apply=None):
|
|
138
127
|
"""Reads a part of the file between start_match and stop_match and returns a generator. It is lazy and fast.
|
|
139
128
|
`start_match` and `stop_match`(default is end of same line) are regular expressions. `nth_match` is the number of occurence of start_match to start reading.
|
ipyvasp/core/plot_toolkit.py
CHANGED
|
@@ -937,7 +937,7 @@ def plt2text(
|
|
|
937
937
|
print(out_str)
|
|
938
938
|
|
|
939
939
|
|
|
940
|
-
def plt2html(plt_fig=None, transparent=
|
|
940
|
+
def plt2html(plt_fig=None, transparent=False):
|
|
941
941
|
"""Returns ``ipython.display.HTML(<svg of figure>)``. It clears figure after use. So ``plt.show()`` will not work after this.
|
|
942
942
|
|
|
943
943
|
Parameters
|
ipyvasp/evals_dataframe.py
CHANGED
|
@@ -64,7 +64,7 @@ class EvalsDataFrame(pd.DataFrame):
|
|
|
64
64
|
Parameters
|
|
65
65
|
----------
|
|
66
66
|
source : DataSource
|
|
67
|
-
Data source to collect data from. Could be ``ipyvasp.Vasprun`` or ``ipyvasp.
|
|
67
|
+
Data source to collect data from. Could be ``ipyvasp.Vasprun`` or a user defined subclass of ``ipyvasp.DataSource``. Alternatively you can use ``DataSource.get_dataframe`` method to get dataframe directly.
|
|
68
68
|
spins : list
|
|
69
69
|
of spin indices [zero based here], In output data frame you will see corresponding spin number based on full data.
|
|
70
70
|
bands : list
|
ipyvasp/widgets.py
CHANGED
|
@@ -275,9 +275,9 @@ class Files:
|
|
|
275
275
|
"Get KPathWidget instance with these files."
|
|
276
276
|
return KPathWidget(files = self.with_name('POSCAR'), height = height)
|
|
277
277
|
|
|
278
|
-
def bands_widget(self, height='450px'):
|
|
278
|
+
def bands_widget(self, height='450px',store_clicks=None):
|
|
279
279
|
"Get BandsWidget instance with these files."
|
|
280
|
-
return BandsWidget(files=self._files, height=height)
|
|
280
|
+
return BandsWidget(files=self._files, height=height, store_clicks=store_clicks)
|
|
281
281
|
|
|
282
282
|
def map(self,func, to_df=False):
|
|
283
283
|
"""Map files to a function that takes path as argument.
|
|
@@ -438,7 +438,7 @@ class PropsPicker(VBox): # NOTE: remove New Later
|
|
|
438
438
|
|
|
439
439
|
Parameters
|
|
440
440
|
----------
|
|
441
|
-
system_summary :
|
|
441
|
+
system_summary : DataSource.summary such as impelemented in Vasprun.
|
|
442
442
|
N : int, default is 3, number of projections to pick.
|
|
443
443
|
|
|
444
444
|
You can observe `projections` trait.
|
|
@@ -764,9 +764,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
764
764
|
@dl.callback('out-data')
|
|
765
765
|
def _load_data(self, file):
|
|
766
766
|
if not file: return # First time not available
|
|
767
|
-
self._bands = (
|
|
768
|
-
vp.Vasprun(file) if file.parts[-1].endswith('xml') else vp.Vaspout(file)
|
|
769
|
-
).bands
|
|
767
|
+
self._bands = vp.Vasprun(file).bands
|
|
770
768
|
self.params.ppicks.update(self.bands.source.summary)
|
|
771
769
|
self.params.krange.max = self.bands.source.summary.NKPTS - 1
|
|
772
770
|
self.params.krange.tooltip = f"Includes {self.bands.source.get_skipk()} non-zero weight kpoints"
|
|
@@ -912,7 +910,7 @@ class BandsWidget(_ThemedFigureInteract):
|
|
|
912
910
|
|
|
913
911
|
@property
|
|
914
912
|
def source(self):
|
|
915
|
-
"Returns data source object such as Vasprun or
|
|
913
|
+
"Returns data source object such as Vasprun or user defined subclass of DataSource."
|
|
916
914
|
return self.bands.source
|
|
917
915
|
|
|
918
916
|
@property
|
|
@@ -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=
|
|
5
|
-
ipyvasp/_version.py,sha256=
|
|
6
|
-
ipyvasp/bsdos.py,sha256=
|
|
4
|
+
ipyvasp/_lattice.py,sha256=6DRC_GZlsmdxn94ktULVCZDRHZKJwm5iZ6kEqg9Psk0,106579
|
|
5
|
+
ipyvasp/_version.py,sha256=5fdKqtSBBDvdwuTWCGoh62x6-wR269e8DEQnOPkCHWg,23
|
|
6
|
+
ipyvasp/bsdos.py,sha256=hVHpxkdT2ImRsxwFvMSMHxRSo4LqDM90DnUhwTP8vcs,32192
|
|
7
7
|
ipyvasp/cli.py,sha256=-Lf-qdTvs7WyrA4ALNLaoqxMjLsZkXdPviyQps3ezqg,6880
|
|
8
|
-
ipyvasp/evals_dataframe.py,sha256=
|
|
8
|
+
ipyvasp/evals_dataframe.py,sha256=n2iSH4D4ZbrxlAV4yDTVHbcl3ycfD0zfQYmTBcxjfkE,20789
|
|
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=
|
|
14
|
+
ipyvasp/widgets.py,sha256=Bpa4Y3Eopk_ZPFsVetfysClZP2q_2ONvmOwUol9vVGI,53154
|
|
15
15
|
ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
ipyvasp/core/parser.py,sha256=
|
|
17
|
-
ipyvasp/core/plot_toolkit.py,sha256=
|
|
16
|
+
ipyvasp/core/parser.py,sha256=o-uHyL_w9W0pmxoSt3JmLwwmmT3WRHlHSs_NoiHO-hs,39401
|
|
17
|
+
ipyvasp/core/plot_toolkit.py,sha256=aURiPAu0tWTNctuA9LMEL3CfraRgAOyTJURzDrrO0r0,36232
|
|
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.
|
|
21
|
-
ipyvasp-1.0.
|
|
22
|
-
ipyvasp-1.0.
|
|
23
|
-
ipyvasp-1.0.
|
|
24
|
-
ipyvasp-1.0.
|
|
25
|
-
ipyvasp-1.0.
|
|
20
|
+
ipyvasp-1.0.9.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
|
|
21
|
+
ipyvasp-1.0.9.dist-info/METADATA,sha256=E5y8hHvowwd5WtJRtlSotIgjLCkNEXp9DL7fgrHNCM4,3218
|
|
22
|
+
ipyvasp-1.0.9.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
|
23
|
+
ipyvasp-1.0.9.dist-info/entry_points.txt,sha256=aU-gGjQG2Q8XfxDlNc_8__cwfp8WG2K5ZgFPInTm2jg,45
|
|
24
|
+
ipyvasp-1.0.9.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
|
|
25
|
+
ipyvasp-1.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|