TB2J 0.9.9.9__tar.gz → 0.9.9.12__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 (235) hide show
  1. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/PKG-INFO +4 -2
  2. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/Jtensor.py +5 -6
  3. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/MAEGreen.py +8 -0
  4. tb2j-0.9.9.12/TB2J/__init__.py +1 -0
  5. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/exchange.py +1 -1
  6. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/stru_api.py +3 -1
  7. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/siesta_interface.py +2 -1
  8. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_exchange.py +65 -23
  9. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_vampire.py +6 -3
  10. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_merge.py +15 -1
  11. tb2j-0.9.9.12/TB2J/magnon/__init__.py +3 -0
  12. tb2j-0.9.9.12/TB2J/magnon/magnon3.py +844 -0
  13. tb2j-0.9.9.12/TB2J/magnon/magnon_band.py +185 -0
  14. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/magnon/magnon_math.py +1 -0
  15. tb2j-0.9.9.12/TB2J/magnon/plot.py +97 -0
  16. tb2j-0.9.9.12/TB2J/mathutils/auto_kpath.py +151 -0
  17. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J.egg-info/PKG-INFO +4 -2
  18. tb2j-0.9.9.12/TB2J.egg-info/SOURCES.txt +112 -0
  19. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J.egg-info/requires.txt +3 -1
  20. tb2j-0.9.9.12/scripts/TB2J_plot_magnon_bands.py +7 -0
  21. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/setup.py +5 -2
  22. tb2j-0.9.9.9/.github/workflows/pylint.yml.bak +0 -23
  23. tb2j-0.9.9.9/.github/workflows/python-app.yml +0 -44
  24. tb2j-0.9.9.9/.gitignore +0 -131
  25. tb2j-0.9.9.9/.pre-commit-config.yaml +0 -11
  26. tb2j-0.9.9.9/.readthedocs.yml +0 -28
  27. tb2j-0.9.9.9/.ruff.toml +0 -78
  28. tb2j-0.9.9.9/.travis.yml +0 -33
  29. tb2j-0.9.9.9/TB2J/.gitignore +0 -5
  30. tb2j-0.9.9.9/TB2J/__init__.py +0 -1
  31. tb2j-0.9.9.9/TB2J/downfold/Hdownfolder.py +0 -233
  32. tb2j-0.9.9.9/TB2J/interfaces/abacus/.gitignore +0 -2
  33. tb2j-0.9.9.9/TB2J/magnon/__init__.py +0 -3
  34. tb2j-0.9.9.9/TB2J/magnon/magnon3.py +0 -334
  35. tb2j-0.9.9.9/TB2J/magnon/plot.py +0 -58
  36. tb2j-0.9.9.9/TB2J.egg-info/SOURCES.txt +0 -225
  37. tb2j-0.9.9.9/buildimage.sh +0 -51
  38. tb2j-0.9.9.9/docs/Makefile +0 -20
  39. tb2j-0.9.9.9/docs/_static/Logo-ULG.png +0 -0
  40. tb2j-0.9.9.9/docs/_static/logo_TB2J_horizon.png +0 -0
  41. tb2j-0.9.9.9/docs/conf.py +0 -67
  42. tb2j-0.9.9.9/docs/index.rst +0 -44
  43. tb2j-0.9.9.9/docs/make.bat +0 -35
  44. tb2j-0.9.9.9/docs/requirements.txt +0 -3
  45. tb2j-0.9.9.9/docs/src/BFOvarT.png +0 -0
  46. tb2j-0.9.9.9/docs/src/Contributors.rst +0 -44
  47. tb2j-0.9.9.9/docs/src/ReleaseNotes.md +0 -226
  48. tb2j-0.9.9.9/docs/src/SrMnO3_DOS.png +0 -0
  49. tb2j-0.9.9.9/docs/src/abacus.md +0 -103
  50. tb2j-0.9.9.9/docs/src/applications.rst +0 -9
  51. tb2j-0.9.9.9/docs/src/convention.rst +0 -18
  52. tb2j-0.9.9.9/docs/src/development.md +0 -22
  53. tb2j-0.9.9.9/docs/src/downfold.md +0 -28
  54. tb2j-0.9.9.9/docs/src/ecosystem.md +0 -49
  55. tb2j-0.9.9.9/docs/src/eigen.rst +0 -34
  56. tb2j-0.9.9.9/docs/src/extend.rst +0 -45
  57. tb2j-0.9.9.9/docs/src/faq.rst +0 -79
  58. tb2j-0.9.9.9/docs/src/install.rst +0 -86
  59. tb2j-0.9.9.9/docs/src/mae.md +0 -127
  60. tb2j-0.9.9.9/docs/src/magnon_band.assets/exchange_magnon-1593690872101.png +0 -0
  61. tb2j-0.9.9.9/docs/src/magnon_band.assets/exchange_magnon.png +0 -0
  62. tb2j-0.9.9.9/docs/src/magnon_band.assets/magnon_dos.png +0 -0
  63. tb2j-0.9.9.9/docs/src/magnon_band.rst +0 -98
  64. tb2j-0.9.9.9/docs/src/multibinit.rst +0 -89
  65. tb2j-0.9.9.9/docs/src/openmx.rst +0 -27
  66. tb2j-0.9.9.9/docs/src/orbital_contribution.md +0 -80
  67. tb2j-0.9.9.9/docs/src/output.rst +0 -52
  68. tb2j-0.9.9.9/docs/src/parameters.rst +0 -89
  69. tb2j-0.9.9.9/docs/src/references.rst +0 -36
  70. tb2j-0.9.9.9/docs/src/roadmap.md +0 -8
  71. tb2j-0.9.9.9/docs/src/rotate_and_merge.rst +0 -54
  72. tb2j-0.9.9.9/docs/src/siesta.rst +0 -38
  73. tb2j-0.9.9.9/docs/src/spin_model_assets/canting_DMI.png +0 -0
  74. tb2j-0.9.9.9/docs/src/spin_model_assets/tmulti5_2.png +0 -0
  75. tb2j-0.9.9.9/docs/src/symmetry.md +0 -42
  76. tb2j-0.9.9.9/docs/src/tutorial.rst +0 -18
  77. tb2j-0.9.9.9/docs/src/wannier.rst +0 -228
  78. tb2j-0.9.9.9/examples/Siesta/BccFe/Fe.1.psml +0 -1181
  79. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/EigenJq.txt +0 -119
  80. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange.xml +0 -4126
  81. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange_kpth.txt +0 -8
  82. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange_magnon.png +0 -0
  83. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon.py +0 -3
  84. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_band.json +0 -3332
  85. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_band.pdf +0 -0
  86. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_dos.png +0 -0
  87. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_dos.txt +0 -302
  88. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/mb.files +0 -3
  89. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/mb.in +0 -33
  90. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/plot.sh +0 -1
  91. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/plot_magnon_dos.sh +0 -1
  92. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/Multibinit/plot_magnon_from_json_file.py +0 -73
  93. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/TB2J.pickle +0 -0
  94. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/TomASD/exchange.exch +0 -1381
  95. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/TomASD/exchange.ucf +0 -3
  96. tb2j-0.9.9.9/examples/Siesta/BccFe/TB2J_results/exchange.out +0 -3097
  97. tb2j-0.9.9.9/examples/Siesta/BccFe/getJ.sh +0 -2
  98. tb2j-0.9.9.9/examples/Siesta/BccFe/run.sh +0 -3
  99. tb2j-0.9.9.9/examples/Siesta/BccFe/siesta.fdf +0 -61
  100. tb2j-0.9.9.9/examples/Siesta/HcpCo/Co.1.psml +0 -3174
  101. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Multibinit/exchange.xml +0 -7610
  102. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Multibinit/mb.files +0 -3
  103. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Multibinit/mb.in +0 -33
  104. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/TB2J.pickle +0 -0
  105. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/TomASD/exchange.exch +0 -2556
  106. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/TomASD/exchange.ucf +0 -4
  107. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Vampire/input +0 -42
  108. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Vampire/vampire.UCF +0 -644
  109. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/Vampire/vampire.mat +0 -24
  110. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/exchange.out +0 -5708
  111. tb2j-0.9.9.9/examples/Siesta/HcpCo/TB2J_results/summary.txt +0 -10
  112. tb2j-0.9.9.9/examples/Siesta/HcpCo/getJ.sh +0 -1
  113. tb2j-0.9.9.9/examples/Siesta/HcpCo/run.sh +0 -3
  114. tb2j-0.9.9.9/examples/Siesta/HcpCo/siesta.fdf +0 -63
  115. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/JvsR.pdf +0 -0
  116. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/exchange.xml +0 -533
  117. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/mb.files +0 -3
  118. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/mb.in +0 -33
  119. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/TB2J.pickle +0 -0
  120. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/TomASD/exchange.exch +0 -509
  121. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/TomASD/exchange.ucf +0 -3
  122. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/input +0 -42
  123. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/vampire.UCF +0 -135
  124. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/vampire.mat +0 -13
  125. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/assigned_basis.txt +0 -14
  126. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/exchange.out +0 -406
  127. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/TB2J_results/exchange_orb_decomposition.out +0 -1274
  128. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinit.files +0 -8
  129. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinit.in +0 -83
  130. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_down.win +0 -113
  131. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_down_centres.xyz +0 -21
  132. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_down_hr.dat +0 -24512
  133. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_up.win +0 -113
  134. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_up_centres.xyz +0 -21
  135. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/abinito_w90_up_hr.dat +0 -24512
  136. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/get_J.sh +0 -1
  137. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/psp/Mn.GGA-PBESOL-JTH.xml +0 -16818
  138. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/psp/O.GGA-PBESOL-JTH.xml +0 -12782
  139. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/psp/Sr.GGA-PBESOL-JTH.xml +0 -12646
  140. tb2j-0.9.9.9/examples/abinit-w90/SrMnO3/run.sh +0 -6
  141. tb2j-0.9.9.9/requirements.txt +0 -11
  142. tb2j-0.9.9.9/upload_to_pip.sh +0 -5
  143. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/LICENSE +0 -0
  144. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/README.md +0 -0
  145. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/Jdownfolder.py +0 -0
  146. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/MAE.py +0 -0
  147. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/Oiju.py +0 -0
  148. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/Oiju_epc.py +0 -0
  149. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/anisotropy.py +0 -0
  150. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/basis.py +0 -0
  151. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/citation.py +0 -0
  152. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/contour.py +0 -0
  153. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/density_matrix.py +0 -0
  154. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/epc.py +0 -0
  155. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/exchangeCL2.py +0 -0
  156. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/exchange_params.py +0 -0
  157. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/exchange_pert.py +0 -0
  158. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/exchange_qspace.py +0 -0
  159. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/external/__init__.py +0 -0
  160. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/external/p_tqdm.py +0 -0
  161. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/gpaw_wrapper.py +0 -0
  162. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/green.py +0 -0
  163. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/greentest.py +0 -0
  164. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/__init__.py +0 -0
  165. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/__init__.py +0 -0
  166. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/abacus_api.py +0 -0
  167. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/abacus_wrapper.py +0 -0
  168. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/gen_exchange_abacus.py +0 -0
  169. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/orbital_api.py +0 -0
  170. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/test_density_matrix.py +0 -0
  171. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/test_read_HRSR.py +0 -0
  172. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/abacus/test_read_stru.py +0 -0
  173. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/gpaw_interface.py +0 -0
  174. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/lawaf_interface.py +0 -0
  175. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/manager.py +0 -0
  176. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/interfaces/wannier90_interface.py +0 -0
  177. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/__init__.py +0 -0
  178. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_multibinit.py +0 -0
  179. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_tomsasd.py +0 -0
  180. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_txt.py +0 -0
  181. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/io_exchange/io_uppasd.py +0 -0
  182. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/kpoints.py +0 -0
  183. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/magnon/io_exchange2.py +0 -0
  184. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/magnon/magnon_io.py +0 -0
  185. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/magnon/structure.py +0 -0
  186. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/__init__.py +0 -0
  187. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/fermi.py +0 -0
  188. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/fibonacci_sphere.py +0 -0
  189. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/kR_convert.py +0 -0
  190. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/lowdin.py +0 -0
  191. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mathutils/rotate_spin.py +0 -0
  192. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/myTB.py +0 -0
  193. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/mycfr.py +0 -0
  194. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/orbital_magmom.py +0 -0
  195. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/orbmap.py +0 -0
  196. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/pauli.py +0 -0
  197. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/pert.py +0 -0
  198. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/plot.py +0 -0
  199. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/rotate_atoms.py +0 -0
  200. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/rotate_siestaDM.py +0 -0
  201. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/sisl_wrapper.py +0 -0
  202. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/__init__.py +0 -0
  203. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/base_parser.py +0 -0
  204. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/constants.py +0 -0
  205. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/hamiltonian.py +0 -0
  206. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/hamiltonian_terms.py +0 -0
  207. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/plot.py +0 -0
  208. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/qsolver.py +0 -0
  209. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/spin_api.py +0 -0
  210. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/spin_xml.py +0 -0
  211. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/spinham/supercell.py +0 -0
  212. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/symmetrize_J.py +0 -0
  213. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/tensor_rotate.py +0 -0
  214. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/thetaphi.py +0 -0
  215. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/utest.py +0 -0
  216. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/utils.py +0 -0
  217. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/versioninfo.py +0 -0
  218. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/wannier/__init__.py +0 -0
  219. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/wannier/w90_parser.py +0 -0
  220. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J/wannier/w90_tb_parser.py +0 -0
  221. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J.egg-info/dependency_links.txt +0 -0
  222. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J.egg-info/entry_points.txt +0 -0
  223. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/TB2J.egg-info/top_level.txt +0 -0
  224. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_downfold.py +0 -0
  225. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_eigen.py +0 -0
  226. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_magnon.py +0 -0
  227. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_magnon2.py +0 -0
  228. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_magnon_dos.py +0 -0
  229. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_merge.py +0 -0
  230. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_rotate.py +0 -0
  231. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/TB2J_rotateDM.py +0 -0
  232. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/abacus2J.py +0 -0
  233. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/siesta2J.py +0 -0
  234. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/scripts/wann2J.py +0 -0
  235. {tb2j-0.9.9.9 → tb2j-0.9.9.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TB2J
3
- Version: 0.9.9.9
3
+ Version: 0.9.9.12
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
@@ -21,10 +21,12 @@ Requires-Dist: ase>=3.19
21
21
  Requires-Dist: tqdm
22
22
  Requires-Dist: pathos
23
23
  Requires-Dist: packaging>=20.0
24
- Requires-Dist: HamiltonIO>=0.2.3
24
+ Requires-Dist: HamiltonIO>=0.2.4
25
25
  Requires-Dist: pre-commit
26
26
  Requires-Dist: sympair>0.1.0
27
27
  Requires-Dist: sisl>=0.9.0
28
+ Requires-Dist: tomli>=2.0.0
29
+ Requires-Dist: tomli-w>=1.0.0
28
30
  Dynamic: author
29
31
  Dynamic: author-email
30
32
  Dynamic: classifier
@@ -71,22 +71,21 @@ def decompose_J_tensor(Jtensor):
71
71
  return Jiso, D, Jani
72
72
 
73
73
 
74
- def combine_J_tensor(Jiso=0.0, D=np.zeros(3), Jani=np.zeros((3, 3), dtype=float)):
74
+ def combine_J_tensor(Jiso=None, D=None, Jani=None, dtype=float):
75
75
  """Combine isotropic exchange, DMI, and anisotropic exchange into tensor form
76
-
77
76
  :param Jiso: scalar, isotropice exchange
78
77
  :param D: vector, DMI.
79
78
  :param Jani: 3x3 matrix anisotropic exchange
80
79
  :returns: A 3x3 matrix, the exchange paraemter in tensor form.
81
80
  """
82
- Jtensor = np.zeros((3, 3), dtype=complex)
81
+ Jtensor = np.zeros((3, 3), dtype=dtype)
83
82
  if Jiso is not None:
84
- Jtensor += np.eye(3, dtype=float) * Jiso
83
+ Jtensor += np.eye(3, dtype=dtype) * Jiso
85
84
  if Jani is not None:
86
- Jtensor += np.array(Jani, dtype=float)
85
+ Jtensor += np.array(Jani, dtype=dtype)
87
86
  if D is not None:
88
87
  Jtensor += np.array(
89
- [[0, D[2], -D[1]], [-D[2], 0, D[0]], [D[1], -D[0], 0]], dtype=float
88
+ [[0, D[2], -D[1]], [-D[2], 0, D[0]], [D[1], -D[0], 0]], dtype=dtype
90
89
  )
91
90
  return Jtensor
92
91
 
@@ -43,6 +43,8 @@ class MAEGreen(ExchangeNCL):
43
43
  self.set_angles_random()
44
44
  elif angles == "miller":
45
45
  self.set_angles_miller()
46
+ elif angles == "ztox":
47
+ self.set_angels_ztox()
46
48
  else:
47
49
  self.thetas = angles[0]
48
50
  self.phis = angles[1]
@@ -92,6 +94,12 @@ class MAEGreen(ExchangeNCL):
92
94
  self.thetas.append(i * np.pi / 180)
93
95
  self.phis.append(j * np.pi / 180)
94
96
 
97
+ def set_angels_ztox(self, n=16):
98
+ """Set angles for a scan from z to x"""
99
+ self.thetas = np.linspace(0, np.pi, n)
100
+ self.phis = np.zeros(n)
101
+
102
+
95
103
  def set_angles_random(self, n=16):
96
104
  # n random pairs of theta, phi
97
105
  self.thetas = np.random.random(n) * np.pi
@@ -0,0 +1 @@
1
+ __version__ = "0.9.9.12"
@@ -48,7 +48,7 @@ class Exchange(ExchangeParams):
48
48
  self.emin = self.G.find_energy_ingap(rbound=self.efermi - 15.0) - self.efermi
49
49
  # self.emin = self.G.find_energy_ingap(rbound=self.efermi - 15.0) - self.efermi
50
50
  # self.emin = -42.0
51
- print(f"A gap is found at {self.emin}, set emin to it.")
51
+ #print(f"A gap is found at {self.emin}, set emin to it.")
52
52
 
53
53
  def set_tbmodels(self, tbmodels):
54
54
  pass
@@ -7,11 +7,13 @@
7
7
  Modified on Wed Aug 01 11:44:51 2022
8
8
  @author: Ji Yu-yang
9
9
  """
10
+ import warnings
11
+ warnings.simplefilter(action='ignore', category=FutureWarning)
12
+
10
13
 
11
14
  import os
12
15
  import re
13
16
  import shutil
14
- import warnings
15
17
  from pathlib import Path
16
18
 
17
19
  import numpy as np
@@ -157,7 +157,7 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
157
157
  atoms=model.atoms,
158
158
  basis=basis,
159
159
  efermi=None,
160
- angles="axis",
160
+ angles="xyz",
161
161
  # magnetic_elements=magnetic_elements,
162
162
  # include_orbs=include_orbs,
163
163
  **exargs,
@@ -165,6 +165,7 @@ Warning: The DMI component parallel to the spin orientation, the Jani which has
165
165
  # thetas = [0, np.pi / 2, np.pi, 3 * np.pi / 2]
166
166
  # phis = [0, 0, 0, 0]
167
167
  # MAE.set_angles(thetas=thetas, phis=phis)
168
+ #MAE.set_xyz_angles()
168
169
  MAE.run(output_path=f"{output_path}_anisotropy", with_eigen=False)
169
170
  # print(
170
171
  # f"MAE calculation finished. The results are in {output_path} directory."
@@ -54,6 +54,7 @@ class SpinIO(object):
54
54
  gyro_ratio=None,
55
55
  write_experimental=True,
56
56
  description=None,
57
+ standardize_Jani=False,
57
58
  ):
58
59
  """
59
60
  :param atoms: Ase atoms structure.
@@ -190,6 +191,7 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
190
191
  def _build_Rlist(self):
191
192
  Rset = set()
192
193
  ispin_set = set()
194
+ Rset.add((0, 0, 0)) # always add the zero vector
193
195
  for R, i, j in self.exchange_Jdict:
194
196
  Rset.add(R)
195
197
  ispin_set.add(i)
@@ -236,6 +238,23 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
236
238
  i = self.i_spin(i)
237
239
  return self.charges[self.iatom(i)]
238
240
 
241
+ def get_magnetic_moments(self):
242
+ """Get magnetic moments for magnetic atoms only.
243
+
244
+ Returns
245
+ -------
246
+ np.ndarray
247
+ Array of shape (n_magnetic_atoms, 3) containing the magnetic moments.
248
+ For collinear calculations, only the z component is meaningful.
249
+ """
250
+ mag_atoms = [i for i, idx in enumerate(self.index_spin) if idx >= 0]
251
+ if self.spinat.ndim == 1: # Handle collinear case with only z-component
252
+ moments = np.zeros((len(mag_atoms), 3))
253
+ moments[:, 2] = self.spinat[mag_atoms]
254
+ return moments
255
+ else: # Full 3D magnetic moments
256
+ return self.spinat[mag_atoms]
257
+
239
258
  def get_spin_iatom(self, iatom):
240
259
  return self.spinat[iatom]
241
260
 
@@ -289,7 +308,7 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
289
308
  j,
290
309
  )
