TB2J 0.9.9.1__py3-none-any.whl → 0.9.9.3__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/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.0.1"
1
+ __version__ = "0.9.9.1"
TB2J/exchange_params.py CHANGED
@@ -251,6 +251,11 @@ def add_exchange_args_to_parser(parser: argparse.ArgumentParser):
251
251
 
252
252
 
253
253
  def parser_argument_to_dict(args) -> dict:
254
+ ind_mag_atoms = args.index_magnetic_atoms
255
+ if ind_mag_atoms is not None:
256
+ ind_mag_atoms = [int(i) - 1 for i in ind_mag_atoms]
257
+ else:
258
+ ind_mag_atoms = None
254
259
  return {
255
260
  "efermi": args.efermi,
256
261
  "magnetic_elements": args.elements,
@@ -268,5 +273,5 @@ def parser_argument_to_dict(args) -> dict:
268
273
  "orb_decomposition": args.orb_decomposition,
269
274
  "output_path": args.output_path,
270
275
  "orth": args.orth,
271
- "index_magnetic_atoms": args.index_magnetic_atoms,
276
+ "index_magnetic_atoms": ind_mag_atoms,
272
277
  }
@@ -8,16 +8,13 @@ write not only xml output.
8
8
  - tom's asd inputs.
9
9
  """
10
10
 
11
+ # matplotlib.use("Agg")
12
+ import gc
11
13
  import os
12
14
  import pickle
13
15
  from collections.abc import Iterable
14
16
  from datetime import datetime
15
17
 
16
- import matplotlib
17
-
18
- matplotlib.use("Agg")
19
- import gc
20
-
21
18
  import matplotlib.pyplot as plt
22
19
  import numpy as np
23
20
 
@@ -28,7 +28,11 @@ def run_abacus2J():
28
28
 
29
29
  args = parser.parse_args()
30
30
 
31
- if args.elements is None:
31
+ index_magnetic_atoms = args.index_magnetic_atoms
32
+ if index_magnetic_atoms is not None:
33
+ index_magnetic_atoms = [i - 1 for i in index_magnetic_atoms]
34
+
35
+ if args.elements is None and index_magnetic_atoms is None:
32
36
  print("Please input the magnetic elements, e.g. --elements Fe Ni")
33
37
  sys.exit()
34
38
 
@@ -49,7 +53,7 @@ def run_abacus2J():
49
53
  nproc=args.nproc,
50
54
  exclude_orbs=args.exclude_orbs,
51
55
  orb_decomposition=args.orb_decomposition,
52
- index_magnetic_atoms=args.index_magnetic_atoms,
56
+ index_magnetic_atoms=index_magnetic_atoms,
53
57
  cutoff=args.cutoff,
54
58
  )
55
59
 
@@ -47,6 +47,10 @@ def run_siesta2J():
47
47
  # else:
48
48
  # include_orbs[element] = None
49
49
 
50
+ index_magnetic_atoms = args.index_magnetic_atoms
51
+ if index_magnetic_atoms is not None:
52
+ index_magnetic_atoms = [i - 1 for i in index_magnetic_atoms]
53
+
50
54
  gen_exchange_siesta(
51
55
  fdf_fname=args.fdf_fname,
52
56
  kmesh=args.kmesh,
@@ -66,7 +70,7 @@ def run_siesta2J():
66
70
  orb_decomposition=args.orb_decomposition,
67
71
  read_H_soc=args.split_soc,
68
72
  orth=args.orth,
69
- index_magnetic_atoms=args.index_magnetic_atoms,
73
+ index_magnetic_atoms=index_magnetic_atoms,
70
74
  )
71
75
 
72
76
 
@@ -61,10 +61,14 @@ def run_wann2J():
61
61
  if args.efermi is None:
62
62
  print("Please input fermi energy using --efermi ")
63
63
  sys.exit()
64
- if args.elements is None:
64
+ if args.elements is None and args.index_magnetic_atoms is None:
65
65
  print("Please input the magnetic elements, e.g. --elements Fe Ni")
66
66
  sys.exit()
67
67
 
68
+ index_magnetic_atoms = args.index_magnetic_atoms
69
+ if index_magnetic_atoms is not None:
70
+ index_magnetic_atoms = [i - 1 for i in index_magnetic_atoms]
71
+
68
72
  gen_exchange(
69
73
  path=args.path,
70
74
  colinear=(not args.spinor),
@@ -89,7 +93,7 @@ def run_wann2J():
89
93
  # qspace=args.qspace,
90
94
  write_density_matrix=args.write_dm,
91
95
  orb_decomposition=args.orb_decomposition,
92
- index_magnetic_atoms=args.index_magnetic_atoms,
96
+ index_magnetic_atoms=index_magnetic_atoms,
93
97
  )
94
98
 
95
99
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TB2J
3
- Version: 0.9.9.1
3
+ Version: 0.9.9.3
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,7 +21,7 @@ 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.1.10
24
+ Requires-Dist: HamiltonIO>=0.2.1
25
25
  Requires-Dist: pre-commit
26
26
  Requires-Dist: sympair>0.1.0
27
27
  Requires-Dist: sisl>=0.9.0
@@ -4,7 +4,7 @@ TB2J/MAE.py,sha256=fM8U-Dgp9HcQOEeC_kyZV1oVrygBvcux9BraUXVouvY,10994
4
4
  TB2J/MAEGreen.py,sha256=pCX12GDNaOz8XgMlui8NjAERM43Ux3HyOKfiD80czXI,15306
5
5
  TB2J/Oiju.py,sha256=cNGv8N5uH_swGq7cnAt2OyiDfqtjLlLrwseGu0E4iaM,3383
6
6
  TB2J/Oiju_epc.py,sha256=oytM3NYW7nWmklrGgNlqwIpI_JYv_hb7ZnR4o9nYNog,6809
7
- TB2J/__init__.py,sha256=hcEWkag_UvLm1ZSbjsgcTWkGVlR3Bwmzg1QYAwsvf-g,24
7
+ TB2J/__init__.py,sha256=bhvNrEcDHXt9O-K1rdRAtMHwmvdSm_-Y28VwdCZFsik,24
8
8
  TB2J/anisotropy.py,sha256=0zmvXkmDmakbBOwGYLa3IIkv5cE99SHLAQJsGoZz7JQ,25463
9
9
  TB2J/basis.py,sha256=DFo6_QUwjBwisP6zGxvoO0lpGTMDPAOkiL9giNCjOjA,1558
10
10
  TB2J/citation.py,sha256=gcQeyJZaT1Qrtsl8Y3s4neOH3-vvgmIcCvXeV2o3vj0,2891
@@ -13,7 +13,7 @@ TB2J/density_matrix.py,sha256=D5k8Oe21OCiLVORNYbo4TZOFG0slrQSbj91kJ3TMFjs,1514
13
13
  TB2J/epc.py,sha256=zLbtqZJhDr8DnnGN6YENcXwrMb3Qxu6KB08mLy9Pw20,3474
14
14
  TB2J/exchange.py,sha256=HSvB_keITEeaoNG661feoEcCwjkQlavQQiIi1ONsI3Y,27035
15
15
  TB2J/exchangeCL2.py,sha256=P7bklMXVYX_tn9DbjEPqeTir1SeZyfPBIP1fhWUzLmY,11419
16
- TB2J/exchange_params.py,sha256=eEO7DX9Hy9HiQ_ZyAvsBcc7KhB6jeKJKZzrhf74YKMk,7882
16
+ TB2J/exchange_params.py,sha256=d1nFBFwut9SvxUmPRzPzRxD6y0KAP2IvGoEOQ2Jec9U,8049
17
17
  TB2J/exchange_pert.py,sha256=jmFMtQbYa_uczM4VAeS6TijkIHRFIqEzZJswzE9Wfuo,8523
18
18
  TB2J/exchange_qspace.py,sha256=ZL68qBGFUaQ9BsSPsJaaoWOr9RssPiqX34R_9I3nk_8,8436
19
19
  TB2J/gpaw_wrapper.py,sha256=aJ--9Dtyq7jOP1Hkh-Sh1nWcfXm6zKcljOCO0DNCAr0,6890
@@ -55,7 +55,7 @@ TB2J/interfaces/abacus/test_density_matrix.py,sha256=bMWWJYtDS57SpPZ-eZXZ9Hr_UK4
55
55
  TB2J/interfaces/abacus/test_read_HRSR.py,sha256=W1oO_yigT50Yb5_u-KB_IfTpM7kArGkBuMSMs0H4CTs,1235
56
56
  TB2J/interfaces/abacus/test_read_stru.py,sha256=hoKPHVco8vwzC7Gao4bOPCdAPhh29x-9DTJJqRr7AYM,788
57
57
  TB2J/io_exchange/__init__.py,sha256=KfGHum7B8E4G_KKfillqw0lErtoyKEuFUUttHLs-mg4,32
58
- TB2J/io_exchange/io_exchange.py,sha256=gaT0fXD3EzPsMgE_VX9gvcf7nEGY3KVYN8xxTAPzxc0,20120
58
+ TB2J/io_exchange/io_exchange.py,sha256=6fefcfYAyRojkCJA5bFwAa2Hjwx6epysfyX8Snj9DWc,20102
59
59
  TB2J/io_exchange/io_multibinit.py,sha256=8PDmWxzGuv-GwJosj2ZTmiyNY_duFVWJ4ekCuSqGdd8,6739
60
60
  TB2J/io_exchange/io_tomsasd.py,sha256=NqkAC1Fl-CUnFA21eBzSy_S5F_oeQFJysw4UukQbN8o,4173
61
61
  TB2J/io_exchange/io_txt.py,sha256=BMr1eSILlKpgtjvDx7uw2VMAkEKSvGEPNxpaT_zev0I,10547
@@ -80,19 +80,19 @@ TB2J/spinham/supercell.py,sha256=y17uUC6r3gQb278FhxIW4CABihfLTvKFj6flyXrCPR8,122
80
80
  TB2J/wannier/__init__.py,sha256=7ojCbM84PYv1X1Tbo4NHI-d3gWmQsZB_xiYqbfxVV1E,80
81
81
  TB2J/wannier/w90_parser.py,sha256=dbd63LuKyv2DVUzqRINGsbDzEsOxsQyE8_Ear_LQIRg,4620
82
82
  TB2J/wannier/w90_tb_parser.py,sha256=qt8pnuprmPp9iIAYwPkPbmEzk6ZPgMq2xognoQp7vwc,4610
83
- tb2j-0.9.9.1.data/scripts/TB2J_downfold.py,sha256=i4BVqnpDdgrX_amookVWeLGefGBn-qeAutWiwuY9SfQ,2099
84
- tb2j-0.9.9.1.data/scripts/TB2J_eigen.py,sha256=Qs9v2hnMm2Tpfoa4h53muUKty2dZjwx8948MBoQooNg,1128
85
- tb2j-0.9.9.1.data/scripts/TB2J_magnon.py,sha256=q7UwAmorRcFNk4tfE7gl_ny05l6p7pbD9Wm_LkIpKEw,3101
86
- tb2j-0.9.9.1.data/scripts/TB2J_magnon_dos.py,sha256=TMXQvD2dIbO5FZ4tUMmxJgCgH2O2hDAPUNfEKO4z-x4,110
87
- tb2j-0.9.9.1.data/scripts/TB2J_merge.py,sha256=y834SF4rIRn1L1ptkhczvavQpC-8Px6DTmDOOSaq_DE,1854
88
- tb2j-0.9.9.1.data/scripts/TB2J_rotate.py,sha256=zgiDFuYZNmzKK0rwDmTaYD2OpRlmKA_VGeBx83w2Xwc,873
89
- tb2j-0.9.9.1.data/scripts/TB2J_rotateDM.py,sha256=kCvF7gotuqAX1VnJ06cwfVm7RrhrdtiV5v7d9P2Pn_E,567
90
- tb2j-0.9.9.1.data/scripts/abacus2J.py,sha256=r6P9upWah9Dpeqli-oLD7a1wnQc8rvHT6ed0qw4lUYE,1634
91
- tb2j-0.9.9.1.data/scripts/siesta2J.py,sha256=Px6eB4OOa00hoCzCoXcuNGiH025udgxudkDfuzGYMRE,2159
92
- tb2j-0.9.9.1.data/scripts/wann2J.py,sha256=Z5MSAtS5i5OrPlwDURnPr87dtYF4GbH_NixUi6WYsA8,3043
93
- tb2j-0.9.9.1.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
94
- tb2j-0.9.9.1.dist-info/METADATA,sha256=9SsD8wnqw4ZID73_znrKD7P2Puvckh4UpV-c9L6TQuM,1710
95
- tb2j-0.9.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
96
- tb2j-0.9.9.1.dist-info/entry_points.txt,sha256=Hdz1WC9waUzyFVmowKnbbZ6j-J4adHh_Ko6JpxGYAtE,131
97
- tb2j-0.9.9.1.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
98
- tb2j-0.9.9.1.dist-info/RECORD,,
83
+ tb2j-0.9.9.3.data/scripts/TB2J_downfold.py,sha256=i4BVqnpDdgrX_amookVWeLGefGBn-qeAutWiwuY9SfQ,2099
84
+ tb2j-0.9.9.3.data/scripts/TB2J_eigen.py,sha256=Qs9v2hnMm2Tpfoa4h53muUKty2dZjwx8948MBoQooNg,1128
85
+ tb2j-0.9.9.3.data/scripts/TB2J_magnon.py,sha256=q7UwAmorRcFNk4tfE7gl_ny05l6p7pbD9Wm_LkIpKEw,3101
86
+ tb2j-0.9.9.3.data/scripts/TB2J_magnon_dos.py,sha256=TMXQvD2dIbO5FZ4tUMmxJgCgH2O2hDAPUNfEKO4z-x4,110
87
+ tb2j-0.9.9.3.data/scripts/TB2J_merge.py,sha256=y834SF4rIRn1L1ptkhczvavQpC-8Px6DTmDOOSaq_DE,1854
88
+ tb2j-0.9.9.3.data/scripts/TB2J_rotate.py,sha256=zgiDFuYZNmzKK0rwDmTaYD2OpRlmKA_VGeBx83w2Xwc,873
89
+ tb2j-0.9.9.3.data/scripts/TB2J_rotateDM.py,sha256=kCvF7gotuqAX1VnJ06cwfVm7RrhrdtiV5v7d9P2Pn_E,567
90
+ tb2j-0.9.9.3.data/scripts/abacus2J.py,sha256=VD1ldQP-PIMyxo3Rzzwk_06fJEbbU7oiU3aRXNHK0a0,1826
91
+ tb2j-0.9.9.3.data/scripts/siesta2J.py,sha256=QJ6c0DbqxaqYEesxiL5R9nK9-flNLrr7hajKfCwirYc,2318
92
+ tb2j-0.9.9.3.data/scripts/wann2J.py,sha256=OA31VHEXbQMD-JozoLUHDF6vB9Sr62d804OApSKtSnU,3240
93
+ tb2j-0.9.9.3.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
94
+ tb2j-0.9.9.3.dist-info/METADATA,sha256=7VsFeKTxyCZMuwfFLB3bjdBZEdqfQEu7T_-AB3HDr_o,1709
95
+ tb2j-0.9.9.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
96
+ tb2j-0.9.9.3.dist-info/entry_points.txt,sha256=Hdz1WC9waUzyFVmowKnbbZ6j-J4adHh_Ko6JpxGYAtE,131
97
+ tb2j-0.9.9.3.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
98
+ tb2j-0.9.9.3.dist-info/RECORD,,
File without changes