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,8 +1,10 @@
1
1
  """
2
2
  Hamiltonian terms
3
3
  """
4
- import numpy as np
4
+
5
5
  from collections import defaultdict
6
+
7
+ import numpy as np
6
8
  import scipy.sparse as ssp
7
9
 
8
10
 
@@ -329,3 +331,40 @@ class DipDip(TwoBodyTerm):
329
331
 
330
332
  def __init__(self):
331
333
  pass
334
+
335
+
336
+ class SIATensorTerm(SingleBodyTerm):
337
+ """
338
+ Single Ion Anisotropy tensor term.
339
+ $H_{SIA} = -\\sum_i \\vec{S}_i^T \\mathbf{A}_i \\vec{S}_i$
340
+ where A_i is a 3x3 anisotropy tensor for each atom i.
341
+ """
342
+
343
+ def __init__(self, sia_tensor_dict, ms=None):
344
+ super(SIATensorTerm, self).__init__(ms=ms)
345
+ self.sia_tensor_dict = sia_tensor_dict
346
+
347
+ def func_i(self, S, i):
348
+ return -np.dot(S[i], np.dot(self.sia_tensor_dict[i], S[i]))
349
+
350
+ def eff_field(self, S, Heff):
351
+ for i, A in self.sia_tensor_dict.items():
352
+ Heff[i] += np.dot(A + A.T, S[i])
353
+
354
+ def jacobian_i(self, S, i):
355
+ return np.dot(self.sia_tensor_dict[i] + self.sia_tensor_dict[i].T, S[i])
356
+
357
+ def calc_hessian(self):
358
+ self._hessian = ssp.lil_matrix(
359
+ (self.nmatoms * 3, self.nmatoms * 3), dtype=float
360
+ )
361
+ for i, A in self.sia_tensor_dict.items():
362
+ self._hessian[i * 3 : i * 3 + 3, i * 3 : i * 3 + 3] = A + A.T
363
+ self._hessian = ssp.csr_matrix(self._hessian)
364
+ return self._hessian
365
+
366
+ def calc_hessian_ijR(self):
367
+ self._hessian_ijR = {}
368
+ for i, A in self.sia_tensor_dict.items():
369
+ self._hessian_ijR[(i, i, (0, 0, 0))] = A + A.T
370
+ return self._hessian_ijR
TB2J/spinham/spin_xml.py CHANGED
@@ -1,9 +1,11 @@
1
1
  import xml.etree.ElementTree as ET
2
- from ase.atoms import Atoms
2
+
3
3
  import numpy as np
4
- from ase.units import Bohr, eV, J
5
- from .constants import gyromagnetic_ratio
4
+ from ase.atoms import Atoms
6
5
  from ase.data import atomic_masses
6
+ from ase.units import Bohr, J, eV
7
+
8
+ from .constants import gyromagnetic_ratio
7
9
 
8
10
 
9
11
  class BaseSpinModelParser(object):
@@ -25,6 +27,7 @@ class BaseSpinModelParser(object):
25
27
  self._exchange = {}
26
28
  self._dmi = {}
27
29
  self._bilinear = {}
30
+ self._sia_tensor = {}
28
31
  self._parse(fname)
