TB2J 0.9.9rc18__py3-none-any.whl → 0.9.9rc19__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/Jdownfolder.py CHANGED
@@ -136,7 +136,7 @@ class JDownfolder_pickle:
136
136
  outpath,
137
137
  qmesh=[7, 7, 7],
138
138
  iso_only=False,
139
- method="pwf",
139
+ method="lowdin",
140
140
  **kwargs,
141
141
  ):
142
142
  self.exc = SpinIO.load_pickle(path=inpath, fname="TB2J.pickle")
@@ -146,6 +146,7 @@ class JDownfolder_pickle:
146
146
  self.ligands = ligands
147
147
  self.outpath = outpath
148
148
  self.method = method
149
+ print("Using method:", self.method)
149
150
 
150
151
  # read atomic structure
151
152
  self.atoms = self.exc.atoms
@@ -176,7 +177,7 @@ class JDownfolder_pickle:
176
177
 
177
178
  def _downfold(self, **kwargs):
178
179
  JR2 = self.exc.get_full_Jtensor_for_Rlist(asr=True)
179
- if self.method == "lowdin":
180
+ if self.method.lower() == "lowdin":
180
181
  d = JDownfolder(
181
182
  JR2,
182
183
  self.exc.Rlist,
TB2J/MAEGreen.py CHANGED
@@ -1,7 +1,6 @@
1
1
  import gc
2
2
  from pathlib import Path
3
3
 
4
- import matplotlib.pyplot as plt
5
4
  import numpy as np
6
5
  import tqdm
7
6
  from HamiltonIO.abacus.abacus_wrapper import AbacusSplitSOCParser
@@ -55,9 +54,8 @@ class MAEGreen(ExchangeNCL):
55
54
 
56
55
  def set_angles_xyz(self):
57
56
  """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
-
57
+ self.thetas = [np.pi / 2, np.pi / 2, 0.0]
58
+ self.phis = [np.pi / 2, 0, 0.0]
61
59
 
62
60
  def set_angles_axis(self):
63
61
  """theta and phi are defined as the x, y, z, xy, yz, xz, xyz, x-yz, -xyz, -x-yz axis."""
@@ -255,11 +253,11 @@ class MAEGreen(ExchangeNCL):
255
253
  Path(output_path).mkdir(exist_ok=True)
256
254
  fname = f"{output_path}/MAE.dat"
257
255
  fname_orb = f"{output_path}/MAE_orb.dat"
258
- fname_tensor = f"{output_path}/MAE_tensor.dat"
259
- if figure3d is not None:
260
- fname_fig3d = f"{output_path}/{figure3d}"
261
- if figure_contourf is not None:
262
- fname_figcontourf = f"{output_path}/{figure_contourf}"
256
+ # fname_tensor = f"{output_path}/MAE_tensor.dat"
257
+ # if figure3d is not None:
258
+ # fname_fig3d = f"{output_path}/{figure3d}"
259
+ # if figure_contourf is not None:
260
+ # fname_figcontourf = f"{output_path}/{figure_contourf}"
263
261
 
264
262
  # ouput with eigenvalues.
265
263
  if with_eigen:
@@ -284,18 +282,18 @@ class MAEGreen(ExchangeNCL):
284
282
  f.write(f"{ea*1e3:.8f} ")
285
283
  f.write("\n")
286
284
 
287
- #self.ani = self.fit_anisotropy_tensor()
288
- #with open(fname_tensor, "w") as f:
285
+ # self.ani = self.fit_anisotropy_tensor()
286
+ # with open(fname_tensor, "w") as f:
289
287
  # f.write("# Anisotropy tensor in meV\n")
290
288
  # f.write(f"{self.ani.tensor_strings(include_isotropic=False)}\n")
291
289
 
292
- #if figure3d is not None:
290
+ # if figure3d is not None:
293
291
  # self.ani.plot_3d(figname=fname_fig3d, show=False)
294
292
 
295
- #if figure_contourf is not None:
293
+ # if figure_contourf is not None:
296
294
  # self.ani.plot_contourf(figname=fname_figcontourf, show=False)
297
295
 
298
- #plt.close()
296
+ # plt.close()
299
297
  gc.collect()
300
298
 
301
299
  with open(fname_orb, "w") as f:
@@ -4,8 +4,8 @@ import numpy as np
4
4
 
5
5
  from TB2J.exchange import ExchangeNCL
6
6
  from TB2J.exchangeCL2 import ExchangeCL2
7
- from TB2J.MAEGreen import MAEGreen
8
7
  from TB2J.io_merge import merge
8
+ from TB2J.MAEGreen import MAEGreen
9
9
 
10
10
  try:
11
11
  from HamiltonIO.siesta import SislParser
@@ -162,13 +162,13 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
162
162
  # include_orbs=include_orbs,
163
163
  **exargs,
164
164
  )
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)
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)
168
168
  MAE.run(output_path=f"{output_path}_anisotropy", with_eigen=False)
169
- #print(
169
+ # print(
170
170
  # f"MAE calculation finished. The results are in {output_path} directory."
171
- #)
171
+ # )
172
172
 
173
173
  angle = {"x": (np.pi / 2, 0), "y": (np.pi / 2, np.pi / 2), "z": (0, 0)}
174
174
  for key, val in angle.items():
@@ -192,9 +192,13 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
192
192
  print(
193
193
  f"All calculation finished. The results are in {output_path_full} directory."
194
194
  )
195
-
196
195
 
197
- merge("TB2J_results_x", "TB2J_results_y", "TB2J_results_z", main_path=None, save=True, write_path='TB2J_results')
196
+ merge(
197
+ "TB2J_results_x",
198
+ "TB2J_results_y",
199
+ "TB2J_results_z",
200
+ main_path=None,
201
+ save=True,
202
+ write_path="TB2J_results",
203
+ )
198
204
  print("Final TB2J_results written to TB2J_results directory.")
199
-
200
-
@@ -1,3 +1,4 @@
1
+ #!python
1
2
  from TB2J.magnon import plot_tb2j_magnon_bands
2
3
 
3
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TB2J
3
- Version: 0.9.9rc18
3
+ Version: 0.9.9rc19
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
@@ -1,7 +1,7 @@
1
- TB2J/Jdownfolder.py,sha256=xs0gmcKwOA3ejXqk3JPPgnYVu8CvkK8cteuvHuu1oSk,9603
1
+ TB2J/Jdownfolder.py,sha256=n5BeQCYP4mD9JsAPeE1F3ZKKR3SUxADfDbaG_rzi77k,9658
2
2
  TB2J/Jtensor.py,sha256=t6OsqrSlYW6Im4H7ykVAW8Al_pFXN4C5yj2UEsV6r7g,3181
3
3
  TB2J/MAE.py,sha256=fM8U-Dgp9HcQOEeC_kyZV1oVrygBvcux9BraUXVouvY,10994
4
- TB2J/MAEGreen.py,sha256=IhclMJU6TOp97fYogXWq-3dyyAW8iDJqu1FGRDdi6hM,15551
4
+ TB2J/MAEGreen.py,sha256=Iq4hlZrKEOycPvpV66_t13WIcJ1FJgBS79NleXYpFzw,15528
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=DACmRG89IKt_MHfmZDTORCjaUhQ6LRloLzoE1x-5IQM,7625
46
+ TB2J/interfaces/siesta_interface.py,sha256=nCrVWKXua-QzikSPhrvdFVw3OpjeKYPzLzMa7Hqc6Yc,7714
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.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,,
88
+ tb2j-0.9.9rc19.data/scripts/TB2J_downfold.py,sha256=i4BVqnpDdgrX_amookVWeLGefGBn-qeAutWiwuY9SfQ,2099
89
+ tb2j-0.9.9rc19.data/scripts/TB2J_eigen.py,sha256=Qs9v2hnMm2Tpfoa4h53muUKty2dZjwx8948MBoQooNg,1128
90
+ tb2j-0.9.9rc19.data/scripts/TB2J_magnon.py,sha256=q7UwAmorRcFNk4tfE7gl_ny05l6p7pbD9Wm_LkIpKEw,3101
91
+ tb2j-0.9.9rc19.data/scripts/TB2J_magnon2.py,sha256=tMa7Fg_Wd2UytnrH3C_AsgGM7BciUW0iy6NiPlWvar8,1920
92
+ tb2j-0.9.9rc19.data/scripts/TB2J_magnon_dos.py,sha256=TMXQvD2dIbO5FZ4tUMmxJgCgH2O2hDAPUNfEKO4z-x4,110
93
+ tb2j-0.9.9rc19.data/scripts/TB2J_merge.py,sha256=y834SF4rIRn1L1ptkhczvavQpC-8Px6DTmDOOSaq_DE,1854
94
+ tb2j-0.9.9rc19.data/scripts/TB2J_rotate.py,sha256=zgiDFuYZNmzKK0rwDmTaYD2OpRlmKA_VGeBx83w2Xwc,873
95
+ tb2j-0.9.9rc19.data/scripts/TB2J_rotateDM.py,sha256=kCvF7gotuqAX1VnJ06cwfVm7RrhrdtiV5v7d9P2Pn_E,567
96
+ tb2j-0.9.9rc19.data/scripts/abacus2J.py,sha256=VD1ldQP-PIMyxo3Rzzwk_06fJEbbU7oiU3aRXNHK0a0,1826
97
+ tb2j-0.9.9rc19.data/scripts/siesta2J.py,sha256=QJ6c0DbqxaqYEesxiL5R9nK9-flNLrr7hajKfCwirYc,2318
98
+ tb2j-0.9.9rc19.data/scripts/wann2J.py,sha256=OA31VHEXbQMD-JozoLUHDF6vB9Sr62d804OApSKtSnU,3240
99
+ tb2j-0.9.9rc19.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
100
+ tb2j-0.9.9rc19.dist-info/METADATA,sha256=cKF5H3b2POxn0y0dHZYy5LhgcoCB2AyMagGuZTNy7wU,1688
101
+ tb2j-0.9.9rc19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ tb2j-0.9.9rc19.dist-info/entry_points.txt,sha256=Hdz1WC9waUzyFVmowKnbbZ6j-J4adHh_Ko6JpxGYAtE,131
103
+ tb2j-0.9.9rc19.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
104
+ tb2j-0.9.9rc19.dist-info/RECORD,,