291
310
  if self.dmi_ddict is not None and key in self.dmi_ddict:
292
- return np.real(self.dmi_ddict[(tuple(R), i, j)])
311
+ return self.dmi_ddict[(tuple(R), i, j)]
293
312
  else:
294
313
  return default
295
314
 
@@ -308,11 +327,11 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
308
327
  j,
309
328
  )
310
329
  if self.Jani_dict is not None and key in self.Jani_dict:
311
- return np.real(self.Jani_dict[(tuple(R), i, j)])
330
+ return self.Jani_dict[(tuple(R), i, j)]
312
331
  else:
313
332
  return default
314
333
 
315
- def get_J_tensor(self, i, j, R, iso_only=False):
334
+ def get_J_tensor(self, i, j, R, Jiso=True, Jani=False, DMI=False):
316
335
  """
317
336
  Return the full exchange tensor for atom i and j, and cell R.
318
337
  param i : spin index i
@@ -321,21 +340,35 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
321
340
  """
322
341
  i = self.i_spin(i)
323
342
  j = self.i_spin(j)
324
- if iso_only:
325
- J = self.get_Jiso(i, j, R)
326
- if J is not None:
327
- Jtensor = np.eye(3) * self.get_J(i, j, R)
328
- else:
329
- Jtensor = np.eye(3) * 0
330
- else:
331
- Jtensor = combine_J_tensor(
332
- Jiso=self.get_J(i, j, R),
333
- D=self.get_DMI(i, j, R),
334
- Jani=self.get_Jani(i, j, R),
335
- )
343
+ J=D=Ja = None
344
+ if Jiso:
345
+ J= self.get_Jiso(i, j, R)
346
+ if DMI:
347
+ D = self.get_DMI(i, j, R)
348
+ if D is not None:
349
+ D*=1
350
+ if Jani:
351
+ Ja = self.get_Jani(i, j, R)
352
+ if Ja is not None:
353
+ Ja*=1
354
+ Jtensor = combine_J_tensor(Jiso=J, D=D, Jani=Ja)
355
+
356
+
357
+ # if iso_only:
358
+ # J = self.get_Jiso(i, j, R)
359
+ # if J is not None:
360
+ # Jtensor = np.eye(3) * self.get_J(i, j, R)
361
+ # else:
362
+ # Jtensor = np.eye(3) * 0
363
+ # else:
364
+ # Jtensor = combine_J_tensor(
365
+ # Jiso=self.get_J(i, j, R),
366
+ # D=self.get_DMI(i, j, R),
367
+ # Jani=self.get_Jani(i, j, R),
368
+ # )
336
369
  return Jtensor