29
32
  self.lattice = Atoms(
30
33
  positions=self.positions, masses=self.masses, cell=self.cell
@@ -79,6 +82,10 @@ class BaseSpinModelParser(object):
79
82
  def bilinear(self):
80
83
  return self._bilinear
81
84
 
85
+ @property
86
+ def sia_tensor(self):
87
+ return self._sia_tensor
88
+
82
89
  @property
83
90
  def has_exchange(self):
84
91
  return bool(len(self._exchange))
@@ -91,6 +98,10 @@ class BaseSpinModelParser(object):
91
98
  def has_bilinear(self):
92
99
  return bool(len(self._bilinear))
93
100
 
101
+ @property
102
+ def has_sia_tensor(self):
103
+ return bool(len(self._sia_tensor))
104
+
94
105
 
95
106
  class SpinXmlWriter(object):
96
107
  def _write(self, model, fname):
@@ -174,15 +185,14 @@ class SpinXmlWriter(object):
174
185
  uni_term = ET.SubElement(uni, "spin_uniaxial_SIA_term")
175
186
  ET.SubElement(uni_term, "i").text = "%d " % (i + 1)
176
187
  ET.SubElement(uni_term, "amplitude").text = "%.5e" % (k1 * J / eV)
177
- ET.SubElement(
178
- uni_term, "direction"
179
- ).text = "%.5e \t %.5e \t %.5e " % tuple(model.k1dir[i])
188
+ ET.SubElement(uni_term, "direction").text = (
189
+ "%.5e \t %.5e \t %.5e " % tuple(model.k1dir[i])
190
+ )
180
191
 
181
192
  if model.has_bilinear:
182
- bi = ET.SubElement()
183
193
  bilinear = ET.SubElement(root, "spin_bilinear_list", units="eV")
184
194
  ET.SubElement(bilinear, "nterms").text = "%d" % len(model.bilinear_J_dict)
185
- for key, val in model.bilinear_Jdict.items():
195
+ for key, val in model.bilinear_J_dict.items():
186
196
  bilinear_term = ET.SubElement(bilinear, "spin_bilinear_term")
187
197
  ET.SubElement(bilinear_term, "ijR").text = "%d %d %d %d %d" % (
188
198
  key[0] + 1,
@@ -195,6 +205,17 @@ class SpinXmlWriter(object):
195
205
  ["%.5e" % (x * J / eV) for x in val]
196
206
  )
197
207
 
208
+ if model.has_sia_tensor:
209
+ sia = ET.SubElement(root, "spin_sia_tensor_list", units="eV")
210
+ ET.SubElement(sia, "nterms").text = "%d" % len(model.sia_tensor_dict)
211
+ for i, tensor in model.sia_tensor_dict.items():
212
+ sia_term = ET.SubElement(sia, "spin_sia_tensor_term")
213
+ ET.SubElement(sia_term, "i").text = "%d" % (i + 1)
214
+ tensor_flat = tensor.flatten()
215
+ ET.SubElement(sia_term, "data").text = "\t".join(
216
+ ["%.5e" % (x * J / eV) for x in tensor_flat]
217
+ )
218
+
198
219
  tree = ET.ElementTree(root)
199
220
  tree.write(fname)
200
221
 
@@ -295,3 +316,14 @@ class SpinXmlParser(BaseSpinModelParser):
295
316
  assert (
296
317
  len(self._bilinear) == n_bil
297
318
  ), f"Number of bilinear terms {len(self._bil)} different from nterms in xml file {n_bil}"
319
+
320
+ sia = root.find("spin_sia_tensor_list")
321
+ if sia is not None:
322
+ n_sia = int(sia.find("nterms").text)
323
+ for si in sia.findall("spin_sia_tensor_term"):
324
+ i = int(si.find("i").text) - 1
325
+ val = [float(x) for x in si.find("data").text.strip().split()]
326
+ self._sia_tensor[i] = np.array(val).reshape((3, 3)) * eV / J
327
+ assert (
328
+ len(self._sia_tensor) == n_sia
329
+ ), f"Number of SIA tensor terms {len(self._sia_tensor)} different from nterms in xml file {n_sia}"
TB2J/symmetrize_J.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import copy
2
- from pathlib import Path
2
+ from collections import defaultdict
3
3
 
4
4
  import numpy as np
5
5
  from sympair import SymmetryPairFinder
@@ -33,7 +33,7 @@ class TB2JSymmetrizer:
33
33
  print("Symmetry found:")
34
34
  print(finder.spacegroup)
35
35
  print("-" * 30)
36
- self.pgdict = finder.get_symmetry_pair_group_dict()
36
+ self.pgdict = finder.get_symmetry_pair_list_dict()
37
37
  self.exc = exc
38
38
  self.new_exc = copy.deepcopy(exc)
39
39
  self.Jonly = Jonly
@@ -48,13 +48,19 @@ class TB2JSymmetrizer:
48
48
  symJdict = {}
49
49
  # Jdict = self.exc.exchange_Jdict
50
50
  # ngroup = self.pgdict
51
- for pairgroup in self.pgdict.groups:
51
+ for pairgroup in self.pgdict.pairlists:
52
52
  ijRs = pairgroup.get_all_ijR()
53
53
  ijRs_spin = [self.exc.ijR_index_atom_to_spin(*ijR) for ijR in ijRs]
54
- Js = [self.exc.get_J(*ijR_spin) for ijR_spin in ijRs_spin]
55
- Javg = np.average(Js)
56
- for i, j, R in ijRs_spin:
57
- symJdict[(R, i, j)] = Javg
54
+ Js = []
55
+ for ijR_spin in ijRs_spin:
56
+ i, j, R = ijR_spin
57
+ J = self.exc.get_J(i, j, R)
58
+ if J is not None:
59
+ Js.append(J)
60
+ if Js:
61
+ Javg = np.average(Js)
62
+ for i, j, R in ijRs_spin:
63
+ symJdict[(R, i, j)] = Javg
58
64
  self.new_exc.exchange_Jdict = symJdict
59
65
  if self.Jonly:
60
66
  self.new_exc.has_dmi = False
@@ -67,10 +73,10 @@ class TB2JSymmetrizer:
67
73
 
68
74
  def output(self, path="TB2J_symmetrized"):
69
75
  if path is None:
70
- path = Path(".")
76
+ path = "TB2J_symmetrized"
71
77
  self.new_exc.write_all(path=path)
72
78
 
73
- def run(self, path=None):
79
+ def run(self, path="TB2J_symmetrized"):
74
80
  print("** Symmetrizing exchange parameters.")
75
81
  self.symmetrize_J()
76
82
  print("** Outputing the symmetrized exchange parameters.")
@@ -93,11 +99,136 @@ def symmetrize_J(
93
99
  exc: exchange
94
100
  """
95
101
  if exc is None:
102
+ if path is None:
103
+ raise ValueError("Please provide the path to the exchange parameters.")
96
104
  exc = SpinIO.load_pickle(path=path, fname=fname)
97
105
  symmetrizer = TB2JSymmetrizer(exc, symprec=symprec, Jonly=Jonly)
98
106
  symmetrizer.run(path=output_path)
99
107
 
100
108
 
109
+ def _map_atoms_to_spinio(atoms, spinio, symprec=1e-3):
110
+ """
111
+ Map atoms from input structure to SpinIO structure.
112
+
113
+ Uses species and position matching within symprec tolerance.
114
+
115
+ Parameters
116
+ ----------
117
+ atoms : ase.Atoms
118
+ Input atomic structure.
119
+ spinio : SpinIO
120
+ The SpinIO object containing the reference structure.
121
+ symprec : float, optional
122
+ Position tolerance in Angstrom. Default is 1e-3.
123
+
124
+ Returns
125
+ -------
126
+ dict
127
+ Mapping from SpinIO atom index to input structure atom index.
128
+ """
129
+ mapping = {}
130
+ symbols_in = atoms.get_chemical_symbols()
131
+ pos_in = atoms.get_positions()
132
+ symbols_s = spinio.atoms.get_chemical_symbols()
133
+ pos_s_array = spinio.atoms.get_positions()
134
+
135
+ for i_in, (sym, pos) in enumerate(zip(symbols_in, pos_in)):
136
+ for i_s, (sym_s, pos_s) in enumerate(zip(symbols_s, pos_s_array)):
137
+ if sym == sym_s:
138
+ if np.linalg.norm(pos - pos_s) < symprec:
139
+ mapping[i_s] = i_in
140
+ break
141
+ return mapping
142
+
143
+
144
+ def symmetrize_exchange(spinio, atoms, symprec=1e-3):
145
+ """
146
+ Symmetrize isotropic exchange based on a provided atomic structure.
147
+
148
+ The symmetry is detected from the provided atomic structure using spglib.
149
+ Exchange parameters for symmetry-equivalent atom pairs are averaged.
150
+
151
+ Parameters
152
+ ----------
153
+ spinio : SpinIO
154
+ The SpinIO object to modify.
155
+ atoms : ase.Atoms
156
+ Atomic structure that defines the target symmetry.
157
+ For example, provide a cubic structure to symmetrize to cubic symmetry.
158
+ symprec : float, optional
159
+ Symmetry precision in Angstrom. Default is 1e-3.
160
+
161
+ Notes
162
+ -----
163
+ - Only isotropic exchange (exchange_Jdict) is modified.
164
+ - DMI and anisotropic exchange are unchanged.
165
+ - The spinio.atoms structure is NOT modified; only exchange values change.
166
+ - Atoms are mapped between input and SpinIO structures by species and position.
167
+
168
+ Examples
169
+ --------
170
+ >>> from ase.io import read
171
+ >>> # Symmetrize to cubic symmetry
172
+ >>> cubic_structure = read('cubic_smfeo3.cif')
173
+ >>> symmetrize_exchange(spinio, atoms=cubic_structure)
174
+
175
+ >>> # Symmetrize to original Pnma symmetry (averaging within groups)
176
+ >>> symmetrize_exchange(spinio, atoms=spinio.atoms)
177
+ """
178
+ try:
179
+ from spglib import spglib as spg
180
+ except ImportError:
181
+ raise ImportError(
182
+ "spglib is required for symmetrization. Install it with: pip install spglib"
183
+ )
184
+
185
+ # Get symmetry dataset from the provided structure
186
+ lattice = atoms.get_cell()
187
+ positions = atoms.get_scaled_positions()
188
+ numbers = atoms.get_atomic_numbers()
189
+
190
+ dataset = spg.get_symmetry_dataset((lattice, positions, numbers), symprec=symprec)
191
+ if dataset is None:
192
+ raise ValueError(
193
+ "spglib could not detect symmetry from the provided structure. "
194
+ "Check that the structure is valid and try adjusting symprec."
195
+ )
196
+
197
+ equivalent_atoms = dataset["equivalent_atoms"]
198
+
199
+ # Map atoms between input structure and SpinIO structure
200
+ atom_mapping = _map_atoms_to_spinio(atoms, spinio, symprec=symprec)
201
+
202
+ # Group equivalent pairs and average J values
203
+ groups = defaultdict(list)
204
+
205
+ for (R, i, j), J in spinio.exchange_Jdict.items():
206
+ # Get corresponding atom indices in SpinIO
207
+ iatom = spinio.iatom(i)
208
+ jatom = spinio.iatom(j)
209
+
210
+ # Find matching atoms in input structure
211
+ i_in = atom_mapping.get(iatom)
212
+ j_in = atom_mapping.get(jatom)
213
+
214
+ if i_in is not None and j_in is not None:
215
+ # Key based on equivalent atom orbits
216
+ key = (equivalent_atoms[i_in], equivalent_atoms[j_in], R)
217
+ groups[key].append(J)
218
+
219
+ # Average and reassign
220
+ for (R, i, j), J in spinio.exchange_Jdict.items():
221
+ iatom = spinio.iatom(i)
222
+ jatom = spinio.iatom(j)
223
+ i_in = atom_mapping.get(iatom)
224
+ j_in = atom_mapping.get(jatom)
225
+
226
+ if i_in is not None and j_in is not None:
227
+ key = (equivalent_atoms[i_in], equivalent_atoms[j_in], R)
228
+ if key in groups:
229
+ spinio.exchange_Jdict[(R, i, j)] = np.mean(groups[key])
230
+
231
+
101
232
  def symmetrize_J_cli():
102
233
  from argparse import ArgumentParser
103
234
 
@@ -0,0 +1,33 @@
1
+ from unittest.mock import MagicMock, patch
2
+
3
+ from TB2J.scripts.TB2J_edit import cmd_remove_sublattice
4
+
5
+
6
+ def test_cmd_remove_sublattice():
7
+ # Mock args
8
+ args = MagicMock()
9
+ args.input = "dummy.pickle"
10
+ args.output = "output_dir"
11
+ args.sublattice = "Sm"
12
+
13
+ # Mock load, save, remove_sublattice
14
+ with patch("TB2J.io_exchange.edit.load") as mock_load, patch(
15
+ "TB2J.io_exchange.edit.save"
16
+ ) as mock_save, patch(
17
+ "TB2J.io_exchange.edit.remove_sublattice"
18
+ ) as mock_remove_sublattice:
19
+ # Setup mock return value
20
+ mock_spinio = MagicMock()
21
+ mock_load.return_value = mock_spinio
22
+
23
+ # Run command
24
+ cmd_remove_sublattice(args)
25
+
26
+ # Assertions
27
+ mock_load.assert_called_with("dummy.pickle")
28
+ mock_remove_sublattice.assert_called_with(mock_spinio, "Sm")
29
+ mock_save.assert_called_with(mock_spinio, "output_dir")
30
+
31
+
32
+ if __name__ == "__main__":
33
+ test_cmd_remove_sublattice()
@@ -0,0 +1,50 @@
1
+ from unittest.mock import MagicMock, patch
2
+
3
+ from TB2J.scripts.TB2J_edit import cmd_toggle_exchange
4
+
5
+
6
+ def test_cmd_toggle_exchange():
7
+ args = MagicMock()
8
+ args.input = "dummy.pickle"
9
+ args.output = "output_dir"
10
+ args.enable = False
11
+ args.disable = True
12
+
13
+ with patch("TB2J.io_exchange.edit.load") as mock_load, patch(
14
+ "TB2J.io_exchange.edit.save"
15
+ ) as mock_save, patch("TB2J.io_exchange.edit.toggle_exchange") as mock_toggle:
16
+ mock_spinio = MagicMock()
17
+ mock_spinio.has_exchange = True
18
+ mock_load.return_value = mock_spinio
19
+
20
+ cmd_toggle_exchange(args)
21
+
22
+ mock_load.assert_called_with("dummy.pickle")
23
+ mock_toggle.assert_called_with(mock_spinio, enabled=False)
24
+ mock_save.assert_called_with(mock_spinio, "output_dir")
25
+
26
+
27
+ def test_cmd_toggle_exchange_enable():
28
+ args = MagicMock()
29
+ args.input = "dummy.pickle"
30
+ args.output = "output_dir"
31
+ args.enable = True
32
+ args.disable = False
33
+
34
+ with patch("TB2J.io_exchange.edit.load") as mock_load, patch(
35
+ "TB2J.io_exchange.edit.save"
36
+ ) as mock_save, patch("TB2J.io_exchange.edit.toggle_exchange") as mock_toggle:
37
+ mock_spinio = MagicMock()
38
+ mock_spinio.has_exchange = False
39
+ mock_load.return_value = mock_spinio
40
+
41
+ cmd_toggle_exchange(args)
42
+
43
+ mock_load.assert_called_with("dummy.pickle")
44
+ mock_toggle.assert_called_with(mock_spinio, enabled=True)
45
+ mock_save.assert_called_with(mock_spinio, "output_dir")
46
+
47
+
48
+ if __name__ == "__main__":
49
+ test_cmd_toggle_exchange()
50
+ test_cmd_toggle_exchange_enable()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TB2J
3
- Version: 0.9.12.9
3
+ Version: 0.9.12.22
4
4
  Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
5
5
  Author-email: Xu He <mailhexu@gmail.com>
6
6
  Maintainer-email: Xu He <mailhexu@gmail.com>
@@ -18,36 +18,39 @@ Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
21
24
  Classifier: Operating System :: OS Independent
22
25
  Classifier: Intended Audience :: Science/Research
23
26
  Classifier: Topic :: Scientific/Engineering :: Chemistry
24
27
  Classifier: Topic :: Scientific/Engineering :: Physics
25
28
  Classifier: License :: OSI Approved :: BSD License
26
- Requires-Python: >=3.6
27
29
  Description-Content-Type: text/markdown
28
30
  License-File: LICENSE
29
31
  Requires-Dist: numpy
30
- Requires-Dist: scipy
32
+ Requires-Dist: scipy<1.17,>=1.9
31
33
  Requires-Dist: matplotlib
32
34
  Requires-Dist: ase>=3.19
33
35
  Requires-Dist: tqdm
34
36
  Requires-Dist: pathos
35
37
  Requires-Dist: packaging>=20.0
36
- Requires-Dist: HamiltonIO>=0.2.4
38
+ Requires-Dist: HamiltonIO>=0.3.0
37
39
  Requires-Dist: pre-commit
38
- Requires-Dist: sympair>0.1.0
40
+ Requires-Dist: sympair>=0.1.4
39
41
  Requires-Dist: tomli>=2.0.0
40
42
  Requires-Dist: tomli-w>=1.0.0
41
43
  Requires-Dist: typing_extensions
44
+ Requires-Dist: sisl>=0.16.2
42
45
  Provides-Extra: siesta
43
46
  Requires-Dist: sisl>=0.9.0; extra == "siesta"
44
47
  Requires-Dist: netcdf4; extra == "siesta"
45
48
  Provides-Extra: lawaf
46
- Requires-Dist: lawaf==0.2.3; extra == "lawaf"
49
+ Requires-Dist: lawaf>=0.2.3; extra == "lawaf"
47
50
  Provides-Extra: all
48
51
  Requires-Dist: sisl>=0.9.0; extra == "all"
49
52
  Requires-Dist: netcdf4; extra == "all"
50
- Requires-Dist: lawaf==0.2.3; extra == "all"
53
+ Requires-Dist: lawaf>=0.2.3; extra == "all"
51
54
  Dynamic: license-file
52
55
 
53
56
  [![Python application](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml/badge.svg)](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml)
@@ -1,37 +1,37 @@
1
1
  TB2J/Jdownfolder.py,sha256=K8WrvU_5daH7eQgB53VymJPFRWZoOMlvQGgIca9GNt0,10885
2
2
  TB2J/Jtensor.py,sha256=WRhpp5N92a6lA1jeM1hc7jYUoTOLIdMnIIKpdOyzjR4,3192
3
- TB2J/MAE.py,sha256=fM8U-Dgp9HcQOEeC_kyZV1oVrygBvcux9BraUXVouvY,10994
4
- TB2J/MAEGreen.py,sha256=l-l3y9YGTKG2Vqa9ysSD6abyy0_PhYFqst5yoMjzgGE,15706
3
+ TB2J/MAE.py,sha256=IhNjh50vPLLqkDxVTGvmuh5Q5sLVqrDYCKOC6iaSLas,11104
4
+ TB2J/MAEGreen.py,sha256=Yrtk9yg7X9Uc3UIMsyX8yHaaNZtKAAwt7js50keSZ8A,16938
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=4snBkP_Q_-pFYbLHVoTWZ35Oo5zCX6tsPQ0_L8DKfFo,76
8
8
  TB2J/anisotropy.py,sha256=VaIDM_4IPT9dWkzruVWiR99FbcCbp5cn1LiNuqI-zv0,25465
9
9
  TB2J/basis.py,sha256=yoVL-jLGJ8ykdsMX3MpnjeNsAA_F07jy53HQ60bnt3o,1479
10
10
  TB2J/citation.py,sha256=gcQeyJZaT1Qrtsl8Y3s4neOH3-vvgmIcCvXeV2o3vj0,2891
11
- TB2J/contour.py,sha256=zLHQZZ3hhgLkLFPATCraLOJyLJKLC0fba_L_5sRz23o,3246
11
+ TB2J/contour.py,sha256=qavPsWiyR3IFm8uJlioZZI0I2PlJV_vNTwXVwipJwy0,3310
12
12
  TB2J/density_matrix.py,sha256=D5k8Oe21OCiLVORNYbo4TZOFG0slrQSbj91kJ3TMFjs,1514
13
13
  TB2J/epc.py,sha256=zLbtqZJhDr8DnnGN6YENcXwrMb3Qxu6KB08mLy9Pw20,3474
14
- TB2J/exchange.py,sha256=qDID0faZOWggPLaIC8QY2tOinZaEFU88FNqOJid53-s,26937
15
- TB2J/exchangeCL2.py,sha256=1b0Lx5dSjgCUYSSng5cqJzo-hmXCD91cbaes9jqsU5s,11474
16
- TB2J/exchange_params.py,sha256=RZ7xmWJTgwbp1OZDWWXhFmTt4DPBfabEgfcmfD9Nq4Q,8030
14
+ TB2J/exchange.py,sha256=WF6HG1q4I84LxjTOTemRfMEB0ZWN37MzrLGD3bGjQtM,39835
15
+ TB2J/exchangeCL2.py,sha256=RPAFQ_wNKcdH4joPSMhA2xK0_EMdY326FFtP_zCr2c4,22200
16
+ TB2J/exchange_params.py,sha256=5MbEfGTdHcjKfLbTxs1I8TsosdYWQIyyHulguDl-gEg,9829
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=cnXwDDN-pcfxRI3o5OTNjgql8CkxylltFZy9bDxOffU,6813
20
- TB2J/green.py,sha256=ySXjoV3Cj_E2C41dRfc3TkS7M4vmM6qcHXkt-_-jxsY,17071
20
+ TB2J/green.py,sha256=-YO0oq5hrfDut-7o-U8gRjvdywTDFqkdb2HVPihbez4,18537
21
21
  TB2J/greentest.py,sha256=2ISSfhor9ecSEOi_E6b4Cv26wEIQlwlzca0ru8z44_E,1603
22
- TB2J/io_merge.py,sha256=mgoc8ZUP_a_g-9KvWWISp25qo6aBJ8TQsDsBrMSB5nk,7509
22
+ TB2J/io_merge.py,sha256=d92-oLi6nxJDqdjBx_QLC7L2b8DUATRnOX5oeJLWeOs,8526
23
23
  TB2J/kpoints.py,sha256=9L7tBarFBHoIhpuc9zuwA6HdnlgH834SQrPek4yRoWk,3191
24
- TB2J/myTB.py,sha256=ok_B4my29bOIghMSZfx0Es6G8FaXaIiLP4gPxTdSj00,17659
25
- TB2J/mycfr.py,sha256=ZF1PEE2khlKd_4gPyMkoNXepX3XqwWAL2kDbRJNVX-Y,3908
24
+ TB2J/myTB.py,sha256=6fP6ZlHxejUzgglr0b_hsxv137sQrltozladTKSczFo,17603
25
+ TB2J/mycfr.py,sha256=vgk5NcWBSW9i0vtqnOYo1T734EFsAD8CL0YumtUYpe0,4045
26
26
  TB2J/orbital_magmom.py,sha256=JTwO9ZDgRRQndqR9aFIua4eTvwLMoGsTiY_HaIPMZ2I,889
27
27
  TB2J/orbmap.py,sha256=XLQjKMxCy2eADaM5eb2F_zG08V7lzpXJxp5uEtTeVYI,7194
28
- TB2J/pauli.py,sha256=ESpAhk6LG5ugzuW1YFUTqiDxcg-pQ7wNnzR2FtUnvKM,5295
28
+ TB2J/pauli.py,sha256=XHXFBLiGYl0X67mcIgtwjKXrH0IN16ueoQS392x1AM0,6218
29
29
  TB2J/pert.py,sha256=RaCJfewl0doht4cjAnzzGKe-uj2le4aqe0iPKFrq9fo,1192
30
- TB2J/plot.py,sha256=AhZW7ThKYWVZR8L_T2WhvBoqtw1CkrwG1TxgExtvQYI,4079
31
- TB2J/rotate_atoms.py,sha256=Gl_NDPrzJR0Xi9GP-0N2ZZFZ3hpccoEG-nLE6vr9L0o,3247
30
+ TB2J/plot.py,sha256=ghudgnxPEJA7ERtu7lynTg5Xjbwn9Q4Ne3heyF5Trbc,4763
31
+ TB2J/rotate_atoms.py,sha256=taVNQh2OISHx-nuktRNOwDCbz2a_iKTIghCIT_ld250,3250
32
32
  TB2J/rotate_siestaDM.py,sha256=I4ytO8uFP8_GFyBs9-zMdiMSZS3Y3lj2dSLfNBNI2ZY,1078
33
33
  TB2J/sisl_wrapper.py,sha256=A5x1-tt8efUSPeGY5wM5m6-pJYQFXTCzQHVqD6RBa2g,14792
34
- TB2J/symmetrize_J.py,sha256=pv65f7TXW371kfnByIkg885XFEGg4UmWlzqY7cOUNAk,4474
34
+ TB2J/symmetrize_J.py,sha256=rC91wXrw8w1aESb5-ATBpmoKs_71aEd2MtxfHvcyvDw,9003
35
35
  TB2J/tensor_rotate.py,sha256=ZAC52knugXNJHpvpqSrmrHVdCs04b9v5X2F7rXV2zn4,8059
36
36
  TB2J/thetaphi.py,sha256=Z7N3EOSM7rjHd7b9HxMYLPQO__uR0VwEiV9b471Yudc,399
37
37
  TB2J/utest.py,sha256=z_ahi7tpHQF9WlHNQihcQ7qzfezRJQXQt28eB1X_z64,3897
@@ -45,26 +45,26 @@ TB2J/interfaces/gpaw_interface.py,sha256=GCDlJ-hRWfChvWwsgBDYSmVqO4sH9HAuGZTV9Gq
45
45
  TB2J/interfaces/lawaf_interface.py,sha256=PieLnmppdafOYsgeHznqOou1g9L1sam5jOm3KaObdqo,4408
46
46
  TB2J/interfaces/manager.py,sha256=PQMLEfMCT5GnDWSl2nI4JOgRPm_fysyR-6Y6l97xWcw,860
47
47
  TB2J/interfaces/siesta_interface.py,sha256=Te9-Au0ZGAt-LfEnG8exUFD4lMj6uZu8RmHjopb0XLU,7595
48
- TB2J/interfaces/wannier90_interface.py,sha256=qzRgXUBb7t1Aiegrl_RV51BB8csdtVM0EP0Z4pjmTcs,4467
48
+ TB2J/interfaces/wannier90_interface.py,sha256=IlHjo1RPGBcmso14r3DIZHp-nHNlOmm3GcK81CrHFxY,4500
49
49
  TB2J/interfaces/abacus/__init__.py,sha256=leas71oCvM_HxrF4gnO5A_VKcJmDAgsI1BUctLU3OBw,177
50
50
  TB2J/interfaces/abacus/abacus_api.py,sha256=lNV4LNkLcKw7Zux4MQYM9wnh3eFTlcSqbf4Pb7pqhrk,7243
51
51
  TB2J/interfaces/abacus/abacus_wrapper.py,sha256=bQFnvvy-0hruTavH_VspMk1wD32t2UFybEkCgwkwle0,11941
52
- TB2J/interfaces/abacus/gen_exchange_abacus.py,sha256=v-AUHGkJWeMNf4D5A4wOpCjM6DygQsFB6SWu-BGdTxM,3262
52
+ TB2J/interfaces/abacus/gen_exchange_abacus.py,sha256=haj9m6rbHIfeSRzUgZADFsY1Tf-3n-jPWVPuxfaXhOg,3315
53
53
  TB2J/interfaces/abacus/orbital_api.py,sha256=QEAyy4y_uM5GnwRyLvmShjd_z5A2fwqk7L8yj0Y2Mgc,1577
54
54
  TB2J/interfaces/abacus/stru_api.py,sha256=Hb9MCo_4d_DVEEhntvBNAFw5KQ46TkAADn4z7CT6qOk,67801
55
55
  TB2J/interfaces/abacus/test_density_matrix.py,sha256=bMWWJYtDS57SpPZ-eZXZ9Hr_UK4mv8ZHM7SzItG3IVA,774
56
- TB2J/interfaces/abacus/test_read_HRSR.py,sha256=W1oO_yigT50Yb5_u-KB_IfTpM7kArGkBuMSMs0H4CTs,1235
57
- TB2J/interfaces/abacus/test_read_stru.py,sha256=hoKPHVco8vwzC7Gao4bOPCdAPhh29x-9DTJJqRr7AYM,788
58
- TB2J/io_exchange/__init__.py,sha256=LqEnG67qDVKt4hCUywDEQvUIJ7jsQjmtueOW_J16NOE,54
59
- TB2J/io_exchange/io_exchange.py,sha256=LjNmd3VWXQD588ICcytQfR2_DLDyXKuIuFiPcf2tKhg,24698
56
+ TB2J/io_exchange/__init__.py,sha256=n6ukJTXzAlP1bGk_BRRZHbSdcex-uP4CzRNndS8S080,335
57
+ TB2J/io_exchange/edit.py,sha256=m5Z6JMLSXkXiDH_MlwjrCPQnFsxX5DM9QHdzXwpoMvo,19157
58
+ TB2J/io_exchange/io_espins.py,sha256=M5VP2z6QY88RtzP06ebqHoQy5ywchojz8gr9Uw9rATk,10615
59
+ TB2J/io_exchange/io_exchange.py,sha256=QLYcmnsZrLGatbaIEdgYdxWgIU-imms7q4DN1LyHxA4,31198
60
60
  TB2J/io_exchange/io_multibinit.py,sha256=8PDmWxzGuv-GwJosj2ZTmiyNY_duFVWJ4ekCuSqGdd8,6739
61
- TB2J/io_exchange/io_tomsasd.py,sha256=NqkAC1Fl-CUnFA21eBzSy_S5F_oeQFJysw4UukQbN8o,4173
62
- TB2J/io_exchange/io_txt.py,sha256=jFScdZ5W5_VNSEWYq6WDNKWeshZ0wxFfEzyjfvvU9MA,10601
61
+ TB2J/io_exchange/io_tomsasd.py,sha256=rGWgO2aUgEIKvWccQjlG1SQx5dk345qHrBXddKx2JYo,4186
62
+ TB2J/io_exchange/io_txt.py,sha256=r7Uh1HGfAfkHppMR6pLsx2kMmMJDOR48hk75_ffBd7o,13136
63
63
  TB2J/io_exchange/io_uppasd.py,sha256=qhGhHbp3cZmwuBo1SrEBQulrPjEWPD3yRgVs-juQ7Fs,3268
64
- TB2J/io_exchange/io_vampire.py,sha256=vOStLmtCiWLp9GPhZpsAmrtaRHg9KSmtOM2Fky6yCQA,5762
64
+ TB2J/io_exchange/io_vampire.py,sha256=1dvCxzAUcs5xfeLiFfrhyiWC75-RmrLOdOjF3f9iQSo,5883
65
65
  TB2J/magnon/__init__.py,sha256=Q69duroGIIotgW_71ZdHYarSiJLGAu9NPYgEacUk6eI,117
66
66
  TB2J/magnon/io_exchange2.py,sha256=EcC3x6H13qq61WBsr__xKzHDtSvy_dMz1tEdUaqSG2I,23265
67
- TB2J/magnon/magnon3.py,sha256=ecMCCAZiBCPyEPdNI60h5rV0nRyjFeB40FIX8-o87kE,31801
67
+ TB2J/magnon/magnon3.py,sha256=nl_jR7uO1TlyUDRUoEn7H2y8tuGJ_P2Lj7MceGoqM0w,32371
68
68
  TB2J/magnon/magnon_band.py,sha256=ZLHK1qf2Clu9jlcvBwBCBEi1MrPfy2BWrow8JJ2v5pk,6103
69
69
  TB2J/magnon/magnon_dos.py,sha256=uztzsxCmFZpDHl-JziaUb_NNwBeZw9-L2ozd3XNTvxI,8506
70
70
  TB2J/magnon/magnon_io.py,sha256=H4bmzCcnh1D3Sb6UBIIKWa6jIrA20dg9lX4wfLXHEjo,1241
@@ -78,13 +78,15 @@ TB2J/mathutils/fermi.py,sha256=72tZ5CptGmYaBUD0xLWltuH7LBXcrMUwODyW6-WqlzI,638
78
78
  TB2J/mathutils/fibonacci_sphere.py,sha256=1rqf5n3a9aDjSydA4qGkR1eIeLJKuoblA73cchWJzNg,2342
79
79
  TB2J/mathutils/kR_convert.py,sha256=p_9XWJVNanTzTK2rI6KRjTkbSq42la6N448-zJOsMwY,2671
80
80
  TB2J/mathutils/lowdin.py,sha256=RYbm9OcnFnjcZFdC5YcNUsI9cOJmoDLsWSSCaP0GqKQ,499
81
- TB2J/mathutils/rotate_spin.py,sha256=sPTnwJThfohCHIY7EuzBV2K3mIXcJI5y1QBytGmEKR4,8229
81
+ TB2J/mathutils/rotate_spin.py,sha256=lmb5vYhVe52q5vBPmz9RKvfoKQpBw0nnRTnHTBb7sHw,8238
82
82
  TB2J/scripts/TB2J_downfold.py,sha256=f1CPuka_uOcvwBKDWAaseRZ04Bqyx_Cor5PvU6LyIsU,2600
83
+ TB2J/scripts/TB2J_edit.py,sha256=EIQR2Hyqe3bkgaIHKRKpEvkB8tMO_hADfPqKZhnU-Aw,12870
83
84
  TB2J/scripts/TB2J_eigen.py,sha256=LVFoe1xntAnaljRBbVywBSxq0bSQs0tR7ECf8Zf0CS0,1174
84
85
  TB2J/scripts/TB2J_magnon.py,sha256=fz9nOv5dMy1e0Dac3eGtiNODvdfTnfLlM7jvYbShiN0,3116
85
86
  TB2J/scripts/TB2J_magnon2.py,sha256=mfDrkjK9DpXeKl6jLdACzAD6ArAWBCmC-TPb-vCWpJs,1934
86
87
  TB2J/scripts/TB2J_magnon_dos.py,sha256=xQlI6u31Oyv9Yua73_Qa5cF1cnvg1PNrTy1VXs4dcBk,107
87
88
  TB2J/scripts/TB2J_merge.py,sha256=Qzo1cZPxCy_-RwcxB6R1u4vnTt8BA_cIoVIEs8nHwS4,2109
89
+ TB2J/scripts/TB2J_plot_exchange.py,sha256=WSQG6vNbCeJfDawHudiBxtBDFnpTkQdphSv6Uaq5udc,1251
88
90
  TB2J/scripts/TB2J_plot_magnon_bands.py,sha256=x5WkiI-pkVHqCTa2e5qNWaeAvyXmchqY8BMeTW13dFs,636
89
91
  TB2J/scripts/TB2J_rotate.py,sha256=WneOj6NBMDzVlpLXnq9tZqnJqTATfv_zmgl4EltD118,859
90
92
  TB2J/scripts/TB2J_rotateDM.py,sha256=lH71mkg0BKDGVLoK7VvmIPkf2mCjyc0V5l9rZZgyfP4,570
@@ -95,19 +97,21 @@ TB2J/scripts/wann2J.py,sha256=djLBG3t4oEimokMG6TIFHyjp8u8DtnizN9coQXOTN7U,3254
95
97
  TB2J/spinham/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
98
  TB2J/spinham/base_parser.py,sha256=oQRHvFE_BlUtTaTZykKgvicu40oXcbICB-D1aAt-qlA,2196
97
99
  TB2J/spinham/constants.py,sha256=y4-hRyl5EAR42k24Oa5XhAsUQtKVn1MAgyqNf-p3PrM,762
98
- TB2J/spinham/hamiltonian.py,sha256=x7ACIdZhblGMStsENk8lpqYGnT2YeIZEN2ikjC1H5Uk,16597
99
- TB2J/spinham/hamiltonian_terms.py,sha256=7e84tfEjvAfZltUkrSWi1sUEiW_itLKy83lxi5iBpcQ,9714
100
+ TB2J/spinham/hamiltonian.py,sha256=pYP8Fbn5k3oIq-amLmWh8FoFNozKrgrbOvKuaIh-bqI,22093
101
+ TB2J/spinham/hamiltonian_terms.py,sha256=OVFiedRDzqWSBjUbvKWipNzqiFeyP1mKM7qnN8RPPc8,10975
100
102
  TB2J/spinham/plot.py,sha256=tLLNqFAATVrP1kmSVLPKzn686i-CUyqu4qgOcs-okHI,6599
101
103
  TB2J/spinham/qsolver.py,sha256=Sr9I3aGfVNYn5wzwPx1QonHe6ZZUXBAujWRa7nTA5u4,4986
102
104
  TB2J/spinham/spin_api.py,sha256=oN3AKg1WQl0YzR4f5ealcJOaVoAy8d7HodIwrbXvQeY,2219
103
- TB2J/spinham/spin_xml.py,sha256=mneeZzkCE5andvIlur_6VK3XzWvoL-PVqSoWKXtDYTM,11033
105
+ TB2J/spinham/spin_xml.py,sha256=BEIuXWddOq-EDwlJypiHNUIznBoFujqENisIr2FOZJE,12346
104
106
  TB2J/spinham/supercell.py,sha256=y17uUC6r3gQb278FhxIW4CABihfLTvKFj6flyXrCPR8,12217
107
+ TB2J/tests/test_cli_remove_sublattice.py,sha256=R6IKrgDi1iilPg4horb9thSgTSayraTA5Q6rhr4g-RA,963
108
+ TB2J/tests/test_cli_toggle_exchange.py,sha256=oL9jaYS-Qb2lUgGc5jqk9FmPGofAejiyZ0Cp1aPet0o,1592
105
109
  TB2J/wannier/__init__.py,sha256=7ojCbM84PYv1X1Tbo4NHI-d3gWmQsZB_xiYqbfxVV1E,80
106
110
  TB2J/wannier/w90_parser.py,sha256=dbd63LuKyv2DVUzqRINGsbDzEsOxsQyE8_Ear_LQIRg,4620
107
111
  TB2J/wannier/w90_tb_parser.py,sha256=XPh0PNgX_fKYQodDOzZj6DKsvgULMQERU8Kjh4U2xZY,4563
108
- tb2j-0.9.12.9.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
109
- tb2j-0.9.12.9.dist-info/METADATA,sha256=tVp4UlKVBNmZvZqesVfszIWCdhWZafhu8Mdw8PbtEdY,4167
110
- tb2j-0.9.12.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
111
- tb2j-0.9.12.9.dist-info/entry_points.txt,sha256=QlTwH3gCmaKBW48nr0FwGTd5LTThTiemw_36u7e1B7o,770
112
- tb2j-0.9.12.9.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
113
- tb2j-0.9.12.9.dist-info/RECORD,,
112
+ tb2j-0.9.12.22.dist-info/licenses/LICENSE,sha256=CbZI-jyRTjiqIcWa244cRSHJdjjtUNqGR4HeJkgEwJw,1332
113
+ tb2j-0.9.12.22.dist-info/METADATA,sha256=k1qU2PLNeSznexKr0d1BzgKs2u5pOZ4XjJkuBZoDIew,4338
114
+ tb2j-0.9.12.22.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
115
+ tb2j-0.9.12.22.dist-info/entry_points.txt,sha256=MkVo66rLBjbfup6lQoEepI525v50Wojkz2_rMQpUL7Y,874
116
+ tb2j-0.9.12.22.dist-info/top_level.txt,sha256=whYa5ByLYhl5XnTPBHSWr-IGD6VWmr5Ql2bye2qwV_s,5
117
+ tb2j-0.9.12.22.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +1,11 @@
1
1
  [console_scripts]
2
2
  TB2J_downfold.py = TB2J.scripts.TB2J_downfold:main
3
+ TB2J_edit.py = TB2J.scripts.TB2J_edit:main
3
4
  TB2J_eigen.py = TB2J.scripts.TB2J_eigen:write_eigen_info
4
5
  TB2J_magnon.py = TB2J.scripts.TB2J_magnon:plot_magnon
5
6
  TB2J_magnon_dos.py = TB2J.plot:command_line_plot_magnon_dos
6
7
  TB2J_merge.py = TB2J.scripts.TB2J_merge:main
8
+ TB2J_plot_exchange.py = TB2J.scripts.TB2J_plot_exchange:main
7
9
  TB2J_plot_magnon_bands.py = TB2J.magnon.magnon3:plot_magnon_bands_cli
8
10
  TB2J_plot_magnon_dos.py = TB2J.magnon.plot_magnon_dos_cli:main
9
11
  TB2J_rotate.py = TB2J.scripts.TB2J_rotate:main