quant-met 0.0.26__py3-none-any.whl → 0.1.0__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.
- quant_met/__init__.py +4 -4
- quant_met/bdg/__init__.py +26 -0
- quant_met/bdg/bdg_hamiltonian.py +97 -0
- quant_met/bdg/gap_equation.py +127 -0
- quant_met/bdg/sc_current.py +60 -0
- quant_met/bdg/superfluid_weight.py +110 -0
- quant_met/cli/__init__.py +0 -4
- quant_met/cli/crit_temp.py +18 -15
- quant_met/cli/main.py +8 -8
- quant_met/cli/q_analysis.py +60 -0
- quant_met/cli/q_loop.py +91 -0
- quant_met/cli/scf.py +44 -22
- quant_met/parameters/__init__.py +0 -25
- quant_met/parameters/control.py +57 -0
- quant_met/parameters/main.py +2 -54
- quant_met/quantum_geometry/__init__.py +13 -0
- quant_met/quantum_geometry/qgt.py +37 -0
- quant_met/routines/__init__.py +22 -0
- quant_met/routines/analyse_q_data.py +226 -0
- quant_met/routines/loop_over_q.py +154 -0
- quant_met/{mean_field → routines}/search_crit_temp.py +71 -47
- quant_met/{mean_field → routines}/self_consistency.py +32 -27
- quant_met/utils.py +1 -5
- {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/METADATA +7 -11
- quant_met-0.1.0.dist-info/RECORD +28 -0
- quant_met/cli/_utils.py +0 -66
- quant_met/cli/dmft.py +0 -96
- quant_met/dmft/__init__.py +0 -5
- quant_met/dmft/dmft_loop.py +0 -178
- quant_met/dmft/utils.py +0 -207
- quant_met/geometry/__init__.py +0 -35
- quant_met/geometry/base_lattice.py +0 -99
- quant_met/geometry/bz_path.py +0 -89
- quant_met/geometry/graphene.py +0 -47
- quant_met/geometry/square.py +0 -46
- quant_met/mean_field/__init__.py +0 -39
- quant_met/mean_field/_utils.py +0 -16
- quant_met/mean_field/hamiltonians/__init__.py +0 -33
- quant_met/mean_field/hamiltonians/base_hamiltonian.py +0 -792
- quant_met/mean_field/hamiltonians/dressed_graphene.py +0 -117
- quant_met/mean_field/hamiltonians/graphene.py +0 -94
- quant_met/mean_field/hamiltonians/one_band_tight_binding.py +0 -69
- quant_met/mean_field/hamiltonians/three_band_tight_binding.py +0 -84
- quant_met/mean_field/hamiltonians/two_band_tight_binding.py +0 -75
- quant_met/parameters/hamiltonians.py +0 -181
- quant_met/plotting/__init__.py +0 -30
- quant_met/plotting/plotting.py +0 -214
- quant_met-0.0.26.dist-info/RECORD +0 -37
- {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/WHEEL +0 -0
- {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/entry_points.txt +0 -0
- {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/licenses/LICENSE.txt +0 -0
quant_met/plotting/plotting.py
DELETED
@@ -1,214 +0,0 @@
|
|
1
|
-
# SPDX-FileCopyrightText: 2024 Tjark Sievers
|
2
|
-
#
|
3
|
-
# SPDX-License-Identifier: MIT
|
4
|
-
|
5
|
-
"""Methods for plotting data."""
|
6
|
-
|
7
|
-
import matplotlib.axes
|
8
|
-
import matplotlib.colors
|
9
|
-
import matplotlib.figure
|
10
|
-
import matplotlib.pyplot as plt
|
11
|
-
import numpy as np
|
12
|
-
import numpy.typing as npt
|
13
|
-
from matplotlib.collections import Collection, LineCollection
|
14
|
-
|
15
|
-
|
16
|
-
def format_plot(
|
17
|
-
ax: matplotlib.axes.Axes,
|
18
|
-
) -> matplotlib.axes.Axes:
|
19
|
-
"""Format the axis to the predefined style.
|
20
|
-
|
21
|
-
Parameters
|
22
|
-
----------
|
23
|
-
ax : :class:`matplotlib.axes.Axes`
|
24
|
-
|
25
|
-
Returns
|
26
|
-
-------
|
27
|
-
:class:`matplotlib.axes.Axes`
|
28
|
-
|
29
|
-
"""
|
30
|
-
ax.set_box_aspect(1)
|
31
|
-
ax.set_facecolor("lightgray")
|
32
|
-
ax.grid(visible=True)
|
33
|
-
ax.tick_params(axis="both", direction="in", bottom=True, top=True, left=True, right=True)
|
34
|
-
|
35
|
-
return ax
|
36
|
-
|
37
|
-
|
38
|
-
def scatter_into_bz(
|
39
|
-
bz_corners: list[npt.NDArray[np.floating]],
|
40
|
-
k_points: npt.NDArray[np.floating],
|
41
|
-
data: npt.NDArray[np.floating] | None = None,
|
42
|
-
data_label: str | None = None,
|
43
|
-
fig_in: matplotlib.figure.Figure | None = None,
|
44
|
-
ax_in: matplotlib.axes.Axes | None = None,
|
45
|
-
) -> matplotlib.figure.Figure:
|
46
|
-
"""Scatter a list of points into the brillouin zone.
|
47
|
-
|
48
|
-
Parameters
|
49
|
-
----------
|
50
|
-
bz_corners : list[:class:`numpy.ndarray`]
|
51
|
-
Corner points defining the brillouin zone.
|
52
|
-
k_points : :class:`numpy.ndarray`
|
53
|
-
List of k points.
|
54
|
-
data : :class:`numpy.ndarray`, optional
|
55
|
-
Data to put on the k points.
|
56
|
-
data_label : :class:`str`, optional
|
57
|
-
Label for the data.
|
58
|
-
fig_in : :class:`matplotlib.figure.Figure`, optional
|
59
|
-
Figure that holds the axes. If not provided, a new figure and ax is created.
|
60
|
-
ax_in : :class:`matplotlib.axes.Axes`, optional
|
61
|
-
Ax to plot the data in. If not provided, a new figure and ax is created.
|
62
|
-
|
63
|
-
Returns
|
64
|
-
-------
|
65
|
-
:obj:`matplotlib.figure.Figure`
|
66
|
-
Figure with the data plotted onto the axis.
|
67
|
-
|
68
|
-
"""
|
69
|
-
if fig_in is None or ax_in is None:
|
70
|
-
fig, ax = plt.subplots()
|
71
|
-
else:
|
72
|
-
fig, ax = fig_in, ax_in
|
73
|
-
|
74
|
-
if data is not None:
|
75
|
-
x_coords, y_coords = zip(*k_points, strict=True)
|
76
|
-
scatter = ax.scatter(x=x_coords, y=y_coords, c=data, cmap="viridis")
|
77
|
-
fig.colorbar(scatter, ax=ax, fraction=0.046, pad=0.04, label=data_label)
|
78
|
-
else:
|
79
|
-
x_coords, y_coords = zip(*k_points, strict=True)
|
80
|
-
ax.scatter(x=x_coords, y=y_coords)
|
81
|
-
|
82
|
-
bz_corner_x, bz_corners_y = zip(*bz_corners, strict=True)
|
83
|
-
ax.scatter(x=bz_corner_x, y=bz_corners_y, alpha=0.8)
|
84
|
-
ax.set_aspect("equal", adjustable="box")
|
85
|
-
ax.set_xlabel(r"$k_x\ [1/a_0]$")
|
86
|
-
ax.set_ylabel(r"$k_y\ [1/a_0]$")
|
87
|
-
|
88
|
-
return fig
|
89
|
-
|
90
|
-
|
91
|
-
def plot_bandstructure(
|
92
|
-
bands: npt.NDArray[np.floating],
|
93
|
-
k_point_list: npt.NDArray[np.floating],
|
94
|
-
ticks: list[float],
|
95
|
-
labels: list[str],
|
96
|
-
overlaps: npt.NDArray[np.floating] | None = None,
|
97
|
-
overlap_labels: list[str] | None = None,
|
98
|
-
fig_in: matplotlib.figure.Figure | None = None,
|
99
|
-
ax_in: matplotlib.axes.Axes | None = None,
|
100
|
-
) -> matplotlib.figure.Figure:
|
101
|
-
"""Plot bands along a k space path.
|
102
|
-
|
103
|
-
To have a plot that respects the distances in k space and generate everything that is needed for
|
104
|
-
plotting, use the function :func:`~quant_met.plotting.generate_bz_path`.
|
105
|
-
|
106
|
-
Parameters
|
107
|
-
----------
|
108
|
-
bands : :class:`numpy.ndarray`
|
109
|
-
k_point_list : :class:`numpy.ndarray`
|
110
|
-
List of points to plot against. This is not a list of two-dimensional k-points!
|
111
|
-
ticks : list(float)
|
112
|
-
Position for ticks.
|
113
|
-
labels : list(str)
|
114
|
-
Labels on ticks.
|
115
|
-
overlaps : :class:`numpy.ndarray`, optional
|
116
|
-
Overlaps.
|
117
|
-
overlap_labels : list(str), optional
|
118
|
-
Labels to put on overlaps.
|
119
|
-
fig_in : :class:`matplotlib.figure.Figure`, optional
|
120
|
-
Figure that holds the axes. If not provided, a new figure and ax is created.
|
121
|
-
ax_in : :class:`matplotlib.axes.Axes`, optional
|
122
|
-
Ax to plot the data in. If not provided, a new figure and ax is created.
|
123
|
-
|
124
|
-
Returns
|
125
|
-
-------
|
126
|
-
:obj:`matplotlib.figure.Figure`
|
127
|
-
Figure with the data plotted onto the axis.
|
128
|
-
|
129
|
-
"""
|
130
|
-
if fig_in is None or ax_in is None:
|
131
|
-
fig, ax = plt.subplots()
|
132
|
-
else:
|
133
|
-
fig, ax = fig_in, ax_in
|
134
|
-
|
135
|
-
ax.axhline(y=0, alpha=0.7, linestyle="--", color="black")
|
136
|
-
|
137
|
-
if overlaps is None:
|
138
|
-
for band in bands:
|
139
|
-
ax.plot(k_point_list, band)
|
140
|
-
else:
|
141
|
-
line = Collection()
|
142
|
-
for band, wx in zip(bands, overlaps, strict=True):
|
143
|
-
points = np.array([k_point_list, band]).T.reshape(-1, 1, 2)
|
144
|
-
segments = np.concatenate([points[:-1], points[1:]], axis=1)
|
145
|
-
|
146
|
-
norm = matplotlib.colors.Normalize(-1, 1)
|
147
|
-
lc = LineCollection(segments, cmap="seismic", norm=norm)
|
148
|
-
lc.set_array(wx)
|
149
|
-
lc.set_linewidth(2)
|
150
|
-
line = ax.add_collection(lc)
|
151
|
-
|
152
|
-
colorbar = fig.colorbar(line, fraction=0.046, pad=0.04, ax=ax)
|
153
|
-
color_ticks = [-1, 1]
|
154
|
-
colorbar.set_ticks(ticks=color_ticks, labels=overlap_labels)
|
155
|
-
|
156
|
-
ax.set_ylim(
|
157
|
-
top=float(np.max(bands) + 0.1 * np.max(bands)),
|
158
|
-
bottom=float(np.min(bands) - 0.1 * np.abs(np.min(bands))),
|
159
|
-
)
|
160
|
-
ax.set_xticks(ticks, labels)
|
161
|
-
|
162
|
-
ax = format_plot(ax)
|
163
|
-
|
164
|
-
ax.set_ylabel(r"$E\ [t]$")
|
165
|
-
|
166
|
-
return fig
|
167
|
-
|
168
|
-
|
169
|
-
def plot_superfluid_weight(
|
170
|
-
x_data: npt.NDArray[np.floating],
|
171
|
-
sf_weight_geom: npt.NDArray[np.floating],
|
172
|
-
sf_weight_conv: npt.NDArray[np.floating],
|
173
|
-
fig_in: matplotlib.figure.Figure | None = None,
|
174
|
-
ax_in: matplotlib.axes.Axes | None = None,
|
175
|
-
) -> matplotlib.figure.Figure:
|
176
|
-
"""Plot superfluid weight against some parameter.
|
177
|
-
|
178
|
-
Parameters
|
179
|
-
----------
|
180
|
-
x_data : :class:`numpy.ndarray`
|
181
|
-
sf_weight_geom : :class:`numpy.ndarray`
|
182
|
-
sf_weight_conv : :class:`numpy.ndarray`
|
183
|
-
fig_in : :class:`matplotlib.figure.Figure`, optional
|
184
|
-
ax_in : :class:`matplotlib.axes.Axes`, optional
|
185
|
-
|
186
|
-
Returns
|
187
|
-
-------
|
188
|
-
:obj:`matplotlib.figure.Figure`
|
189
|
-
Figure with the data plotted onto the axis.
|
190
|
-
|
191
|
-
"""
|
192
|
-
if fig_in is None or ax_in is None:
|
193
|
-
fig, ax = plt.subplots()
|
194
|
-
else:
|
195
|
-
fig, ax = fig_in, ax_in
|
196
|
-
|
197
|
-
ax.fill_between(
|
198
|
-
x_data, 0, np.abs(sf_weight_geom), color="black", fc="#0271BB", label="geometric", hatch="-"
|
199
|
-
)
|
200
|
-
ax.fill_between(
|
201
|
-
x_data,
|
202
|
-
np.abs(sf_weight_geom),
|
203
|
-
np.abs(sf_weight_geom) + np.abs(sf_weight_conv),
|
204
|
-
color="black",
|
205
|
-
fc="#E2001A",
|
206
|
-
label="conventional",
|
207
|
-
hatch="//",
|
208
|
-
)
|
209
|
-
ax.plot(x_data, np.abs(sf_weight_geom) + np.abs(sf_weight_conv), "x--", color="black")
|
210
|
-
|
211
|
-
ax = format_plot(ax)
|
212
|
-
ax.set_ylabel(r"$D_S\ [t]$")
|
213
|
-
|
214
|
-
return fig
|
@@ -1,37 +0,0 @@
|
|
1
|
-
quant_met/__init__.py,sha256=ZO1UFz1awUYTI7B9ZkBwucvDz7GMGXnLLUGnEwLBhkc,155
|
2
|
-
quant_met/utils.py,sha256=J3kCbKg0tPEoGJExX04QwifHn4ch482J8IcmRQxIfP4,2067
|
3
|
-
quant_met/cli/__init__.py,sha256=nGFXhK8zWyEKQtsQTyJWfEOLFOHTCjZnfEcrVb2dARc,254
|
4
|
-
quant_met/cli/_utils.py,sha256=MKHvkxudWH-px07lDz0_V1AWiCCvj_IsBYbocfL-r7Y,2036
|
5
|
-
quant_met/cli/crit_temp.py,sha256=t9sPZKORl6dpa1UNAOMH2gDmeQxf80iFH7p_L3FI5q8,2027
|
6
|
-
quant_met/cli/dmft.py,sha256=ct6e1Wd8o7V3VP7DB7pqPxyF5pbrR2mb-J8pUkP9UPE,3101
|
7
|
-
quant_met/cli/main.py,sha256=1D1-KhGkzibts9b7Cv3JsR5Q-PnkowBWKE1Owc8tdD8,2010
|
8
|
-
quant_met/cli/scf.py,sha256=3_rwtQHwypFjAwjrsO2r2sqjJKpNiDLAj6svU52CCcU,2613
|
9
|
-
quant_met/dmft/__init__.py,sha256=2H0bN40Tvn-VnZgix6MugN0Q6iNwD_9AQxUC_LVLh70,99
|
10
|
-
quant_met/dmft/dmft_loop.py,sha256=fH8v39I5yIY2iY5RaID43El1V0nxLewAfohNsq987_A,5272
|
11
|
-
quant_met/dmft/utils.py,sha256=JO66kuTXruYCwNoVL0aFS55D3tV7Ii3v7hC9OpuWfF8,6636
|
12
|
-
quant_met/geometry/__init__.py,sha256=2N8l0-2-PhEOQxaUO7e8Dqy5oaxt2y9343XENDTCGPE,592
|
13
|
-
quant_met/geometry/base_lattice.py,sha256=OJNDMyzJB-0hK1BLgF-SV4jUYfOSUksIv1XG1bH-zyY,2649
|
14
|
-
quant_met/geometry/bz_path.py,sha256=vwN5RxyrgFkHTSqm_6cWuOigICgxa-FX5NZ7SkgKScw,2503
|
15
|
-
quant_met/geometry/graphene.py,sha256=ZLE55wV1E-jRCkGxW66pca2y5VWaNtMmXiXi-HB6bgs,1627
|
16
|
-
quant_met/geometry/square.py,sha256=17XZH79lK9TeeDtXiBBa8rd2d9kv5yt2S9F6te0YZPU,1565
|
17
|
-
quant_met/mean_field/__init__.py,sha256=Unweog9Tst1NxUMQ4X1OYiUQtyxI2ho-OQoCaekoMFk,597
|
18
|
-
quant_met/mean_field/_utils.py,sha256=7hr0DDSdIqjft5Jjluvbw_HGoNLWgYJTxyuPJJvhBnc,356
|
19
|
-
quant_met/mean_field/search_crit_temp.py,sha256=-A1ZegUOQXxh_SwmQeqMZCptnSLWuxDJsjdZK9XK-zE,8917
|
20
|
-
quant_met/mean_field/self_consistency.py,sha256=YY_zhCurxOK3RLkK-Hglfkx33uhsvqpoAKOP4FuPdfo,3371
|
21
|
-
quant_met/mean_field/hamiltonians/__init__.py,sha256=r-8TaLqRnRbAro-TMIyxzCCZHwVqyKrausODpQJb2tw,681
|
22
|
-
quant_met/mean_field/hamiltonians/base_hamiltonian.py,sha256=0qRfSpiE5jybv4GmBGmuNKFl1fkE4fzXG15II1IyIu8,29374
|
23
|
-
quant_met/mean_field/hamiltonians/dressed_graphene.py,sha256=Q5LiA3rgK88ZZV1V7JflgjlkEpve7uNZFzFCIoQND-w,4048
|
24
|
-
quant_met/mean_field/hamiltonians/graphene.py,sha256=sa3H8jVq9Fkc_qcz5gJTCMgN8YD3N18JWLRBImhLyxo,3276
|
25
|
-
quant_met/mean_field/hamiltonians/one_band_tight_binding.py,sha256=DZXaD95yWv1VZSMqgxkqEZv3PGihNGy7PuqupnN75ew,2512
|
26
|
-
quant_met/mean_field/hamiltonians/three_band_tight_binding.py,sha256=g8XNImzCn_6CRYKDYI6sy3q6_TBYUDxDmQZ-AqenXTE,3295
|
27
|
-
quant_met/mean_field/hamiltonians/two_band_tight_binding.py,sha256=DMySc94YQ1M2nPIKZjfc-Ax5Ysf7inwSuVKyd6dfqr0,2865
|
28
|
-
quant_met/parameters/__init__.py,sha256=9yu7i0J-O3QxSicnLEh2ci7FSMwB8bPW0pbl8KWHJUs,1007
|
29
|
-
quant_met/parameters/hamiltonians.py,sha256=PiWVV-miCdT4Z9GWloDVvIU_1QpRHHV-zVOga7DWwCw,6046
|
30
|
-
quant_met/parameters/main.py,sha256=QP7Z24-QePMcy6txujqxbx5ztQTdC67m6elNsJtGtXQ,2325
|
31
|
-
quant_met/plotting/__init__.py,sha256=IDgV6juJ0VfcJHppD-vnPH6w8wVuAC35eSeLxKzqyBc,523
|
32
|
-
quant_met/plotting/plotting.py,sha256=4ZYclWJH3hlE8S7b7bL_JJlP3CKaCGcVzdIsqolCAaM,6592
|
33
|
-
quant_met-0.0.26.dist-info/METADATA,sha256=rYIEO8Po6rucwi13B3pfOyZJgP4mso81gOfjYJYuosk,1978
|
34
|
-
quant_met-0.0.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
35
|
-
quant_met-0.0.26.dist-info/entry_points.txt,sha256=1Al3Kt-cMeQxwMp84ZSNL0qFwlbOVBu1o8A19MH8lEU,48
|
36
|
-
quant_met-0.0.26.dist-info/licenses/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
|
37
|
-
quant_met-0.0.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|