TB2J 0.9.2rc0__py3-none-any.whl → 0.9.4rc0__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/MAE.py +5 -3
- TB2J/abacus/abacus_wrapper.py +7 -3
- TB2J/manager.py +5 -3
- {TB2J-0.9.2rc0.dist-info → TB2J-0.9.4rc0.dist-info}/METADATA +2 -1
- {TB2J-0.9.2rc0.dist-info → TB2J-0.9.4rc0.dist-info}/RECORD +18 -18
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_downfold.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_eigen.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_magnon.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_magnon_dos.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_merge.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_rotate.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/TB2J_rotateDM.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/abacus2J.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/siesta2J.py +0 -0
- {TB2J-0.9.2rc0.data → TB2J-0.9.4rc0.data}/scripts/wann2J.py +0 -0
- {TB2J-0.9.2rc0.dist-info → TB2J-0.9.4rc0.dist-info}/LICENSE +0 -0
- {TB2J-0.9.2rc0.dist-info → TB2J-0.9.4rc0.dist-info}/WHEEL +0 -0
- {TB2J-0.9.2rc0.dist-info → TB2J-0.9.4rc0.dist-info}/top_level.txt +0 -0
TB2J/MAE.py
CHANGED
@@ -10,7 +10,7 @@ from scipy.spatial.transform import Rotation
|
|
10
10
|
import matplotlib.pyplot as plt
|
11
11
|
from pathlib import Path
|
12
12
|
from TB2J.mathutils.rotate_spin import spherical_to_cartesian
|
13
|
-
from HamiltonIO.occupations import Occupations
|
13
|
+
from HamiltonIO.model.occupations import Occupations
|
14
14
|
from TB2J.abacus.abacus_wrapper import AbacusSplitSOCParser
|
15
15
|
from HamiltonIO.siesta import SislWrapper
|
16
16
|
import tqdm
|
@@ -75,7 +75,10 @@ class MAE:
|
|
75
75
|
# e,rho = self.model.get_band_energy(dm=True)
|
76
76
|
# self.calc_ref()
|
77
77
|
# thetas = np.linspace(*angle_range, npoints)
|
78
|
-
|
78
|
+
nangles = len(thetas)
|
79
|
+
for i in tqdm.trange(nangles):
|
80
|
+
theta = thetas[i]
|
81
|
+
phi = phis[i]
|
79
82
|
self.model.set_Hsoc_rotation_angle([theta, phi])
|
80
83
|
e = self.get_band_energy()
|
81
84
|
es.append(e)
|
@@ -96,7 +99,6 @@ def abacus_get_MAE(
|
|
96
99
|
outpath_nosoc=path_nosoc, outpath_soc=path_soc, binary=False
|
97
100
|
)
|
98
101
|
model = parser.parse()
|
99
|
-
model.nel = 16
|
100
102
|
ham = MAE(model, kmesh, gamma=gamma)
|
101
103
|
es = ham.get_band_energy_vs_angles(thetas, psis)
|
102
104
|
if outfile:
|
TB2J/abacus/abacus_wrapper.py
CHANGED
@@ -156,6 +156,9 @@ class AbacusParser:
|
|
156
156
|
# read the information
|
157
157
|
self.read_atoms()
|
158
158
|
self.efermi = self.read_efermi()
|
159
|
+
self.nel = self.read_nel()
|
160
|
+
print(f"efermi: {self.efermi}")
|
161
|
+
print(f"nel: {self.nel}")
|
159
162
|
self.read_basis()
|
160
163
|
|
161
164
|
def read_spin(self):
|
@@ -254,10 +257,10 @@ class AbacusParser:
|
|
254
257
|
nel = None
|
255
258
|
with open(fname, "r") as myfile:
|
256
259
|
for line in myfile:
|
257
|
-
if "
|
258
|
-
nel = float(line.split()[
|
260
|
+
if "number of electrons" in line:
|
261
|
+
nel = float(line.split()[-1])
|
259
262
|
if nel is None:
|
260
|
-
raise ValueError(f"
|
263
|
+
raise ValueError(f"number of electron not found in the {str(fname)} file.")
|
261
264
|
return nel
|
262
265
|
|
263
266
|
def get_basis(self):
|
@@ -306,6 +309,7 @@ class AbacusSplitSOCParser:
|
|
306
309
|
nspin=2,
|
307
310
|
HR_soc=HR_soc,
|
308
311
|
HR_nosoc=HR_nosoc,
|
312
|
+
nel=self.parser_nosoc.nel,
|
309
313
|
)
|
310
314
|
model.efermi = self.parser_soc.efermi
|
311
315
|
model.basis = self.parser_nosoc.basis
|
TB2J/manager.py
CHANGED
@@ -7,11 +7,13 @@ from TB2J.exchange_qspace import ExchangeCLQspace
|
|
7
7
|
from TB2J.utils import read_basis, auto_assign_basis_name
|
8
8
|
from ase.io import read
|
9
9
|
|
10
|
-
#from TB2J.sisl_wrapper import SislWrapper
|
10
|
+
# from TB2J.sisl_wrapper import SislWrapper
|
11
11
|
try:
|
12
12
|
from HamiltonIO.siesta import SislWrapper
|
13
13
|
except ImportError:
|
14
|
-
print(
|
14
|
+
print(
|
15
|
+
"Cannot import SislWrapper from HamiltonIO.siesta. Please install HamiltonIO first."
|
16
|
+
)
|
15
17
|
from TB2J.sisl_wrapper import SislWrapper
|
16
18
|
from TB2J.gpaw_wrapper import GPAWWrapper
|
17
19
|
from TB2J.wannier import parse_atoms
|
@@ -289,7 +291,7 @@ def gen_exchange_siesta(
|
|
289
291
|
geom = H.geometry
|
290
292
|
if H.spin.is_colinear:
|
291
293
|
print("Reading Siesta hamiltonian: colinear spin.")
|
292
|
-
tbmodel_up = SislWrapper(fdf_fname=None,sisl_hamiltonian=H, spin=0, geom=geom)
|
294
|
+
tbmodel_up = SislWrapper(fdf_fname=None, sisl_hamiltonian=H, spin=0, geom=geom)
|
293
295
|
tbmodel_dn = SislWrapper(fdf_fname=None, sisl_hamiltonian=H, spin=1, geom=geom)
|
294
296
|
basis = dict(zip(tbmodel_up.orbs, list(range(tbmodel_up.norb))))
|
295
297
|
print("Starting to calculate exchange.")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: TB2J
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.4rc0
|
4
4
|
Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
|
5
5
|
Author: Xu He
|
6
6
|
Author-email: mailhexu@gmail.com
|
@@ -22,5 +22,6 @@ Requires-Dist: tqdm
|
|
22
22
|
Requires-Dist: pathos
|
23
23
|
Requires-Dist: packaging >=20.0
|
24
24
|
Requires-Dist: pre-commit
|
25
|
+
Requires-Dist: HamiltonIO >=0.1.4
|
25
26
|
|
26
27
|
TB2J is a Python package aimed to compute automatically the magnetic interactions (superexchange and Dzyaloshinskii-Moriya) between atoms of magnetic crystals from DFT Hamiltonian based on Wannier functions or Linear combination of atomic orbitals. It uses the Green's function method and take the local rigid spin rotation as a perturbation. The package can take the output from Wannier90, which is interfaced with many density functional theory codes or from codes based on localised orbitals. A minimal user input is needed, which allows for an easily integration into a high-throughput workflows.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
TB2J/Jdownfolder.py,sha256=Rmg6KfQ-Lkhei5daTJ2POzr0XL-R1WM-rzUnDcfoDhc,9595
|
2
2
|
TB2J/Jtensor.py,sha256=t6OsqrSlYW6Im4H7ykVAW8Al_pFXN4C5yj2UEsV6r7g,3181
|
3
|
-
TB2J/MAE.py,sha256=
|
3
|
+
TB2J/MAE.py,sha256=ATKzYwEKREurYZugdcq1xVrn3WdabU36d9YtRzErckk,7430
|
4
4
|
TB2J/Oiju.py,sha256=cNGv8N5uH_swGq7cnAt2OyiDfqtjLlLrwseGu0E4iaM,3383
|
5
5
|
TB2J/Oiju_epc.py,sha256=oytM3NYW7nWmklrGgNlqwIpI_JYv_hb7ZnR4o9nYNog,6809
|
6
6
|
TB2J/__init__.py,sha256=hcEWkag_UvLm1ZSbjsgcTWkGVlR3Bwmzg1QYAwsvf-g,24
|
@@ -19,7 +19,7 @@ TB2J/green.py,sha256=giWSPhrLKc3ZKOpwyY3snUKFWH08GMqBlsJWbFG9Qo8,13565
|
|
19
19
|
TB2J/greentest.py,sha256=2ISSfhor9ecSEOi_E6b4Cv26wEIQlwlzca0ru8z44_E,1603
|
20
20
|
TB2J/io_merge.py,sha256=t85k3L6IL9X5ys-PWK7CzResb3xJsyqM3LAlKPUe9vM,6825
|
21
21
|
TB2J/kpoints.py,sha256=6XK2KqTncidEq3o9GuO6VEZRPNTRtWeXg9QfcV-9smI,532
|
22
|
-
TB2J/manager.py,sha256=
|
22
|
+
TB2J/manager.py,sha256=UhFmfbeqo1dwHDbQVtHgQCbH6ax1oCIEabhlrLjD1GA,15701
|
23
23
|
TB2J/mathutils.py,sha256=tHA6q3KPDpXLIbZHdDZ2NU5s886VVM_oEG490zQ6Ris,300
|
24
24
|
TB2J/myTB.py,sha256=ok_B4my29bOIghMSZfx0Es6G8FaXaIiLP4gPxTdSj00,17659
|
25
25
|
TB2J/orbmap.py,sha256=RCMJkOPGbfPrcZzcc5ia1ZMKBQWxGcyj8W1ve8BJaEw,6669
|
@@ -38,7 +38,7 @@ TB2J/versioninfo.py,sha256=wZwS9QDFRVDe7rf8JyPDDI8UGdTQiO6Pb_sWv8GAegA,337
|
|
38
38
|
TB2J/abacus/MAE.py,sha256=q9aSVDRZFAnZL3gHdNmde7sxj80oe-BRjwDO-ipyfew,12237
|
39
39
|
TB2J/abacus/__init__.py,sha256=5sHiDnF2L-Y80QeET9zOiS83a5T_TQAXvnIhcYB6wNU,56
|
40
40
|
TB2J/abacus/abacus_api.py,sha256=D_NyXW-Pno92d3RVHByx0l1HDPHQAvXsmQVt8cfIGR8,7267
|
41
|
-
TB2J/abacus/abacus_wrapper.py,sha256=
|
41
|
+
TB2J/abacus/abacus_wrapper.py,sha256=aKMpcoMMhBnMW6feTOsleEOCN2cPLBkjzVjNG0yPTDk,12054
|
42
42
|
TB2J/abacus/gen_exchange_abacus.py,sha256=lKZqkWMnLQtaSwgn8O5Fzr-pV6tzwoMqfZU_vbET6gU,2973
|
43
43
|
TB2J/abacus/occupations.py,sha256=vaMVeZwldgzGDxjA7i3-2-V6akXjpgJwJFWKozJ-l2k,8947
|
44
44
|
TB2J/abacus/orbital_api.py,sha256=l48Hn5z7TA0TH7Is4NDmz74b6B9L2ztYO4dRR37U4mQ,1562
|
@@ -76,18 +76,18 @@ TB2J/spinham/supercell.py,sha256=y17uUC6r3gQb278FhxIW4CABihfLTvKFj6flyXrCPR8,122
|
|
76
76
|
TB2J/wannier/__init__.py,sha256=7ojCbM84PYv1X1Tbo4NHI-d3gWmQsZB_xiYqbfxVV1E,80
|
77
77
|
TB2J/wannier/w90_parser.py,sha256=dbd63LuKyv2DVUzqRINGsbDzEsOxsQyE8_Ear_LQIRg,4620
|
78
78
|
TB2J/wannier/w90_tb_parser.py,sha256=qt8pnuprmPp9iIAYwPkPbmEzk6ZPgMq2xognoQp7vwc,4610
|
79
|
-
TB2J-0.9.
|
80
|
-
TB2J-0.9.
|
81
|
-
TB2J-0.9.
|
82
|
-
TB2J-0.9.
|
83
|
-
TB2J-0.9.
|
84
|
-
TB2J-0.9.
|
85
|
-
TB2J-0.9.
|
86
|
-
TB2J-0.9.
|
87
|
-
TB2J-0.9.
|
88
|
-
TB2J-0.9.
|
89
|
-
TB2J-0.9.
|
90
|
-
TB2J-0.9.
|
91
|
-
TB2J-0.9.
|
92
|
-
TB2J-0.9.
|
93
|
-
TB2J-0.9.
|
79
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_downfold.py,sha256=i4BVqnpDdgrX_amookVWeLGefGBn-qeAutWiwuY9SfQ,2099
|
80
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_eigen.py,sha256=Qs9v2hnMm2Tpfoa4h53muUKty2dZjwx8948MBoQooNg,1128
|
81
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_magnon.py,sha256=q7UwAmorRcFNk4tfE7gl_ny05l6p7pbD9Wm_LkIpKEw,3101
|
82
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_magnon_dos.py,sha256=TMXQvD2dIbO5FZ4tUMmxJgCgH2O2hDAPUNfEKO4z-x4,110
|
83
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_merge.py,sha256=y834SF4rIRn1L1ptkhczvavQpC-8Px6DTmDOOSaq_DE,1854
|
84
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_rotate.py,sha256=zgiDFuYZNmzKK0rwDmTaYD2OpRlmKA_VGeBx83w2Xwc,873
|
85
|
+
TB2J-0.9.4rc0.data/scripts/TB2J_rotateDM.py,sha256=kCvF7gotuqAX1VnJ06cwfVm7RrhrdtiV5v7d9P2Pn_E,567
|
86
|
+
TB2J-0.9.4rc0.data/scripts/abacus2J.py,sha256=M4B07lvTCDczTPTqvnDh_PERzCARAd09TLKv4aIdSQM,4408
|
87
|
+
TB2J-0.9.4rc0.data/scripts/siesta2J.py,sha256=hBzS7ZgoHM3oXlTCQd-xVA07Ks2FiIwyRpQWUFITRPE,4303
|
88
|
+
TB2J-0.9.4rc0.data/scripts/wann2J.py,sha256=2t2hWwyELskYCwkGDziCgiIAnfr6odLLJ6cQBJ2RQwQ,5714
|
89
|
+
TB2J-0.9.4rc0.dist-info/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
|
90
|
+
TB2J-0.9.4rc0.dist-info/METADATA,sha256=z4Dy60G4KuNXmCh0EQ0_nZf_rn71d-CVLa71vTJ6C4g,1455
|
91
|
+
TB2J-0.9.4rc0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
92
|
+
TB2J-0.9.4rc0.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
|
93
|
+
TB2J-0.9.4rc0.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
|