TB2J 0.9.9.16__tar.gz → 0.9.10.2__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.
- tb2j-0.9.10.2/PKG-INFO +91 -0
- tb2j-0.9.10.2/TB2J/downfold/Hdownfolder.py +233 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_exchange.py +3 -3
- tb2j-0.9.10.2/TB2J.egg-info/PKG-INFO +91 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J.egg-info/SOURCES.txt +2 -1
- tb2j-0.9.10.2/TB2J.egg-info/entry_points.txt +16 -0
- tb2j-0.9.10.2/pyproject.toml +125 -0
- tb2j-0.9.9.16/PKG-INFO +0 -49
- tb2j-0.9.9.16/TB2J.egg-info/PKG-INFO +0 -49
- tb2j-0.9.9.16/TB2J.egg-info/entry_points.txt +0 -4
- tb2j-0.9.9.16/setup.py +0 -67
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/LICENSE +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/README.md +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/Jdownfolder.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/Jtensor.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/MAE.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/MAEGreen.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/Oiju.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/Oiju_epc.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/anisotropy.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/basis.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/citation.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/contour.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/density_matrix.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/epc.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/exchange.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/exchangeCL2.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/exchange_params.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/exchange_pert.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/exchange_qspace.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/external/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/external/p_tqdm.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/gpaw_wrapper.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/green.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/greentest.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/abacus_api.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/abacus_wrapper.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/gen_exchange_abacus.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/orbital_api.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/stru_api.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/test_density_matrix.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/test_read_HRSR.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/abacus/test_read_stru.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/gpaw_interface.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/lawaf_interface.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/manager.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/siesta_interface.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/interfaces/wannier90_interface.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_multibinit.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_tomsasd.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_txt.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_uppasd.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_exchange/io_vampire.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/io_merge.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/kpoints.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/io_exchange2.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/magnon3.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/magnon_band.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/magnon_dos.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/magnon_io.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/magnon_math.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/plot.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/plot_magnon_dos_cli.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/magnon/structure.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/auto_kpath.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/fermi.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/fibonacci_sphere.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/kR_convert.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/lowdin.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mathutils/rotate_spin.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/myTB.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/mycfr.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/orbital_magmom.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/orbmap.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/pauli.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/pert.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/plot.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/rotate_atoms.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/rotate_siestaDM.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/sisl_wrapper.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/base_parser.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/constants.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/hamiltonian.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/hamiltonian_terms.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/plot.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/qsolver.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/spin_api.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/spin_xml.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/spinham/supercell.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/symmetrize_J.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/tensor_rotate.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/thetaphi.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/utest.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/utils.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/versioninfo.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/wannier/__init__.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/wannier/w90_parser.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J/wannier/w90_tb_parser.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J.egg-info/dependency_links.txt +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J.egg-info/requires.txt +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/TB2J.egg-info/top_level.txt +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_downfold.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_eigen.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_magnon.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_magnon2.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_magnon_dos.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_merge.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_plot_magnon_bands.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_rotate.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/TB2J_rotateDM.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/abacus2J.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/siesta2J.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/scripts/wann2J.py +0 -0
- {tb2j-0.9.9.16 → tb2j-0.9.10.2}/setup.cfg +0 -0
tb2j-0.9.10.2/PKG-INFO
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: TB2J
|
3
|
+
Version: 0.9.10.2
|
4
|
+
Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
|
5
|
+
Author-email: Xu He <mailhexu@gmail.com>
|
6
|
+
Maintainer-email: Xu He <mailhexu@gmail.com>
|
7
|
+
License: BSD-2-Clause
|
8
|
+
Project-URL: Homepage, https://github.com/mailhexu/TB2J
|
9
|
+
Project-URL: Documentation, https://tb2j.readthedocs.io/en/latest/
|
10
|
+
Project-URL: Repository, https://github.com/mailhexu/TB2J
|
11
|
+
Project-URL: Issues, https://github.com/mailhexu/TB2J/issues
|
12
|
+
Keywords: magnetism,DFT,Heisenberg,exchange,physics
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
15
|
+
Classifier: Programming Language :: Python :: 3.6
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
21
|
+
Classifier: Operating System :: OS Independent
|
22
|
+
Classifier: Intended Audience :: Science/Research
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
25
|
+
Classifier: License :: OSI Approved :: BSD License
|
26
|
+
Requires-Python: >=3.6
|
27
|
+
Description-Content-Type: text/markdown
|
28
|
+
License-File: LICENSE
|
29
|
+
Requires-Dist: numpy<2.0
|
30
|
+
Requires-Dist: scipy
|
31
|
+
Requires-Dist: matplotlib
|
32
|
+
Requires-Dist: ase>=3.19
|
33
|
+
Requires-Dist: tqdm
|
34
|
+
Requires-Dist: pathos
|
35
|
+
Requires-Dist: packaging>=20.0
|
36
|
+
Requires-Dist: HamiltonIO>=0.2.4
|
37
|
+
Requires-Dist: pre-commit
|
38
|
+
Requires-Dist: sympair>0.1.0
|
39
|
+
Requires-Dist: tomli>=2.0.0
|
40
|
+
Requires-Dist: tomli-w>=1.0.0
|
41
|
+
Provides-Extra: siesta
|
42
|
+
Requires-Dist: sisl>=0.9.0; extra == "siesta"
|
43
|
+
Requires-Dist: netcdf4; extra == "siesta"
|
44
|
+
Provides-Extra: lawaf
|
45
|
+
Requires-Dist: lawaf==0.2.3; extra == "lawaf"
|
46
|
+
Provides-Extra: all
|
47
|
+
Requires-Dist: sisl>=0.9.0; extra == "all"
|
48
|
+
Requires-Dist: netcdf4; extra == "all"
|
49
|
+
Requires-Dist: lawaf==0.2.3; extra == "all"
|
50
|
+
Dynamic: license-file
|
51
|
+
|
52
|
+
[](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml)
|
53
|
+
[](https://tb2j.readthedocs.io/en/latest/?badge=latest)
|
54
|
+
[](https://app.travis-ci.com/mailhexu/TB2J)
|
55
|
+
[](https://pepy.tech/project/tb2j)
|
56
|
+
|
57
|
+
## Description
|
58
|
+
|
59
|
+
TB2J is a open source python package for calculating the magnetic interaction parameters in Heisenberg models from DFT. It use the magnetic force theorem and take the local rigid spin rotation as a perturbation in the Green's function method.
|
60
|
+
|
61
|
+
The TB2J project is initialized in the PhyTheMa and Nanomat teams in the University of Liege.
|
62
|
+
|
63
|
+
The features include:
|
64
|
+
- Calculates parameters in Heisenberg model, including isotropic exchange, anisotropic exchange, Dyzanoshinskii-Moriya interaction.
|
65
|
+
- Can use the input from many DFT codes with Wannier90, e.g. Abinit, Quantum Espresso, Siesta, VASP, etc.
|
66
|
+
- Can use input from DFT codes with numerical orbitals from Siesta, OpenMX and ABACUS.
|
67
|
+
- Calculate magnon band structure from the Heisenberg Hamiltonian.
|
68
|
+
- Generate input for spin dynamics/Monte Carlo codes MULTIBINIT.
|
69
|
+
- Require only ground state DFT calculation.
|
70
|
+
- No need for supercells.
|
71
|
+
- Calculate magnetic interaction up to large distance.
|
72
|
+
- Minimal user input, which allows for a black-box like experience and automatic workflows.
|
73
|
+
- Versatile API on both the input (DFT Hamiltonian) and the output (Heisenberg model) sides.
|
74
|
+
|
75
|
+
For more information, see the documentation on
|
76
|
+
<https://tb2j.readthedocs.io/en/latest/>
|
77
|
+
|
78
|
+
## Dependencies
|
79
|
+
* python (tested for ver 3.6)
|
80
|
+
* numpy
|
81
|
+
* scipy
|
82
|
+
* ASE (atomic simulation environment)
|
83
|
+
* matplotlib (optional) if you want to plot magnon band structure directly.
|
84
|
+
* sisl (optional) for Siesta interface
|
85
|
+
|
86
|
+
## Installation
|
87
|
+
pip install TB2J
|
88
|
+
|
89
|
+
## Message:
|
90
|
+
- We welcome contributions. If you would like to add the interface to other codes, or extend the capability of TB2J, please contact us! <mailhexu_AT_gmail_DOT_com>
|
91
|
+
|
@@ -0,0 +1,233 @@
|
|
1
|
+
import numpy as np
|
2
|
+
|
3
|
+
from .io_exchange import ExchangeIO
|
4
|
+
from .io_exchange.structure import get_attribute_array
|
5
|
+
from .kpoints import monkhorst_pack
|
6
|
+
from .mathutils import get_rotation_arrays
|
7
|
+
|
8
|
+
|
9
|
+
def combine_arrays(u, v):
|
10
|
+
return np.concatenate(
|
11
|
+
[u * v, np.roll(u, -1, axis=-1) * v, np.roll(v, -1, axis=-1) * u], axis=-1
|
12
|
+
)
|
13
|
+
|
14
|
+
|
15
|
+
class ExchangeDownfolder(ExchangeIO):
|
16
|
+
def __init__(self, **kwargs):
|
17
|
+
reference_axes = kwargs.pop("reference_axes", None)
|
18
|
+
kwargs["kmesh"] = kwargs.pop("kmesh", [7, 7, 7])
|
19
|
+
super().__init__(**kwargs)
|
20
|
+
self._old_values = None
|
21
|
+
|
22
|
+
if reference_axes is None:
|
23
|
+
reference_axes = np.zeros((6, 3))
|
24
|
+
reference_axes[:3] = np.eye(3)
|
25
|
+
reference_axes[3:] = np.array(
|
26
|
+
[[0.0, 1.0, 1.0], [1.0, 0.0, 1.0], [1.0, 1.0, 0.0]]
|
27
|
+
) / np.sqrt(2)
|
28
|
+
self.reference_axes = reference_axes
|
29
|
+
|
30
|
+
@property
|
31
|
+
def reference_axes(self):
|
32
|
+
return self._axes
|
33
|
+
|
34
|
+
@reference_axes.setter
|
35
|
+
def reference_axes(self, values):
|
36
|
+
axes = get_attribute_array(values, "reference_axes")
|
37
|
+
if axes.ndim != 2 or axes.shape[-1] != 3:
|
38
|
+
raise ValueError("The reference axes must be an array of shape (n, 3)")
|
39
|
+
self._axes = axes
|
40
|
+
|
41
|
+
@property
|
42
|
+
def kpoints(self):
|
43
|
+
return self._kpoints
|
44
|
+
|
45
|
+
@ExchangeIO.kmesh.setter
|
46
|
+
def kmesh(self, value):
|
47
|
+
ExchangeIO.kmesh.fset(self, value)
|
48
|
+
self._kpoints = monkhorst_pack(self._kmesh)
|
49
|
+
|
50
|
+
def set_downfolded_magnetic_sites(self, metals):
|
51
|
+
# vectors = self.vectors
|
52
|
+
old_pairs = self.interacting_pairs
|
53
|
+
self._old_magnetic_elements = self.magnetic_elements
|
54
|
+
|
55
|
+
self.magnetic_elements = metals
|
56
|
+
indices = [old_pairs.index(pair) for pair in self.interacting_pairs]
|
57
|
+
self._old_values = self._exchange_values.copy()
|
58
|
+
self.set_vectors(values=self.vectors[indices])
|
59
|
+
|
60
|
+
def _generate_u_matrix(self):
|
61
|
+
"""
|
62
|
+
Constructs the matrix with the coefficients that relate the exchange tensor J_{ij} to the matrix A_{ij}.
|
63
|
+
These coefficients only depend on the vectors u_i which depend on the orientations of the magnetic moments.
|
64
|
+
|
65
|
+
"""
|
66
|
+
i, j = self.i, self.j
|
67
|
+
if self.collinear:
|
68
|
+
flat_magmoms = self.magmoms[self._index_spin]
|
69
|
+
magmoms = np.zeros((flat_magmoms.shape[0], 3))
|
70
|
+
magmoms[:, 2] = flat_magmoms
|
71
|
+
else:
|
72
|
+
magmoms = self.magmoms[self._index_spin]
|
73
|
+
magmoms /= np.linalg.norm(magmoms, axis=-1)[:, None]
|
74
|
+
|
75
|
+
U, _ = zip(
|
76
|
+
*[get_rotation_arrays(magmoms, u=u[None, :]) for u in self.reference_axes]
|
77
|
+
)
|
78
|
+
U = np.stack(U).swapaxes(0, 1)
|
79
|
+
|
80
|
+
u1 = combine_arrays(U[i], U[j].conj())
|
81
|
+
ur = combine_arrays(U[i], U[j])
|
82
|
+
ui = combine_arrays(U[i].conj(), U[j].conj())
|
83
|
+
u2 = combine_arrays(U[i].conj(), U[j])
|
84
|
+
u = np.concatenate([u1, ur, ui, u2], axis=1)
|
85
|
+
|
86
|
+
self.u_matrix = u
|
87
|
+
|
88
|
+
def _compute_AB_coefficients(self, Hk):
|
89
|
+
"""
|
90
|
+
Computes the coefficients corresponding to A_{ij}(d), B_{ij}(d) from the dynamical matrix h(k). They are
|
91
|
+
required to reconstruct the exchange tensor J_{ij}(d).
|
92
|
+
These 18 coefficients are stored in an array with the shape (npairs, 18, nvectors)
|
93
|
+
|
94
|
+
"""
|
95
|
+
i, j = self.i, self.j
|
96
|
+
n = i.max() + 1
|
97
|
+
|
98
|
+
ABk = Hk[:, :, [i, i, i + n, i + n], [j, j + n, j, j + n]]
|
99
|
+
ABk = np.moveaxis(ABk, [2, 3], [1, 0]).reshape(len(i), 24, -1)
|
100
|
+
|
101
|
+
exp_summand = np.exp(2j * np.pi * self.vectors @ self.kpoints.T)
|
102
|
+
AB = np.einsum("nik,ndk->nid", ABk[..., ::-1], exp_summand) / len(self.kpoints)
|
103
|
+
|
104
|
+
self.AB_coefficients = AB
|
105
|
+
|
106
|
+
def compute_exchange_tensor(self, Hk):
|
107
|
+
"""
|
108
|
+
Computes the exchange tensor that best fits the dynamical matrix Hk
|
109
|
+
|
110
|
+
Parameters
|
111
|
+
----------
|
112
|
+
Hk : ndarray
|
113
|
+
Dynamical matrix corresponding to the points on a k-grid, constructed for different reference axes.
|
114
|
+
It has the shape (naxes, nkpoints, 2*natoms, 2*natoms)
|
115
|
+
|
116
|
+
Returns
|
117
|
+
-------
|
118
|
+
output : ndarray
|
119
|
+
An exchange tensor with shape (npairs, ninteractions, 3, 3)
|
120
|
+
"""
|
121
|
+
n = Hk.shape[-1] // 2
|
122
|
+
# diag = np.diag_indices(n)
|
123
|
+
self.i, self.j = np.triu_indices(n)
|
124
|
+
|
125
|
+
self._generate_u_matrix()
|
126
|
+
self._compute_AB_coefficients(Hk)
|
127
|
+
|
128
|
+
ii = np.where(self.i == self.j)
|
129
|
+
i0 = np.where((self.vectors == 0).all(axis=-1))
|
130
|
+
J = np.stack(
|
131
|
+
[
|
132
|
+
np.linalg.lstsq(mat, coeffs, rcond=None)[0]
|
133
|
+
for mat, coeffs in zip(self.u_matrix, self.AB_coefficients)
|
134
|
+
]
|
135
|
+
).swapaxes(1, 2)
|
136
|
+
J = J[:, :, [0, 6, 5, 3, 1, 7, 8, 4, 2]].reshape(len(self.i), -1, 3, 3)
|
137
|
+
J *= -1
|
138
|
+
J[ii] *= 2
|
139
|
+
J[i0] *= 0
|
140
|
+
|
141
|
+
del self.i, self.j, self.u_matrix, self.AB_coefficients
|
142
|
+
|
143
|
+
return J
|
144
|
+
|
145
|
+
def set_exchange_tensor(self, J):
|
146
|
+
idig = np.diag_indices(3)
|
147
|
+
Jiso = J[:, :, *idig].mean(axis=-1)
|
148
|
+
|
149
|
+
idmi = ([1, 2, 0], [2, 0, 1])
|
150
|
+
DMI = (J - J.swapaxes(-1, -2)) / 2
|
151
|
+
|
152
|
+
Jani = (J + J.swapaxes(-1, -2)) / 2
|
153
|
+
Jani[:, :, *idig] -= Jiso[:, :, None]
|
154
|
+
|
155
|
+
self._exchange_values[:, :, 3] = Jiso
|
156
|
+
if not self.collinear:
|
157
|
+
self._exchange_values[:, :, 6:9] = DMI[:, :, *idmi]
|
158
|
+
self._exchange_values[:, :, 9:] = Jani.reshape(Jani.shape[:2] + (9,))
|
159
|
+
|
160
|
+
@staticmethod
|
161
|
+
def downfold_matrix(matrix, basis):
|
162
|
+
eigvals, eigvecs = np.linalg.eigh(matrix)
|
163
|
+
A = np.einsum("...ki,...kj->...ij", eigvecs.conj(), basis)
|
164
|
+
W, _, Vh = np.linalg.svd(A, full_matrices=False)
|
165
|
+
U = np.einsum("...ik,...kj->...ij", W, Vh)
|
166
|
+
downfolded_matrix = np.einsum(
|
167
|
+
"...ki,...kj->...ij", U.conj(), eigvals[..., None] * U
|
168
|
+
)
|
169
|
+
|
170
|
+
return downfolded_matrix
|
171
|
+
|
172
|
+
@staticmethod
|
173
|
+
def lowdin_partition(matrix, indices):
|
174
|
+
N = matrix.shape[-1] // 2
|
175
|
+
null_indices = np.array([i for i in range(N) if i not in indices])
|
176
|
+
diag_indices = np.diag_indices(2 * null_indices.size)
|
177
|
+
|
178
|
+
idx = np.concatenate([indices, indices + N])[None, :]
|
179
|
+
jdx = np.concatenate([null_indices, null_indices + N])[None, :]
|
180
|
+
|
181
|
+
Hii = matrix[..., idx.T, idx]
|
182
|
+
Hij = matrix[..., idx.T, jdx]
|
183
|
+
Hji = matrix[..., jdx.T, idx]
|
184
|
+
Hjj = matrix[..., jdx.T, jdx]
|
185
|
+
|
186
|
+
eigvals = np.linalg.eigvalsh(matrix)
|
187
|
+
Hjj[..., *diag_indices] -= eigvals.min()
|
188
|
+
correction = np.einsum("...ij,...jk,...kl->...il", Hij, np.linalg.inv(Hjj), Hji)
|
189
|
+
|
190
|
+
return Hii - correction
|
191
|
+
|
192
|
+
def downfold(self, metals, **params):
|
193
|
+
try:
|
194
|
+
metals = metals.split()
|
195
|
+
except AttributeError:
|
196
|
+
try:
|
197
|
+
metals = list(metals)
|
198
|
+
except (ValueError, TypeError):
|
199
|
+
raise TypeError("argument must be a list of element symbols.")
|
200
|
+
|
201
|
+
if any(metal not in self.magnetic_elements for metal in metals):
|
202
|
+
wrong_symbols = [
|
203
|
+
metal for metal in metals if metal not in self.magnetic_elements
|
204
|
+
]
|
205
|
+
raise ValueError(
|
206
|
+
f"The metal symbols '{wrong_symbols}' are not magnetic elements."
|
207
|
+
)
|
208
|
+
else:
|
209
|
+
magnetic_sites = [
|
210
|
+
symbol for symbol in self.elements if symbol in self.magnetic_elements
|
211
|
+
]
|
212
|
+
# nsites = len(magnetic_sites)
|
213
|
+
metal_indices = np.array(
|
214
|
+
[i for i, element in enumerate(magnetic_sites) if element in metals]
|
215
|
+
)
|
216
|
+
|
217
|
+
Hq = np.stack(
|
218
|
+
[self.Hq(self.kpoints, u=u[None, :]) for u in self.reference_axes]
|
219
|
+
)
|
220
|
+
downfolded_Hq = self.lowdin_partition(Hq, metal_indices)
|
221
|
+
|
222
|
+
self.set_downfolded_magnetic_sites(metals)
|
223
|
+
J = self.compute_exchange_tensor(downfolded_Hq)
|
224
|
+
self.set_exchange_tensor(J.real)
|
225
|
+
|
226
|
+
return J
|
227
|
+
|
228
|
+
def reset(self):
|
229
|
+
if self.old_values is not None:
|
230
|
+
self.magnetic_elements = self._old_magnetic_elements
|
231
|
+
self._exchange_values = self._old_values
|
232
|
+
self.old_values = None
|
233
|
+
self.old_magnetic_elements = None
|
@@ -541,7 +541,7 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
541
541
|
Js.append(val * 1e3)
|
542
542
|
ax.scatter(ds, Js, marker=marker, color=color, **kwargs)
|
543
543
|
ax.axhline(color="gray")
|
544
|
-
ax.set_xlabel("Distance ($\AA$)")
|
544
|
+
ax.set_xlabel(r"Distance ($\AA$)")
|
545
545
|
ax.set_ylabel("J (meV)")
|
546
546
|
if fname is not None:
|
547
547
|
plt.savefig(fname)
|
@@ -569,7 +569,7 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
569
569
|
ax.axhline(color="gray")
|
570
570
|
ax.legend(loc=1)
|
571
571
|
ax.set_ylabel("D (meV)")
|
572
|
-
ax.set_xlabel("Distance ($\AA$)")
|
572
|
+
ax.set_xlabel(r"Distance ($\AA$)")
|
573
573
|
if fname is not None:
|
574
574
|
plt.savefig(fname)
|
575
575
|
if show:
|
@@ -601,7 +601,7 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
601
601
|
)
|
602
602
|
ax.axhline(color="gray")
|
603
603
|
ax.legend(loc=1, ncol=2)
|
604
|
-
ax.set_xlabel("Distance ($\AA$)")
|
604
|
+
ax.set_xlabel(r"Distance ($\AA$)")
|
605
605
|
ax.set_ylabel("Jani (meV)")
|
606
606
|
if fname is not None:
|
607
607
|
plt.savefig(fname)
|
@@ -0,0 +1,91 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: TB2J
|
3
|
+
Version: 0.9.10.2
|
4
|
+
Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
|
5
|
+
Author-email: Xu He <mailhexu@gmail.com>
|
6
|
+
Maintainer-email: Xu He <mailhexu@gmail.com>
|
7
|
+
License: BSD-2-Clause
|
8
|
+
Project-URL: Homepage, https://github.com/mailhexu/TB2J
|
9
|
+
Project-URL: Documentation, https://tb2j.readthedocs.io/en/latest/
|
10
|
+
Project-URL: Repository, https://github.com/mailhexu/TB2J
|
11
|
+
Project-URL: Issues, https://github.com/mailhexu/TB2J/issues
|
12
|
+
Keywords: magnetism,DFT,Heisenberg,exchange,physics
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
15
|
+
Classifier: Programming Language :: Python :: 3.6
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
21
|
+
Classifier: Operating System :: OS Independent
|
22
|
+
Classifier: Intended Audience :: Science/Research
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
25
|
+
Classifier: License :: OSI Approved :: BSD License
|
26
|
+
Requires-Python: >=3.6
|
27
|
+
Description-Content-Type: text/markdown
|
28
|
+
License-File: LICENSE
|
29
|
+
Requires-Dist: numpy<2.0
|
30
|
+
Requires-Dist: scipy
|
31
|
+
Requires-Dist: matplotlib
|
32
|
+
Requires-Dist: ase>=3.19
|
33
|
+
Requires-Dist: tqdm
|
34
|
+
Requires-Dist: pathos
|
35
|
+
Requires-Dist: packaging>=20.0
|
36
|
+
Requires-Dist: HamiltonIO>=0.2.4
|
37
|
+
Requires-Dist: pre-commit
|
38
|
+
Requires-Dist: sympair>0.1.0
|
39
|
+
Requires-Dist: tomli>=2.0.0
|
40
|
+
Requires-Dist: tomli-w>=1.0.0
|
41
|
+
Provides-Extra: siesta
|
42
|
+
Requires-Dist: sisl>=0.9.0; extra == "siesta"
|
43
|
+
Requires-Dist: netcdf4; extra == "siesta"
|
44
|
+
Provides-Extra: lawaf
|
45
|
+
Requires-Dist: lawaf==0.2.3; extra == "lawaf"
|
46
|
+
Provides-Extra: all
|
47
|
+
Requires-Dist: sisl>=0.9.0; extra == "all"
|
48
|
+
Requires-Dist: netcdf4; extra == "all"
|
49
|
+
Requires-Dist: lawaf==0.2.3; extra == "all"
|
50
|
+
Dynamic: license-file
|
51
|
+
|
52
|
+
[](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml)
|
53
|
+
[](https://tb2j.readthedocs.io/en/latest/?badge=latest)
|
54
|
+
[](https://app.travis-ci.com/mailhexu/TB2J)
|
55
|
+
[](https://pepy.tech/project/tb2j)
|
56
|
+
|
57
|
+
## Description
|
58
|
+
|
59
|
+
TB2J is a open source python package for calculating the magnetic interaction parameters in Heisenberg models from DFT. It use the magnetic force theorem and take the local rigid spin rotation as a perturbation in the Green's function method.
|
60
|
+
|
61
|
+
The TB2J project is initialized in the PhyTheMa and Nanomat teams in the University of Liege.
|
62
|
+
|
63
|
+
The features include:
|
64
|
+
- Calculates parameters in Heisenberg model, including isotropic exchange, anisotropic exchange, Dyzanoshinskii-Moriya interaction.
|
65
|
+
- Can use the input from many DFT codes with Wannier90, e.g. Abinit, Quantum Espresso, Siesta, VASP, etc.
|
66
|
+
- Can use input from DFT codes with numerical orbitals from Siesta, OpenMX and ABACUS.
|
67
|
+
- Calculate magnon band structure from the Heisenberg Hamiltonian.
|
68
|
+
- Generate input for spin dynamics/Monte Carlo codes MULTIBINIT.
|
69
|
+
- Require only ground state DFT calculation.
|
70
|
+
- No need for supercells.
|
71
|
+
- Calculate magnetic interaction up to large distance.
|
72
|
+
- Minimal user input, which allows for a black-box like experience and automatic workflows.
|
73
|
+
- Versatile API on both the input (DFT Hamiltonian) and the output (Heisenberg model) sides.
|
74
|
+
|
75
|
+
For more information, see the documentation on
|
76
|
+
<https://tb2j.readthedocs.io/en/latest/>
|
77
|
+
|
78
|
+
## Dependencies
|
79
|
+
* python (tested for ver 3.6)
|
80
|
+
* numpy
|
81
|
+
* scipy
|
82
|
+
* ASE (atomic simulation environment)
|
83
|
+
* matplotlib (optional) if you want to plot magnon band structure directly.
|
84
|
+
* sisl (optional) for Siesta interface
|
85
|
+
|
86
|
+
## Installation
|
87
|
+
pip install TB2J
|
88
|
+
|
89
|
+
## Message:
|
90
|
+
- We welcome contributions. If you would like to add the interface to other codes, or extend the capability of TB2J, please contact us! <mailhexu_AT_gmail_DOT_com>
|
91
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
LICENSE
|
2
2
|
README.md
|
3
|
-
|
3
|
+
pyproject.toml
|
4
4
|
TB2J/Jdownfolder.py
|
5
5
|
TB2J/Jtensor.py
|
6
6
|
TB2J/MAE.py
|
@@ -46,6 +46,7 @@ TB2J.egg-info/dependency_links.txt
|
|
46
46
|
TB2J.egg-info/entry_points.txt
|
47
47
|
TB2J.egg-info/requires.txt
|
48
48
|
TB2J.egg-info/top_level.txt
|
49
|
+
TB2J/downfold/Hdownfolder.py
|
49
50
|
TB2J/external/__init__.py
|
50
51
|
TB2J/external/p_tqdm.py
|
51
52
|
TB2J/interfaces/__init__.py
|
@@ -0,0 +1,16 @@
|
|
1
|
+
[console_scripts]
|
2
|
+
TB2J_downfold.py = scripts.TB2J_downfold:main
|
3
|
+
TB2J_eigen.py = scripts.TB2J_eigen:main
|
4
|
+
TB2J_magnon.py = scripts.TB2J_magnon:main
|
5
|
+
TB2J_magnon2.py = scripts.TB2J_magnon2:main
|
6
|
+
TB2J_magnon_dos.py = scripts.TB2J_magnon_dos:main
|
7
|
+
TB2J_merge.py = scripts.TB2J_merge:main
|
8
|
+
TB2J_plot_magnon_bands.py = scripts.TB2J_plot_magnon_bands:main
|
9
|
+
TB2J_plot_magnon_dos.py = TB2J.magnon.plot_magnon_dos_cli:main
|
10
|
+
TB2J_rotate.py = scripts.TB2J_rotate:main
|
11
|
+
TB2J_rotateDM.py = scripts.TB2J_rotateDM:main
|
12
|
+
TB2J_symmetrize.py = TB2J.symmetrize_J:symmetrize_J_cli
|
13
|
+
abacus2J.py = scripts.abacus2J:run_abacus2J
|
14
|
+
lawaf2J.py = TB2J.interfaces.lawaf_interface:lawaf2J_cli
|
15
|
+
siesta2J.py = scripts.siesta2J:run_siesta2J
|
16
|
+
wann2J.py = scripts.wann2J:run_wann2J
|
@@ -0,0 +1,125 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "TB2J"
|
7
|
+
version = "0.9.10.2"
|
8
|
+
description = "TB2J: First principle to Heisenberg exchange J using tight-binding Green function method"
|
9
|
+
readme = "README.md"
|
10
|
+
license = { text = "BSD-2-Clause" }
|
11
|
+
authors = [{ name = "Xu He", email = "mailhexu@gmail.com" }]
|
12
|
+
maintainers = [{ name = "Xu He", email = "mailhexu@gmail.com" }]
|
13
|
+
keywords = ["magnetism", "DFT", "Heisenberg", "exchange", "physics"]
|
14
|
+
classifiers = [
|
15
|
+
"Development Status :: 3 - Alpha",
|
16
|
+
"Programming Language :: Python :: 3",
|
17
|
+
"Programming Language :: Python :: 3.6",
|
18
|
+
"Programming Language :: Python :: 3.7",
|
19
|
+
"Programming Language :: Python :: 3.8",
|
20
|
+
"Programming Language :: Python :: 3.9",
|
21
|
+
"Programming Language :: Python :: 3.10",
|
22
|
+
"Programming Language :: Python :: 3.11",
|
23
|
+
"Operating System :: OS Independent",
|
24
|
+
"Intended Audience :: Science/Research",
|
25
|
+
"Topic :: Scientific/Engineering :: Chemistry",
|
26
|
+
"Topic :: Scientific/Engineering :: Physics",
|
27
|
+
"License :: OSI Approved :: BSD License",
|
28
|
+
]
|
29
|
+
requires-python = ">=3.6"
|
30
|
+
dependencies = [
|
31
|
+
"numpy<2.0",
|
32
|
+
"scipy",
|
33
|
+
"matplotlib",
|
34
|
+
"ase>=3.19",
|
35
|
+
"tqdm",
|
36
|
+
"pathos",
|
37
|
+
"packaging>=20.0",
|
38
|
+
"HamiltonIO>=0.2.4",
|
39
|
+
"pre-commit",
|
40
|
+
"sympair>0.1.0",
|
41
|
+
"tomli>=2.0.0",
|
42
|
+
"tomli-w>=1.0.0",
|
43
|
+
]
|
44
|
+
|
45
|
+
[project.optional-dependencies]
|
46
|
+
siesta = ["sisl>=0.9.0", "netcdf4"]
|
47
|
+
lawaf = ["lawaf==0.2.3"]
|
48
|
+
all = ["sisl>=0.9.0", "netcdf4", "lawaf==0.2.3"]
|
49
|
+
|
50
|
+
[project.urls]
|
51
|
+
Homepage = "https://github.com/mailhexu/TB2J"
|
52
|
+
Documentation = "https://tb2j.readthedocs.io/en/latest/"
|
53
|
+
Repository = "https://github.com/mailhexu/TB2J"
|
54
|
+
Issues = "https://github.com/mailhexu/TB2J/issues"
|
55
|
+
|
56
|
+
[project.scripts]
|
57
|
+
"wann2J.py" = "scripts.wann2J:run_wann2J"
|
58
|
+
"siesta2J.py" = "scripts.siesta2J:run_siesta2J"
|
59
|
+
"abacus2J.py" = "scripts.abacus2J:run_abacus2J"
|
60
|
+
"TB2J_rotate.py" = "scripts.TB2J_rotate:main"
|
61
|
+
"TB2J_rotateDM.py" = "scripts.TB2J_rotateDM:main"
|
62
|
+
"TB2J_merge.py" = "scripts.TB2J_merge:main"
|
63
|
+
"TB2J_magnon.py" = "scripts.TB2J_magnon:main"
|
64
|
+
"TB2J_magnon2.py" = "scripts.TB2J_magnon2:main"
|
65
|
+
"TB2J_magnon_dos.py" = "scripts.TB2J_magnon_dos:main"
|
66
|
+
"TB2J_downfold.py" = "scripts.TB2J_downfold:main"
|
67
|
+
"TB2J_eigen.py" = "scripts.TB2J_eigen:main"
|
68
|
+
"TB2J_plot_magnon_bands.py" = "scripts.TB2J_plot_magnon_bands:main"
|
69
|
+
"TB2J_symmetrize.py" = "TB2J.symmetrize_J:symmetrize_J_cli"
|
70
|
+
"lawaf2J.py" = "TB2J.interfaces.lawaf_interface:lawaf2J_cli"
|
71
|
+
"TB2J_plot_magnon_dos.py" = "TB2J.magnon.plot_magnon_dos_cli:main"
|
72
|
+
|
73
|
+
[tool.setuptools]
|
74
|
+
packages = ["TB2J"]
|
75
|
+
|
76
|
+
[tool.setuptools.package-data]
|
77
|
+
TB2J = ["**/*.py"]
|
78
|
+
|
79
|
+
[tool.ruff]
|
80
|
+
exclude = [
|
81
|
+
".bzr",
|
82
|
+
".direnv",
|
83
|
+
".eggs",
|
84
|
+
".git",
|
85
|
+
".git-rewrite",
|
86
|
+
".hg",
|
87
|
+
".ipynb_checkpoints",
|
88
|
+
".mypy_cache",
|
89
|
+
".nox",
|
90
|
+
".pants.d",
|
91
|
+
".pyenv",
|
92
|
+
".pytest_cache",
|
93
|
+
".pytype",
|
94
|
+
".ruff_cache",
|
95
|
+
".svn",
|
96
|
+
".tox",
|
97
|
+
".venv",
|
98
|
+
".vscode",
|
99
|
+
"__pypackages__",
|
100
|
+
"_build",
|
101
|
+
"buck-out",
|
102
|
+
"build",
|
103
|
+
"dist",
|
104
|
+
"node_modules",
|
105
|
+
"site-packages",
|
106
|
+
"venv",
|
107
|
+
]
|
108
|
+
line-length = 88
|
109
|
+
indent-width = 4
|
110
|
+
target-version = "py38"
|
111
|
+
|
112
|
+
[tool.ruff.lint]
|
113
|
+
select = ["E4", "E7", "E9", "F"]
|
114
|
+
ignore = ["E741"]
|
115
|
+
fixable = ["ALL"]
|
116
|
+
unfixable = []
|
117
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
118
|
+
|
119
|
+
[tool.ruff.format]
|
120
|
+
quote-style = "double"
|
121
|
+
indent-style = "space"
|
122
|
+
skip-magic-trailing-comma = false
|
123
|
+
line-ending = "auto"
|
124
|
+
docstring-code-format = false
|
125
|
+
docstring-code-line-length = "dynamic"
|
tb2j-0.9.9.16/PKG-INFO
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: TB2J
|
3
|
-
Version: 0.9.9.16
|
4
|
-
Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
|
5
|
-
Author: Xu He
|
6
|
-
Author-email: mailhexu@gmail.com
|
7
|
-
License: BSD-2-clause
|
8
|
-
Classifier: Development Status :: 3 - Alpha
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
10
|
-
Classifier: Operating System :: OS Independent
|
11
|
-
Classifier: Intended Audience :: Science/Research
|
12
|
-
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
13
|
-
Classifier: Topic :: Scientific/Engineering :: Physics
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
15
|
-
Requires-Python: >=3.6
|
16
|
-
License-File: LICENSE
|
17
|
-
Requires-Dist: numpy<2.0
|
18
|
-
Requires-Dist: scipy
|
19
|
-
Requires-Dist: matplotlib
|
20
|
-
Requires-Dist: ase>=3.19
|
21
|
-
Requires-Dist: tqdm
|
22
|
-
Requires-Dist: pathos
|
23
|
-
Requires-Dist: packaging>=20.0
|
24
|
-
Requires-Dist: HamiltonIO>=0.2.4
|
25
|
-
Requires-Dist: pre-commit
|
26
|
-
Requires-Dist: sympair>0.1.0
|
27
|
-
Requires-Dist: tomli>=2.0.0
|
28
|
-
Requires-Dist: tomli-w>=1.0.0
|
29
|
-
Provides-Extra: siesta
|
30
|
-
Requires-Dist: sisl>=0.9.0; extra == "siesta"
|
31
|
-
Requires-Dist: netcdf4; extra == "siesta"
|
32
|
-
Provides-Extra: lawaf
|
33
|
-
Requires-Dist: lawaf==0.2.3; extra == "lawaf"
|
34
|
-
Provides-Extra: all
|
35
|
-
Requires-Dist: sisl>=0.9.0; extra == "all"
|
36
|
-
Requires-Dist: netcdf4; extra == "all"
|
37
|
-
Requires-Dist: lawaf==0.2.3; extra == "all"
|
38
|
-
Dynamic: author
|
39
|
-
Dynamic: author-email
|
40
|
-
Dynamic: classifier
|
41
|
-
Dynamic: description
|
42
|
-
Dynamic: license
|
43
|
-
Dynamic: license-file
|
44
|
-
Dynamic: provides-extra
|
45
|
-
Dynamic: requires-dist
|
46
|
-
Dynamic: requires-python
|
47
|
-
Dynamic: summary
|
48
|
-
|
49
|
-
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.
|
@@ -1,49 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: TB2J
|
3
|
-
Version: 0.9.9.16
|
4
|
-
Summary: TB2J: First principle to Heisenberg exchange J using tight-binding Green function method
|
5
|
-
Author: Xu He
|
6
|
-
Author-email: mailhexu@gmail.com
|
7
|
-
License: BSD-2-clause
|
8
|
-
Classifier: Development Status :: 3 - Alpha
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
10
|
-
Classifier: Operating System :: OS Independent
|
11
|
-
Classifier: Intended Audience :: Science/Research
|
12
|
-
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
13
|
-
Classifier: Topic :: Scientific/Engineering :: Physics
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
15
|
-
Requires-Python: >=3.6
|
16
|
-
License-File: LICENSE
|
17
|
-
Requires-Dist: numpy<2.0
|
18
|
-
Requires-Dist: scipy
|
19
|
-
Requires-Dist: matplotlib
|
20
|
-
Requires-Dist: ase>=3.19
|
21
|
-
Requires-Dist: tqdm
|
22
|
-
Requires-Dist: pathos
|
23
|
-
Requires-Dist: packaging>=20.0
|
24
|
-
Requires-Dist: HamiltonIO>=0.2.4
|
25
|
-
Requires-Dist: pre-commit
|
26
|
-
Requires-Dist: sympair>0.1.0
|
27
|
-
Requires-Dist: tomli>=2.0.0
|
28
|
-
Requires-Dist: tomli-w>=1.0.0
|
29
|
-
Provides-Extra: siesta
|
30
|
-
Requires-Dist: sisl>=0.9.0; extra == "siesta"
|
31
|
-
Requires-Dist: netcdf4; extra == "siesta"
|
32
|
-
Provides-Extra: lawaf
|
33
|
-
Requires-Dist: lawaf==0.2.3; extra == "lawaf"
|
34
|
-
Provides-Extra: all
|
35
|
-
Requires-Dist: sisl>=0.9.0; extra == "all"
|
36
|
-
Requires-Dist: netcdf4; extra == "all"
|
37
|
-
Requires-Dist: lawaf==0.2.3; extra == "all"
|
38
|
-
Dynamic: author
|
39
|
-
Dynamic: author-email
|
40
|
-
Dynamic: classifier
|
41
|
-
Dynamic: description
|
42
|
-
Dynamic: license
|
43
|
-
Dynamic: license-file
|
44
|
-
Dynamic: provides-extra
|
45
|
-
Dynamic: requires-dist
|
46
|
-
Dynamic: requires-python
|
47
|
-
Dynamic: summary
|
48
|
-
|
49
|
-
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.
|
tb2j-0.9.9.16/setup.py
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
from setuptools import find_packages, setup
|
3
|
-
|
4
|
-
__version__ = "0.9.9.16"
|
5
|
-
|
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
|
-
|
8
|
-
setup(
|
9
|
-
name="TB2J",
|
10
|
-
version=__version__,
|
11
|
-
description="TB2J: First principle to Heisenberg exchange J using tight-binding Green function method",
|
12
|
-
long_description=long_description,
|
13
|
-
author="Xu He",
|
14
|
-
author_email="mailhexu@gmail.com",
|
15
|
-
license="BSD-2-clause",
|
16
|
-
packages=find_packages(),
|
17
|
-
scripts=[
|
18
|
-
"scripts/wann2J.py",
|
19
|
-
"scripts/siesta2J.py",
|
20
|
-
"scripts/abacus2J.py",
|
21
|
-
"scripts/TB2J_rotate.py",
|
22
|
-
"scripts/TB2J_rotateDM.py",
|
23
|
-
"scripts/TB2J_merge.py",
|
24
|
-
"scripts/TB2J_magnon.py",
|
25
|
-
"scripts/TB2J_magnon2.py",
|
26
|
-
"scripts/TB2J_magnon_dos.py",
|
27
|
-
"scripts/TB2J_downfold.py",
|
28
|
-
"scripts/TB2J_eigen.py",
|
29
|
-
"scripts/TB2J_plot_magnon_bands.py",
|
30
|
-
],
|
31
|
-
entry_points={
|
32
|
-
"console_scripts": [
|
33
|
-
"TB2J_symmetrize.py=TB2J.symmetrize_J:symmetrize_J_cli",
|
34
|
-
"lawaf2J.py=TB2J.interfaces.lawaf_interface:lawaf2J_cli",
|
35
|
-
"TB2J_plot_magnon_dos.py=TB2J.magnon.plot_magnon_dos_cli:main",
|
36
|
-
]
|
37
|
-
},
|
38
|
-
install_requires=[
|
39
|
-
"numpy<2.0",
|
40
|
-
"scipy",
|
41
|
-
"matplotlib",
|
42
|
-
"ase>=3.19",
|
43
|
-
"tqdm",
|
44
|
-
"pathos",
|
45
|
-
"packaging>=20.0",
|
46
|
-
"HamiltonIO>=0.2.4",
|
47
|
-
"pre-commit",
|
48
|
-
"sympair>0.1.0",
|
49
|
-
"tomli>=2.0.0",
|
50
|
-
"tomli-w>=1.0.0",
|
51
|
-
],
|
52
|
-
extras_require={
|
53
|
-
"siesta": ["sisl>=0.9.0", "netcdf4"],
|
54
|
-
"lawaf": ["lawaf==0.2.3"],
|
55
|
-
"all": ["sisl>=0.9.0", "netcdf4", "lawaf==0.2.3"],
|
56
|
-
},
|
57
|
-
classifiers=[
|
58
|
-
"Development Status :: 3 - Alpha",
|
59
|
-
"Programming Language :: Python :: 3",
|
60
|
-
"Operating System :: OS Independent",
|
61
|
-
"Intended Audience :: Science/Research",
|
62
|
-
"Topic :: Scientific/Engineering :: Chemistry",
|
63
|
-
"Topic :: Scientific/Engineering :: Physics",
|
64
|
-
"License :: OSI Approved :: BSD License",
|
65
|
-
],
|
66
|
-
python_requires=">=3.6",
|
67
|
-
)
|
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
|
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
|
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
|