TB2J 0.9.12.9__py3-none-any.whl → 0.9.12.22__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.
Files changed (40) hide show
  1. TB2J/MAE.py +8 -1
  2. TB2J/MAEGreen.py +78 -61
  3. TB2J/contour.py +3 -2
  4. TB2J/exchange.py +346 -51
  5. TB2J/exchangeCL2.py +285 -47
  6. TB2J/exchange_params.py +48 -0
  7. TB2J/green.py +73 -36
  8. TB2J/interfaces/abacus/gen_exchange_abacus.py +2 -1
  9. TB2J/interfaces/wannier90_interface.py +4 -4
  10. TB2J/io_exchange/__init__.py +19 -1
  11. TB2J/io_exchange/edit.py +594 -0
  12. TB2J/io_exchange/io_espins.py +276 -0
  13. TB2J/io_exchange/io_exchange.py +248 -76
  14. TB2J/io_exchange/io_tomsasd.py +4 -3
  15. TB2J/io_exchange/io_txt.py +72 -7
  16. TB2J/io_exchange/io_vampire.py +4 -2
  17. TB2J/io_merge.py +60 -40
  18. TB2J/magnon/magnon3.py +27 -2
  19. TB2J/mathutils/rotate_spin.py +7 -7
  20. TB2J/myTB.py +11 -11
  21. TB2J/mycfr.py +11 -11
  22. TB2J/pauli.py +32 -2
  23. TB2J/plot.py +26 -0
  24. TB2J/rotate_atoms.py +9 -6
  25. TB2J/scripts/TB2J_edit.py +403 -0
  26. TB2J/scripts/TB2J_plot_exchange.py +48 -0
  27. TB2J/spinham/hamiltonian.py +156 -13
  28. TB2J/spinham/hamiltonian_terms.py +40 -1
  29. TB2J/spinham/spin_xml.py +40 -8
  30. TB2J/symmetrize_J.py +140 -9
  31. TB2J/tests/test_cli_remove_sublattice.py +33 -0
  32. TB2J/tests/test_cli_toggle_exchange.py +50 -0
  33. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/METADATA +10 -7
  34. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/RECORD +38 -34
  35. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/WHEEL +1 -1
  36. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/entry_points.txt +2 -0
  37. TB2J/interfaces/abacus/test_read_HRSR.py +0 -43
  38. TB2J/interfaces/abacus/test_read_stru.py +0 -32
  39. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/licenses/LICENSE +0 -0
  40. {tb2j-0.9.12.9.dist-info → tb2j-0.9.12.22.dist-info}/top_level.txt +0 -0
@@ -1,43 +0,0 @@
1
- from abacus_api import read_HR_SR
2
-
3
-
4
- def main():
5
- # nspin = 2 case
6
- nspin = 2
7
- binary = False
8
- file_path = "../abacus_example/case_Sr2Mn2O6/1_no_soc/OUT.Sr2Mn2O6/"
9
- HR_file = [
10
- file_path + "data-HR-sparse_SPIN0.csr",
11
- file_path + "data-HR-sparse_SPIN1.csr",
12
- ]
13
- SR_file = file_path + "data-SR-sparse_SPIN0.csr"
14
-
15
- basis_num, R_direct_coor, HR_up, HR_dn, SR = read_HR_SR(
16
- nspin, binary, HR_file, SR_file
17
- )
18
-
19
- print("basis_num =", basis_num)
20
- print("R_direct_coor =", R_direct_coor)
21
- print("HR_up[1, 0, 15:22] =", HR_up[1, 0, 15:22])
22
- print("HR_dn[1, 0, 15:22] =", HR_dn[1, 0, 15:22])
23
- print("SR[1, 0, 15:22] =", SR[1, 0, 15:22])
24
-
25
- # nspin = 4 case
26
- nspin = 4
27
- binary = False
28
- file_path = "../abacus_example/case_Sr2Mn2O6/2_soc/OUT.Sr2Mn2O6/"
29
- HR_file = file_path + "data-HR-sparse_SPIN0.csr"
30
- SR_file = file_path + "data-SR-sparse_SPIN0.csr"
31
-
32
- basis_num, R_direct_coor, HR, SR = read_HR_SR(nspin, binary, HR_file, SR_file)
33
-
34
- print("basis_num =", basis_num)
35
- print("R_direct_coor =", R_direct_coor)
36
- print("HR[1, 0, 30:37] =", HR[1, 0, 30:37])
37
- print("SR[1, 0, 30:37] =", SR[1, 0, 30:37])
38
-
39
- return
40
-
41
-
42
- if __name__ == "__main__":
43
- main()
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- """
4
- @File : test_read_stru.py
5
- @Time : 2024/02/02 09:52:23
6
- @Author : Shen Zhen-Xiong
7
- @Email : shenzx@iai.ustc.edu.cn
8
- """
9
-
10
- import os
11
-
12
- from stru_api import read_abacus, read_input, write_abacus
13
-
14
-
15
- def main():
16
- # stru_fe = read_abacus(os.path.join(os.getcwd(), "input/Fe.STRU"))
17
- stru_sr2mn2o6 = read_abacus(
18
- os.path.join(os.getcwd(), "input/Sr2Mn2O6.STRU"), verbose=True
19
- )
20
- write_abacus(
21
- file=os.path.join(os.getcwd(), "STRU"),
22
- atoms=stru_sr2mn2o6,
23
- pp=stru_sr2mn2o6.info["pp"],
24
- basis=stru_sr2mn2o6.info["basis"],
25
- )
26
- input_file = read_input(os.path.join(os.getcwd(), "input/INPUT"))
27
- print(input_file["pseudo_dir"])
28
- return
29
-
30
-
31
- if __name__ == "__main__":
32
- main()