337
370
 
338
- def get_full_Jtensor_for_one_R_i3j3(self, R, iso_only=False):
371
+ def get_full_Jtensor_for_one_R_i3j3(self, R, Jiso=True, Jani=True, DMI=True):
339
372
  """
340
373
  Return the full exchange tensor of all i and j for cell R.
341
374
  param R (tuple of integers): cell index R
@@ -347,11 +380,11 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
347
380
  for i in range(self.nspin):
348
381
  for j in range(self.nspin):
349
382
  Jmat[i * 3 : i * 3 + 3, j * 3 : j * 3 + 3] = self.get_J_tensor(
350
- i, j, R, iso_only=iso_only
383
+ i, j, R, Jiso=Jiso, Jani=Jani, DMI=DMI
351
384
  )
352
385
  return Jmat
353
386
 
354
- def get_full_Jtensor_for_one_R_ij33(self, R, iso_only=False):
387
+ def get_full_Jtensor_for_one_R_ij33(self, R, Jiso=True, Jani=True, DMI=True):
355
388
  """
356
389
  Return the full exchange tensor of all i and j for cell R.
357
390
  param R (tuple of integers): cell index R
@@ -362,27 +395,36 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
362
395
  Jmat = np.zeros((n, n, 3, 3), dtype=float)
