TB2J 0.9.9rc18__tar.gz → 0.9.9rc19__tar.gz

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.
Files changed (109) hide show
  1. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/PKG-INFO +1 -1
  2. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/Jdownfolder.py +3 -2
  3. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/MAEGreen.py +12 -14
  4. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/siesta_interface.py +14 -10
  5. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/PKG-INFO +1 -1
  6. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_magnon2.py +1 -0
  7. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/setup.py +1 -1
  8. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/LICENSE +0 -0
  9. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/README.md +0 -0
  10. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/Jtensor.py +0 -0
  11. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/MAE.py +0 -0
  12. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/Oiju.py +0 -0
  13. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/Oiju_epc.py +0 -0
  14. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/__init__.py +0 -0
  15. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/anisotropy.py +0 -0
  16. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/basis.py +0 -0
  17. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/citation.py +0 -0
  18. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/contour.py +0 -0
  19. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/density_matrix.py +0 -0
  20. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/epc.py +0 -0
  21. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/exchange.py +0 -0
  22. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/exchangeCL2.py +0 -0
  23. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/exchange_params.py +0 -0
  24. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/exchange_pert.py +0 -0
  25. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/exchange_qspace.py +0 -0
  26. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/external/__init__.py +0 -0
  27. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/external/p_tqdm.py +0 -0
  28. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/gpaw_wrapper.py +0 -0
  29. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/green.py +0 -0
  30. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/greentest.py +0 -0
  31. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/__init__.py +0 -0
  32. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/__init__.py +0 -0
  33. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/abacus_api.py +0 -0
  34. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/abacus_wrapper.py +0 -0
  35. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/gen_exchange_abacus.py +0 -0
  36. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/orbital_api.py +0 -0
  37. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/stru_api.py +0 -0
  38. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/test_density_matrix.py +0 -0
  39. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/test_read_HRSR.py +0 -0
  40. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/abacus/test_read_stru.py +0 -0
  41. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/gpaw_interface.py +0 -0
  42. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/lawaf_interface.py +0 -0
  43. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/manager.py +0 -0
  44. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/interfaces/wannier90_interface.py +0 -0
  45. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/__init__.py +0 -0
  46. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_exchange.py +0 -0
  47. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_multibinit.py +0 -0
  48. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_tomsasd.py +0 -0
  49. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_txt.py +0 -0
  50. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_uppasd.py +0 -0
  51. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_exchange/io_vampire.py +0 -0
  52. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/io_merge.py +0 -0
  53. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/kpoints.py +0 -0
  54. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/magnon/__init__.py +0 -0
  55. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/magnon/io_exchange2.py +0 -0
  56. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/magnon/plot.py +0 -0
  57. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/magnon/structure.py +0 -0
  58. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/__init__.py +0 -0
  59. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/fermi.py +0 -0
  60. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/fibonacci_sphere.py +0 -0
  61. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/kR_convert.py +0 -0
  62. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/lowdin.py +0 -0
  63. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/magnons.py +0 -0
  64. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mathutils/rotate_spin.py +0 -0
  65. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/myTB.py +0 -0
  66. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/mycfr.py +0 -0
  67. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/orbital_magmom.py +0 -0
  68. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/orbmap.py +0 -0
  69. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/pauli.py +0 -0
  70. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/pert.py +0 -0
  71. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/plot.py +0 -0
  72. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/rotate_atoms.py +0 -0
  73. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/rotate_siestaDM.py +0 -0
  74. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/sisl_wrapper.py +0 -0
  75. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/__init__.py +0 -0
  76. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/base_parser.py +0 -0
  77. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/constants.py +0 -0
  78. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/hamiltonian.py +0 -0
  79. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/hamiltonian_terms.py +0 -0
  80. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/plot.py +0 -0
  81. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/qsolver.py +0 -0
  82. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/spin_api.py +0 -0
  83. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/spin_xml.py +0 -0
  84. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/spinham/supercell.py +0 -0
  85. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/symmetrize_J.py +0 -0
  86. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/tensor_rotate.py +0 -0
  87. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/thetaphi.py +0 -0
  88. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/utest.py +0 -0
  89. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/utils.py +0 -0
  90. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/versioninfo.py +0 -0
  91. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/wannier/__init__.py +0 -0
  92. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/wannier/w90_parser.py +0 -0
  93. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J/wannier/w90_tb_parser.py +0 -0
  94. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/SOURCES.txt +0 -0
  95. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/dependency_links.txt +0 -0
  96. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/entry_points.txt +0 -0
  97. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/requires.txt +0 -0
  98. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/TB2J.egg-info/top_level.txt +0 -0
  99. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_downfold.py +0 -0
  100. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_eigen.py +0 -0
  101. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_magnon.py +0 -0
  102. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_magnon_dos.py +0 -0
  103. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_merge.py +0 -0
  104. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_rotate.py +0 -0
  105. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/TB2J_rotateDM.py +0 -0
  106. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/abacus2J.py +0 -0
  107. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/siesta2J.py +0 -0
  108. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/scripts/wann2J.py +0 -0
  109. {tb2j-0.9.9rc18 → tb2j-0.9.9rc19}/setup.cfg +0 -0
@@ -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
@@ -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,
@@ -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,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,3 +1,4 @@
1
+ #!/usr/bin/env python3
1
2
  from TB2J.magnon import plot_tb2j_magnon_bands
2
3
 
3
4
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  from setuptools import find_packages, setup
3
3
 
4
- __version__ = "0.9.9rc18"
4
+ __version__ = "0.9.9rc19"
5
5
 
6
6
  long_description = """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. """
7
7
 
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
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
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