[](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml)
[](https://tb2j.readthedocs.io/en/latest/?badge=latest)
[](https://app.travis-ci.com/mailhexu/TB2J)
[](https://pepy.tech/project/tb2j)
## Description
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.
The TB2J project is initialized in the PhyTheMa and Nanomat teams in the University of Liege.
The features include:
- Calculates parameters in Heisenberg model, including isotropic exchange, anisotropic exchange, Dyzanoshinskii-Moriya interaction.
- Can use the input from many DFT codes with Wannier90, e.g. Abinit, Quantum Espresso, Siesta, VASP, etc.
- Can use input from DFT codes with numerical orbitals from Siesta, OpenMX and ABACUS.
- Calculate magnon band structure from the Heisenberg Hamiltonian.
- Generate input for spin dynamics/Monte Carlo codes MULTIBINIT.
- Require only ground state DFT calculation.
- No need for supercells.
- Calculate magnetic interaction up to large distance.
- Minimal user input, which allows for a black-box like experience and automatic workflows.
- Versatile API on both the input (DFT Hamiltonian) and the output (Heisenberg model) sides.
For more information, see the documentation on
<https://tb2j.readthedocs.io/en/latest/>
## Dependencies
* python (tested for ver 3.6)
* numpy
* scipy
* ASE (atomic simulation environment)
* matplotlib (optional) if you want to plot magnon band structure directly.
* sisl (optional) for Siesta interface
## Installation
pip install TB2J
## Message:
- 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>
Raw data
{
"_id": null,
"home_page": null,
"name": "TB2J",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "Xu He <mailhexu@gmail.com>",
"keywords": "magnetism, DFT, Heisenberg, exchange, physics",
"author": null,
"author_email": "Xu He <mailhexu@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/15/e3/574aa230694ec517d66f4c839f8c0f9775dd666a6f02ae5879e583a1bd76/tb2j-0.9.12.7.tar.gz",
"platform": null,
"description": "[](https://github.com/mailhexu/TB2J/actions/workflows/python-app.yml)\n[](https://tb2j.readthedocs.io/en/latest/?badge=latest)\n[](https://app.travis-ci.com/mailhexu/TB2J)\n[](https://pepy.tech/project/tb2j)\n\n## Description\n\nTB2J 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. \n\nThe TB2J project is initialized in the PhyTheMa and Nanomat teams in the University of Liege.\n\nThe features include:\n - Calculates parameters in Heisenberg model, including isotropic exchange, anisotropic exchange, Dyzanoshinskii-Moriya interaction.\n - Can use the input from many DFT codes with Wannier90, e.g. Abinit, Quantum Espresso, Siesta, VASP, etc.\n - Can use input from DFT codes with numerical orbitals from Siesta, OpenMX and ABACUS.\n - Calculate magnon band structure from the Heisenberg Hamiltonian.\n - Generate input for spin dynamics/Monte Carlo codes MULTIBINIT.\n - Require only ground state DFT calculation.\n - No need for supercells.\n - Calculate magnetic interaction up to large distance. \n - Minimal user input, which allows for a black-box like experience and automatic workflows.\n - Versatile API on both the input (DFT Hamiltonian) and the output (Heisenberg model) sides.\n\nFor more information, see the documentation on\n <https://tb2j.readthedocs.io/en/latest/>\n\n## Dependencies\n* python (tested for ver 3.6)\n* numpy \n* scipy\n* ASE (atomic simulation environment) \n* matplotlib (optional) if you want to plot magnon band structure directly. \n* sisl (optional) for Siesta interface\n\n## Installation\npip install TB2J\n\n## Message:\n- 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>\n\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "TB2J: First principle to Heisenberg exchange J using tight-binding Green function method",
"version": "0.9.12.7",
"project_urls": {
"Documentation": "https://tb2j.readthedocs.io/en/latest/",
"Homepage": "https://github.com/mailhexu/TB2J",
"Issues": "https://github.com/mailhexu/TB2J/issues",
"Repository": "https://github.com/mailhexu/TB2J"
},
"split_keywords": [
"magnetism",
" dft",
" heisenberg",
" exchange",
" physics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "32b6e5396f57e193ff7a4fb5d9dbb64dfba1ec278d6cd538e87bbddf6014a87b",
"md5": "64aa1df99c47f31a2d6398f4e342eed2",
"sha256": "df5e508d490ce6dab25a03f1f9044eae90eacfd73ea0d7e299755d59382f8e1f"
},
"downloads": -1,
"filename": "tb2j-0.9.12.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "64aa1df99c47f31a2d6398f4e342eed2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 199163,
"upload_time": "2025-07-25T08:59:51",
"upload_time_iso_8601": "2025-07-25T08:59:51.966689Z",
"url": "https://files.pythonhosted.org/packages/32/b6/e5396f57e193ff7a4fb5d9dbb64dfba1ec278d6cd538e87bbddf6014a87b/tb2j-0.9.12.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "15e3574aa230694ec517d66f4c839f8c0f9775dd666a6f02ae5879e583a1bd76",
"md5": "908c413a737999d016aed2d2bc305860",
"sha256": "d464e1e53231f6c67df6975e60e5ccb85e70b3ebeb719487caa1da961cc66d88"
},
"downloads": -1,
"filename": "tb2j-0.9.12.7.tar.gz",
"has_sig": false,
"md5_digest": "908c413a737999d016aed2d2bc305860",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 162759,
"upload_time": "2025-07-25T08:59:53",
"upload_time_iso_8601": "2025-07-25T08:59:53.551552Z",
"url": "https://files.pythonhosted.org/packages/15/e3/574aa230694ec517d66f4c839f8c0f9775dd666a6f02ae5879e583a1bd76/tb2j-0.9.12.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 08:59:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mailhexu",
"github_project": "TB2J",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "wheel",
"specs": []
},
{
"name": "numpy",
"specs": [
[
">",
"1.16.5"
]
]
},
{
"name": "scipy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "ase",
"specs": [
[
">=",
"3.19"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.42.0"
]
]
},
{
"name": "pathos",
"specs": []
},
{
"name": "packaging",
"specs": [
[
">=",
"20.0"
]
]
},
{
"name": "sympair",
"specs": [
[
">=",
"0.1.0"
]
]
},
{
"name": "sisl",
"specs": [
[
">=",
"0.9.0"
]
]
},
{
"name": "pre-commit",
"specs": []
}
],
"lcname": "tb2j"
}