363
396
  for i in range(self.nspin):
364
397
  for j in range(self.nspin):
365
- Jmat[i, j, :, :] = self.get_J_tensor(i, j, R, iso_only=iso_only)
398
+ Jmat[i, j, :, :] = self.get_J_tensor(
399
+ i, j, R, Jiso=Jiso, Jani=Jani, DMI=DMI
400
+ )
366
401
  return Jmat
367
402
 
368
- def get_full_Jtensor_for_Rlist(self, asr=False, iso_only=True, order="i3j3"):
403
+ def get_full_Jtensor_for_Rlist(
404
+ self, asr=False, Jiso=True, Jani=True, DMI=True, order="i3j3"
405
+ ):
369
406
  n = self.nspin
370
407
  n3 = n * 3
371
408
  nR = len(self.Rlist)
372
409
  if order == "i3j3":
373
410
  Jmat = np.zeros((nR, n3, n3), dtype=float)
374
411
  for iR, R in enumerate(self.Rlist):
375
- Jmat[iR] = self.get_full_Jtensor_for_one_R_i3j3(R, iso_only=iso_only)
412
+ Jmat[iR] = self.get_full_Jtensor_for_one_R_i3j3(
413
+ R, Jiso=Jiso, Jani=Jani, DMI=DMI
414
+ )
376
415
  if asr:
