TB2J 0.9.9rc17__py3-none-any.whl → 0.9.9rc18__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.
- TB2J/MAEGreen.py +18 -11
- TB2J/interfaces/siesta_interface.py +14 -7
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/METADATA +1 -1
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/RECORD +19 -19
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_downfold.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_eigen.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_magnon.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_magnon2.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_magnon_dos.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_merge.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_rotate.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/TB2J_rotateDM.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/abacus2J.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/siesta2J.py +0 -0
- {tb2j-0.9.9rc17.data → tb2j-0.9.9rc18.data}/scripts/wann2J.py +0 -0
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/WHEEL +0 -0
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/entry_points.txt +0 -0
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/licenses/LICENSE +0 -0
- {tb2j-0.9.9rc17.dist-info → tb2j-0.9.9rc18.dist-info}/top_level.txt +0 -0
TB2J/MAEGreen.py
CHANGED
@@ -32,7 +32,9 @@ class MAEGreen(ExchangeNCL):
|
|
32
32
|
"""
|
33
33
|
super().__init__(**kwargs)
|
34
34
|
self.natoms = len(self.atoms)
|
35
|
-
if angles is None or angles == "
|
35
|
+
if angles is None or angles == "xyz":
|
36
|
+
self.set_angles_xyz()
|
37
|
+
elif angles == "axis":
|
36
38
|
self.set_angles_axis()
|
37
39
|
elif angles == "scan":
|
38
40
|
self.set_angles_scan()
|
@@ -51,6 +53,12 @@ class MAEGreen(ExchangeNCL):
|
|
51
53
|
self.es_atom = np.zeros((nangles, self.natoms), dtype=complex)
|
52
54
|
self.es_atom_orb = DefaultDict(lambda: 0)
|
53
55
|
|
56
|
+
def set_angles_xyz(self):
|
57
|
+
"""theta and phi are defined as the x, y, z, xy, yz, xz, xyz, x-yz, -xyz, -x-yz axis."""
|
58
|
+
self.thetas = [ np.pi / 2, np.pi / 2, 0.0]
|
59
|
+
self.phis = [ np.pi / 2, 0, 0.0]
|
60
|
+
|
61
|
+
|
54
62
|
def set_angles_axis(self):
|
55
63
|
"""theta and phi are defined as the x, y, z, xy, yz, xz, xyz, x-yz, -xyz, -x-yz axis."""
|
56
64
|
self.thetas = [0, np.pi / 2, np.pi / 2, np.pi / 2, np.pi, 0, np.pi / 2, 0, 0, 0]
|
@@ -75,7 +83,6 @@ class MAEGreen(ExchangeNCL):
|
|
75
83
|
self.thetas = thetas
|
76
84
|
self.phis = phis
|
77
85
|
self.angle_pairs = list(zip(thetas, phis))
|
78
|
-
# remove duplicates of angles using sets.
|
79
86
|
self.angle_pairs = list(set(self.angle_pairs))
|
80
87
|
self.thetas, self.phis = zip(*self.angle_pairs)
|
81
88
|
|
@@ -277,18 +284,18 @@ class MAEGreen(ExchangeNCL):
|
|
277
284
|
f.write(f"{ea*1e3:.8f} ")
|
278
285
|
f.write("\n")
|
279
286
|
|
280
|
-
self.ani = self.fit_anisotropy_tensor()
|
281
|
-
with open(fname_tensor, "w") as f:
|
282
|
-
|
283
|
-
|
287
|
+
#self.ani = self.fit_anisotropy_tensor()
|
288
|
+
#with open(fname_tensor, "w") as f:
|
289
|
+
# f.write("# Anisotropy tensor in meV\n")
|
290
|
+
# f.write(f"{self.ani.tensor_strings(include_isotropic=False)}\n")
|
284
291
|
|
285
|
-
if figure3d is not None:
|
286
|
-
|
292
|
+
#if figure3d is not None:
|
293
|
+
# self.ani.plot_3d(figname=fname_fig3d, show=False)
|
287
294
|
|
288
|
-
if figure_contourf is not None:
|
289
|
-
|
295
|
+
#if figure_contourf is not None:
|
296
|
+
# self.ani.plot_contourf(figname=fname_figcontourf, show=False)
|
290
297
|
|
291
|
-
plt.close()
|
298
|
+
#plt.close()
|
292
299
|
gc.collect()
|
293
300
|
|
294
301
|
with open(fname_orb, "w") as f:
|
@@ -5,6 +5,7 @@ import numpy as np
|
|
5
5
|
from TB2J.exchange import ExchangeNCL
|
6
6
|
from TB2J.exchangeCL2 import ExchangeCL2
|
7
7
|
from TB2J.MAEGreen import MAEGreen
|
8
|
+
from TB2J.io_merge import merge
|
8
9
|
|
9
10
|
try:
|
10
11
|
from HamiltonIO.siesta import SislParser
|
@@ -156,18 +157,18 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
|
|
156
157
|
atoms=model.atoms,
|
157
158
|
basis=basis,
|
158
159
|
efermi=None,
|
159
|
-
angles="
|
160
|
+
angles="axis",
|
160
161
|
# magnetic_elements=magnetic_elements,
|
161
162
|
# include_orbs=include_orbs,
|
162
163
|
**exargs,
|
163
164
|
)
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
165
|
+
#thetas = [0, np.pi / 2, np.pi, 3 * np.pi / 2]
|
166
|
+
#phis = [0, 0, 0, 0]
|
167
|
+
#MAE.set_angles(thetas=thetas, phis=phis)
|
167
168
|
MAE.run(output_path=f"{output_path}_anisotropy", with_eigen=False)
|
168
|
-
print(
|
169
|
-
|
170
|
-
)
|
169
|
+
#print(
|
170
|
+
# f"MAE calculation finished. The results are in {output_path} directory."
|
171
|
+
#)
|
171
172
|
|
172
173
|
angle = {"x": (np.pi / 2, 0), "y": (np.pi / 2, np.pi / 2), "z": (0, 0)}
|
173
174
|
for key, val in angle.items():
|
@@ -191,3 +192,9 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
|
|
191
192
|
print(
|
192
193
|
f"All calculation finished. The results are in {output_path_full} directory."
|
193
194
|
)
|
195
|
+
|
196
|
+
|
197
|
+
merge("TB2J_results_x", "TB2J_results_y", "TB2J_results_z", main_path=None, save=True, write_path='TB2J_results')
|
198
|
+
print("Final TB2J_results written to TB2J_results directory.")
|
199
|
+
|
200
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
TB2J/Jdownfolder.py,sha256=xs0gmcKwOA3ejXqk3JPPgnYVu8CvkK8cteuvHuu1oSk,9603
|
2
2
|
TB2J/Jtensor.py,sha256=t6OsqrSlYW6Im4H7ykVAW8Al_pFXN4C5yj2UEsV6r7g,3181
|
3
3
|
TB2J/MAE.py,sha256=fM8U-Dgp9HcQOEeC_kyZV1oVrygBvcux9BraUXVouvY,10994
|
4
|
-
TB2J/MAEGreen.py,sha256=
|
4
|
+
TB2J/MAEGreen.py,sha256=IhclMJU6TOp97fYogXWq-3dyyAW8iDJqu1FGRDdi6hM,15551
|
5
5
|
TB2J/Oiju.py,sha256=cNGv8N5uH_swGq7cnAt2OyiDfqtjLlLrwseGu0E4iaM,3383
|
6
6
|
TB2J/Oiju_epc.py,sha256=oytM3NYW7nWmklrGgNlqwIpI_JYv_hb7ZnR4o9nYNog,6809
|
7
7
|
TB2J/__init__.py,sha256=hcEWkag_UvLm1ZSbjsgcTWkGVlR3Bwmzg1QYAwsvf-g,24
|
@@ -43,7 +43,7 @@ TB2J/interfaces/__init__.py,sha256=4tiLoXQ73Nlyi9L4j8jJXOYzXluVNPxQZkwfkQZEGHg,3
|
|
43
43
|
TB2J/interfaces/gpaw_interface.py,sha256=GCDlJ-hRWfChvWwsgBDYSmVqO4sH9HAuGZTV9GqgN6c,1504
|
44
44
|
TB2J/interfaces/lawaf_interface.py,sha256=PieLnmppdafOYsgeHznqOou1g9L1sam5jOm3KaObdqo,4408
|
45
45
|
TB2J/interfaces/manager.py,sha256=PQMLEfMCT5GnDWSl2nI4JOgRPm_fysyR-6Y6l97xWcw,860
|
46
|
-
TB2J/interfaces/siesta_interface.py,sha256=
|
46
|
+
TB2J/interfaces/siesta_interface.py,sha256=DACmRG89IKt_MHfmZDTORCjaUhQ6LRloLzoE1x-5IQM,7625
|
47
47
|
TB2J/interfaces/wannier90_interface.py,sha256=qzRgXUBb7t1Aiegrl_RV51BB8csdtVM0EP0Z4pjmTcs,4467
|
48
48
|
TB2J/interfaces/abacus/__init__.py,sha256=leas71oCvM_HxrF4gnO5A_VKcJmDAgsI1BUctLU3OBw,177
|
49
49
|
TB2J/interfaces/abacus/abacus_api.py,sha256=lNV4LNkLcKw7Zux4MQYM9wnh3eFTlcSqbf4Pb7pqhrk,7243
|
@@ -85,20 +85,20 @@ TB2J/spinham/supercell.py,sha256=y17uUC6r3gQb278FhxIW4CABihfLTvKFj6flyXrCPR8,122
|
|
85
85
|
TB2J/wannier/__init__.py,sha256=7ojCbM84PYv1X1Tbo4NHI-d3gWmQsZB_xiYqbfxVV1E,80
|
86
86
|
TB2J/wannier/w90_parser.py,sha256=dbd63LuKyv2DVUzqRINGsbDzEsOxsQyE8_Ear_LQIRg,4620
|
87
87
|
TB2J/wannier/w90_tb_parser.py,sha256=qt8pnuprmPp9iIAYwPkPbmEzk6ZPgMq2xognoQp7vwc,4610
|
88
|
-
tb2j-0.9.
|
89
|
-
tb2j-0.9.
|
90
|
-
tb2j-0.9.
|
91
|
-
tb2j-0.9.
|
92
|
-
tb2j-0.9.
|
93
|
-
tb2j-0.9.
|
94
|
-
tb2j-0.9.
|
95
|
-
tb2j-0.9.
|
96
|
-
tb2j-0.9.
|
97
|
-
tb2j-0.9.
|
98
|
-
tb2j-0.9.
|
99
|
-
tb2j-0.9.
|
100
|
-
tb2j-0.9.
|
101
|
-
tb2j-0.9.
|
102
|
-
tb2j-0.9.
|
103
|
-
tb2j-0.9.
|
104
|
-
tb2j-0.9.
|
88
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_downfold.py,sha256=i4BVqnpDdgrX_amookVWeLGefGBn-qeAutWiwuY9SfQ,2099
|
89
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_eigen.py,sha256=Qs9v2hnMm2Tpfoa4h53muUKty2dZjwx8948MBoQooNg,1128
|
90
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_magnon.py,sha256=q7UwAmorRcFNk4tfE7gl_ny05l6p7pbD9Wm_LkIpKEw,3101
|
91
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_magnon2.py,sha256=9HKNXwPlwaEnAlJXVLrbQFhWj3fGLlBAp-nMXWDTbE0,1911
|
92
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_magnon_dos.py,sha256=TMXQvD2dIbO5FZ4tUMmxJgCgH2O2hDAPUNfEKO4z-x4,110
|
93
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_merge.py,sha256=y834SF4rIRn1L1ptkhczvavQpC-8Px6DTmDOOSaq_DE,1854
|
94
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_rotate.py,sha256=zgiDFuYZNmzKK0rwDmTaYD2OpRlmKA_VGeBx83w2Xwc,873
|
95
|
+
tb2j-0.9.9rc18.data/scripts/TB2J_rotateDM.py,sha256=kCvF7gotuqAX1VnJ06cwfVm7RrhrdtiV5v7d9P2Pn_E,567
|
96
|
+
tb2j-0.9.9rc18.data/scripts/abacus2J.py,sha256=VD1ldQP-PIMyxo3Rzzwk_06fJEbbU7oiU3aRXNHK0a0,1826
|
97
|
+
tb2j-0.9.9rc18.data/scripts/siesta2J.py,sha256=QJ6c0DbqxaqYEesxiL5R9nK9-flNLrr7hajKfCwirYc,2318
|
98
|
+
tb2j-0.9.9rc18.data/scripts/wann2J.py,sha256=OA31VHEXbQMD-JozoLUHDF6vB9Sr62d804OApSKtSnU,3240
|
99
|
+
tb2j-0.9.9rc18.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
|
100
|
+
tb2j-0.9.9rc18.dist-info/METADATA,sha256=wvdtn-fBIkBMcOJlL_j812z31FWaGEAWdmLoQMc0yOA,1688
|
101
|
+
tb2j-0.9.9rc18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
102
|
+
tb2j-0.9.9rc18.dist-info/entry_points.txt,sha256=Hdz1WC9waUzyFVmowKnbbZ6j-J4adHh_Ko6JpxGYAtE,131
|
103
|
+
tb2j-0.9.9rc18.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
|
104
|
+
tb2j-0.9.9rc18.dist-info/RECORD,,
|
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
|