377
416
  iR0 = np.argmin(np.linalg.norm(self.Rlist, axis=1))
378
417
  assert np.linalg.norm(self.Rlist[iR0]) == 0
379
418
  for i in range(n3):
380
419
  sum_JRi = np.sum(np.sum(Jmat, axis=0)[i])
381
- Jmat[iR0][i, i] -= sum_JRi
420
+ Jmat[iR0][i, :, i, :] -= sum_JRi
382
421
 
383
422
  elif order == "ij33":
384
423
  Jmat = np.zeros((nR, n, n, 3, 3), dtype=float)
385
- Jmat[iR] = self.get_full_Jtensor_for_one_R_ij33(R, iso_only=iso_only)
424
+ for iR, R in enumerate(self.Rlist):
425
+ Jmat[iR] = self.get_full_Jtensor_for_one_R_ij33(
426
+ R, Jiso=Jiso, Jani=Jani, DMI=DMI
427
+ )
386
428
  if asr:
387
429
  iR0 = np.argmin(np.linalg.norm(self.Rlist, axis=1))
388
430
  assert np.linalg.norm(self.Rlist[iR0]) == 0
@@ -1,5 +1,6 @@
1
- import numpy as np
2
1
  import os
2
+
3
+ import numpy as np
3
4
  from ase.units import J
4
5
 
5
6
 
@@ -51,10 +52,12 @@ def write_vampire_unitcell_file(cls, fname):
51
52
  R, ispin, jspin = key
52
53
  Jtensor = cls.get_J_tensor(ispin, jspin, R)
53
54
  counter += 1 # starts at 0
54
- myfile.write(f"{counter:5d} {ispin:3d} {jspin:3d} {R[0]:3d} {R[1]:3d} {R[2]:3d} ")
55
+ myfile.write(
56
+ f"{counter:5d} {ispin:3d} {jspin:3d} {R[0]:3d} {R[1]:3d} {R[2]:3d} "
57
+ )
55
58
  for i in range(3):
56
59
  for j in range(3):
57
- val =np.real(Jtensor[i,j]*2.0/J)
60
+ val = np.real(Jtensor[i, j] * 2.0 / J)
58
61
  if np.abs(val) < 1e-30:
59
62
  val = 0.0
60
63
  myfile.write(f"{val:<012.5e} ")
@@ -92,7 +92,6 @@ class Merger():
92
92
  self._set_projv()
93
93
 
94
94
  def _set_projv(self):
95
-
96
95
  cell = self.main_dat.atoms.cell.array
97
96
  rotated_cells = np.stack(
98
97
  [obj.atoms.cell.array for obj in self.dat], axis=0
@@ -175,11 +174,26 @@ class Merger():
175
174
  dmi_ddict[key] = newDMI
176
175
  self.main_dat.dmi_ddict = dmi_ddict
177
176
 
177
+ def standardize(self):
178
+ # make sure that the Jani has the trace of zero
179
+ Jdict=self.main_dat.exchange_Jdict
180
+ Jani_dict=self.main_dat.Jani_dict
181
+ for key in self.main_dat.Jani_dict.keys():
182
+ Jani = self.main_dat.Jani_dict[key]
183
+ shift = np.trace(Jani)/3.0
184
+ Jani_dict[key] -= shift * np.eye(3)
185
+ Jdict[key] += shift
186
+ self.main_dat.Jani_dict = Jani_dict
187
+ self.main_dat.exchange_Jdict = Jdict
188
+
189
+
178
190
  def merge(*paths, main_path=None, save=True, write_path='TB2J_results'):
179
191
  m = Merger(*paths, main_path=main_path)
180
192
  m.merge_Jiso()
181
193
  m.merge_DMI()
182
194
  m.merge_Jani()
195
+ m.standardize()
196
+
183
197
  if save:
184
198
  m.main_dat.write_all(path=write_path)
185
199
  return m.dat
@@ -0,0 +1,3 @@
1
+ # from .io_exchange2 import ExchangeIO, plot_tb2j_magnon_bands
2
+
3
+ # __all__ = ["ExchangeIO", "plot_tb2j_magnon_bands"]