TB2J 0.9.9rc7__tar.gz → 0.9.9rc8__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.9rc7 → tb2j-0.9.9rc8}/PKG-INFO +1 -1
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/exchange.py +11 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_exchange.py +0 -27
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mycfr.py +4 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/symmetrize_J.py +12 -23
- tb2j-0.9.9rc8/TB2J/thetaphi.py +16 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/PKG-INFO +1 -1
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/SOURCES.txt +1 -1
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/ReleaseNotes.md +17 -1
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/setup.py +1 -1
- tb2j-0.9.9rc7/TB2J/io_exchange/io_matjes.py +0 -225
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.github/workflows/pylint.yml.bak +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.github/workflows/python-app.yml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.gitignore +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.pre-commit-config.yaml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.readthedocs.yml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.ruff.toml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/.travis.yml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/LICENSE +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/README.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/.gitignore +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/Jdownfolder.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/Jtensor.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/MAE.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/MAEGreen.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/Oiju.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/Oiju_epc.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/anisotropy.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/basis.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/citation.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/contour.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/density_matrix.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/epc.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/exchangeCL2.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/exchange_params.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/exchange_pert.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/exchange_qspace.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/external/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/external/p_tqdm.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/gpaw_wrapper.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/green.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/greentest.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/.gitignore +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/abacus_api.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/abacus_wrapper.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/gen_exchange_abacus.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/orbital_api.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/stru_api.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/test_density_matrix.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/test_read_HRSR.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/abacus/test_read_stru.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/gpaw_interface.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/lawaf_interface.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/manager.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/siesta_interface.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/interfaces/wannier90_interface.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_multibinit.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_tomsasd.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_txt.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_uppasd.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_exchange/io_vampire.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/io_merge.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/kpoints.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/fermi.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/fibonacci_sphere.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/kR_convert.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/lowdin.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/mathutils/rotate_spin.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/myTB.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/orbital_magmom.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/orbmap.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/pauli.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/pert.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/plot.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/rotate_atoms.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/rotate_siestaDM.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/sisl_wrapper.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/base_parser.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/constants.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/hamiltonian.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/hamiltonian_terms.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/plot.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/qsolver.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/spin_api.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/spin_xml.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/spinham/supercell.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/tensor_rotate.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/utest.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/utils.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/versioninfo.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/wannier/__init__.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/wannier/w90_parser.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J/wannier/w90_tb_parser.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/dependency_links.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/entry_points.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/requires.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/TB2J.egg-info/top_level.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/buildimage.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/Makefile +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/conf.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/index.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/make.bat +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/requirements.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/BFOvarT.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/Contributors.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/SrMnO3_DOS.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/abacus.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/applications.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/convention.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/development.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/downfold.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/ecosystem.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/eigen.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/extend.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/faq.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/install.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/mae.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/magnon_band.assets/exchange_magnon-1593690872101.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/magnon_band.assets/exchange_magnon.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/magnon_band.assets/magnon_dos.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/magnon_band.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/multibinit.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/openmx.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/orbital_contribution.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/output.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/parameters.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/references.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/roadmap.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/rotate_and_merge.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/siesta.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/spin_model_assets/canting_DMI.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/spin_model_assets/tmulti5_2.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/symmetry.md +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/tutorial.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/docs/src/wannier.rst +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/Fe.1.psml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/EigenJq.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange_kpth.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/exchange_magnon.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_band.json +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_band.pdf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_dos.png +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/magnon_dos.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/mb.files +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/mb.in +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/plot.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/plot_magnon_dos.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/Multibinit/plot_magnon_from_json_file.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/TB2J.pickle +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/TomASD/exchange.exch +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/TomASD/exchange.ucf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/TB2J_results/exchange.out +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/getJ.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/run.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/BccFe/siesta.fdf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/Co.1.psml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Multibinit/exchange.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Multibinit/mb.files +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Multibinit/mb.in +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/TB2J.pickle +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/TomASD/exchange.exch +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/TomASD/exchange.ucf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Vampire/input +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Vampire/vampire.UCF +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/Vampire/vampire.mat +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/exchange.out +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/TB2J_results/summary.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/getJ.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/run.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/Siesta/HcpCo/siesta.fdf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/JvsR.pdf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/exchange.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/mb.files +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Multibinit/mb.in +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/TB2J.pickle +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/TomASD/exchange.exch +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/TomASD/exchange.ucf +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/input +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/vampire.UCF +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/Vampire/vampire.mat +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/assigned_basis.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/exchange.out +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/TB2J_results/exchange_orb_decomposition.out +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinit.files +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinit.in +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_down.win +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_down_centres.xyz +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_down_hr.dat +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_up.win +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_up_centres.xyz +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/abinito_w90_up_hr.dat +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/get_J.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/psp/Mn.GGA-PBESOL-JTH.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/psp/O.GGA-PBESOL-JTH.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/psp/Sr.GGA-PBESOL-JTH.xml +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/examples/abinit-w90/SrMnO3/run.sh +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/requirements.txt +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_downfold.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_eigen.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_magnon.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_magnon_dos.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_merge.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_rotate.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/TB2J_rotateDM.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/abacus2J.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/siesta2J.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/scripts/wann2J.py +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/setup.cfg +0 -0
- {tb2j-0.9.9rc7 → tb2j-0.9.9rc8}/upload_to_pip.sh +0 -0
@@ -566,12 +566,23 @@ class ExchangeNCL(Exchange):
|
|
566
566
|
AijRs: a list of AijR,
|
567
567
|
wherer AijR: array of ((nR, n, n, 4,4), dtype=complex)
|
568
568
|
"""
|
569
|
+
# if method == "trapezoidal":
|
570
|
+
# integrate = trapezoidal_nonuniform
|
571
|
+
# elif method == "simpson":
|
572
|
+
# integrate = simpson_nonuniform
|
573
|
+
#
|
574
|
+
|
575
|
+
# self.rho = integrate(self.contour.path, rhoRs)
|
569
576
|
for iR, R in enumerate(self.R_ijatom_dict):
|
570
577
|
for iatom, jatom in self.R_ijatom_dict[R]:
|
571
578
|
f = AijRs[(R, iatom, jatom)]
|
579
|
+
# self.A_ijR[(R, iatom, jatom)] = integrate(self.contour.path, f)
|
572
580
|
self.A_ijR[(R, iatom, jatom)] = self.contour.integrate_values(f)
|
573
581
|
|
574
582
|
if self.orb_decomposition:
|
583
|
+
# self.A_ijR_orb[(R, iatom, jatom)] = integrate(
|
584
|
+
# self.contour.path, AijRs_orb[(R, iatom, jatom)]
|
585
|
+
# )
|
575
586
|
self.contour.integrate_values(AijRs_orb[(R, iatom, jatom)])
|
576
587
|
|
577
588
|
def get_quantities_per_e(self, e):
|
@@ -338,12 +338,6 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
338
338
|
)
|
339
339
|
return Jtensor
|
340
340
|
|
341
|
-
def get_J_tensor_dict(self):
|
342
|
-
Jdict = {}
|
343
|
-
for i, j, R in self.ijR_list():
|
344
|
-
Jdict[(i, j, R)] = self.get_J_tensor(i, j, R)
|
345
|
-
return Jdict
|
346
|
-
|
347
341
|
def get_full_Jtensor_for_one_R(self, R, iso_only=False):
|
348
342
|
"""
|
349
343
|
Return the full exchange tensor of all i and j for cell R.
|
@@ -411,7 +405,6 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
411
405
|
self.write_multibinit(path=os.path.join(path, "Multibinit"))
|
412
406
|
self.write_tom_format(path=os.path.join(path, "TomASD"))
|
413
407
|
self.write_vampire(path=os.path.join(path, "Vampire"))
|
414
|
-
self.write_matjes(path=os.path.join(path, "Matjes"))
|
415
408
|
|
416
409
|
self.plot_all(savefile=os.path.join(path, "JvsR.pdf"))
|
417
410
|
# self.write_Jq(kmesh=[9, 9, 9], path=path)
|
@@ -580,11 +573,6 @@ Generation time: {now.strftime("%y/%m/%d %H:%M:%S")}
|
|
580
573
|
|
581
574
|
write_uppasd(self, path=path)
|
582
575
|
|
583
|
-
def write_matjes(self, path):
|
584
|
-
from TB2J.io_exchange.io_matjes import write_matjes
|
585
|
-
|
586
|
-
write_matjes(self, path=path)
|
587
|
-
|
588
576
|
|
589
577
|
def gen_distance_dict(ind_mag_atoms, atoms, Rlist):
|
590
578
|
distance_dict = {}
|
@@ -600,21 +588,6 @@ def gen_distance_dict(ind_mag_atoms, atoms, Rlist):
|
|
600
588
|
return distance_dict
|
601
589
|
|
602
590
|
|
603
|
-
def get_ind_shell(distance_dict, symprec=1e-5):
|
604
|
-
"""
|
605
|
-
return a dictionary of shell index for each pair of atoms.
|
606
|
-
The index of shell is the ith shortest distances between all magnetic atom pairs.
|
607
|
-
"""
|
608
|
-
shell_dict = {}
|
609
|
-
distances = np.array([x[1] for x in distance_dict.values()])
|
610
|
-
distances_int = np.round(distances / symprec).astype(int)
|
611
|
-
dint = sorted(np.unique(distances_int))
|
612
|
-
dintdict = dict(zip(dint, range(len(dint))))
|
613
|
-
for key, val in enumerate(distances_int):
|
614
|
-
shell_dict[key] = dintdict[val]
|
615
|
-
return shell_dict
|
616
|
-
|
617
|
-
|
618
591
|
def test_spin_io():
|
619
592
|
import numpy as np
|
620
593
|
from ase import Atoms
|
@@ -64,6 +64,10 @@ class CFR:
|
|
64
64
|
# zp = 1j / eigp * kb * self.T
|
65
65
|
# Rp = 0.25 * np.diag(eigv)**2 * zp **2
|
66
66
|
|
67
|
+
# print the poles and the weights
|
68
|
+
for i in range(len(self.poles)):
|
69
|
+
print("Pole: ", self.poles[i], "Weight: ", self.weights[i])
|
70
|
+
|
67
71
|
# add a point to the poles: 1e10j
|
68
72
|
self.path = np.concatenate((self.path, [self.Rinf * 1j]))
|
69
73
|
# self.path = np.concatenate((self.path, [0.0]))
|
@@ -9,7 +9,7 @@ from TB2J.versioninfo import print_license
|
|
9
9
|
|
10
10
|
|
11
11
|
class TB2JSymmetrizer:
|
12
|
-
def __init__(self, exc, symprec=1e-8, verbose=True, Jonly=
|
12
|
+
def __init__(self, exc, symprec=1e-8, verbose=True, Jonly=False):
|
13
13
|
# list of pairs with the index of atoms
|
14
14
|
ijRs = exc.ijR_list_index_atom()
|
15
15
|
finder = SymmetryPairFinder(atoms=exc.atoms, pairs=ijRs, symprec=symprec)
|
@@ -25,12 +25,6 @@ class TB2JSymmetrizer:
|
|
25
25
|
)
|
26
26
|
print("-" * 30)
|
27
27
|
if exc.has_dmi:
|
28
|
-
# raise NotImplementedError(
|
29
|
-
# "Symmetrization of DMI is not yet implemented."
|
30
|
-
# )
|
31
|
-
# raise Warning(
|
32
|
-
# "WARNING: Symmetrization of DMI is not yet implemented."
|
33
|
-
# )
|
34
28
|
print(
|
35
29
|
"WARNING: Currently only the isotropic exchange is symmetrized. Symmetrization of DMI and anisotropic exchange are not yet implemented."
|
36
30
|
)
|
@@ -39,7 +33,7 @@ class TB2JSymmetrizer:
|
|
39
33
|
print("Symmetry found:")
|
40
34
|
print(finder.spacegroup)
|
41
35
|
print("-" * 30)
|
42
|
-
self.
|
36
|
+
self.pgdict = finder.get_symmetry_pair_group_dict()
|
43
37
|
self.exc = exc
|
44
38
|
self.new_exc = copy.deepcopy(exc)
|
45
39
|
self.Jonly = Jonly
|
@@ -52,25 +46,21 @@ class TB2JSymmetrizer:
|
|
52
46
|
Symmetrize the exchange parameters J.
|
53
47
|
"""
|
54
48
|
symJdict = {}
|
55
|
-
reduced_symJdict = {}
|
56
49
|
# Jdict = self.exc.exchange_Jdict
|
57
|
-
|
58
|
-
|
50
|
+
# ngroup = self.pgdict
|
51
|
+
for pairgroup in self.pgdict.groups:
|
52
|
+
ijRs = pairgroup.get_all_ijR()
|
59
53
|
ijRs_spin = [self.exc.ijR_index_atom_to_spin(*ijR) for ijR in ijRs]
|
60
54
|
Js = [self.exc.get_J(*ijR_spin) for ijR_spin in ijRs_spin]
|
61
55
|
Javg = np.average(Js)
|
62
56
|
for i, j, R in ijRs_spin:
|
63
57
|
symJdict[(R, i, j)] = Javg
|
64
|
-
ijRs_ref = ijRs_spin[0]
|
65
|
-
i, j, R = ijRs_ref
|
66
|
-
reduced_symJdict[(R, i, j)] = Javg
|
67
58
|
self.new_exc.exchange_Jdict = symJdict
|
68
59
|
if self.Jonly:
|
69
60
|
self.new_exc.has_dmi = False
|
70
61
|
self.new_exc.dmi_ddict = None
|
71
62
|
self.new_exc.has_bilinear = False
|
72
63
|
self.new_exc.Jani_dict = None
|
73
|
-
self.new_exc.reduced_exchange_Jdict = reduced_symJdict
|
74
64
|
self.has_uniaxial_anisotropy = False
|
75
65
|
self.k1 = None
|
76
66
|
self.k1dir = None
|
@@ -134,12 +124,12 @@ def symmetrize_J_cli():
|
|
134
124
|
help="precision for symmetry detection. default is 1e-5 Angstrom",
|
135
125
|
)
|
136
126
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
127
|
+
parser.add_argument(
|
128
|
+
"--Jonly",
|
129
|
+
action="store_true",
|
130
|
+
help="symmetrize only the exchange parameters and discard the DMI and anisotropic exchange",
|
131
|
+
default=False,
|
132
|
+
)
|
143
133
|
|
144
134
|
args = parser.parse_args()
|
145
135
|
if args.inpath is None:
|
@@ -149,8 +139,7 @@ def symmetrize_J_cli():
|
|
149
139
|
path=args.inpath,
|
150
140
|
output_path=args.outpath,
|
151
141
|
symprec=args.symprec,
|
152
|
-
|
153
|
-
Jonly=True,
|
142
|
+
Jonly=args.Jonly,
|
154
143
|
)
|
155
144
|
|
156
145
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import numpy as np
|
2
|
+
|
3
|
+
|
4
|
+
def theta_phi_even_spaced(n):
|
5
|
+
"""
|
6
|
+
Return n evenly spaced theta and phi values in the ranges [0, pi] and [0, 2*pi] respectively.
|
7
|
+
"""
|
8
|
+
phis = []
|
9
|
+
thetas = []
|
10
|
+
for i in range(n):
|
11
|
+
phi = 2 * np.pi * i / n
|
12
|
+
phis.append(phi)
|
13
|
+
r = np.sin(np.pi * i / n)
|
14
|
+
theta = np.arccos(1 - 2 * r)
|
15
|
+
thetas.append(theta)
|
16
|
+
return thetas, phis
|
@@ -47,6 +47,7 @@ TB2J/rotate_siestaDM.py
|
|
47
47
|
TB2J/sisl_wrapper.py
|
48
48
|
TB2J/symmetrize_J.py
|
49
49
|
TB2J/tensor_rotate.py
|
50
|
+
TB2J/thetaphi.py
|
50
51
|
TB2J/utest.py
|
51
52
|
TB2J/utils.py
|
52
53
|
TB2J/versioninfo.py
|
@@ -76,7 +77,6 @@ TB2J/interfaces/abacus/test_read_HRSR.py
|
|
76
77
|
TB2J/interfaces/abacus/test_read_stru.py
|
77
78
|
TB2J/io_exchange/__init__.py
|
78
79
|
TB2J/io_exchange/io_exchange.py
|
79
|
-
TB2J/io_exchange/io_matjes.py
|
80
80
|
TB2J/io_exchange/io_multibinit.py
|
81
81
|
TB2J/io_exchange/io_tomsasd.py
|
82
82
|
TB2J/io_exchange/io_txt.py
|
@@ -1,7 +1,23 @@
|
|
1
1
|
## Release Notes
|
2
2
|
------------------------------------------------------------------------
|
3
|
-
|
3
|
+
|
4
|
+
#### Current development version (v1.0.0-alpha)
|
5
|
+
These are the new features and changes not yet included in the official release.
|
6
|
+
|
4
7
|
- Computing MAE and single-ion anisotropy is now possible with the ABACUS and SIESTA interfaces.
|
8
|
+
This currently requires an non-official SIESTA branch which can seperate the spin-orbit coupling and the exchange-correlation Hamiltonian. (see this MR: https://gitlab.com/siesta-project/siesta/-/merge\_requests/309)
|
9
|
+
|
10
|
+
- The full implementation of the magnon band structure from the linear spin wave theory. (Thanks to Andres Tellez Mora and Aldo Romero!)
|
11
|
+
|
12
|
+
- An improved method of the downfolding method which implements the ligand correction to the exchange based on the Wannier function method. This requires the updated version of LaWaF (https://github.com/mailhexu/lawaf) and the updated version of the TB2J\_downfold.py script.
|
13
|
+
|
14
|
+
- There is a major refractoring of the interface to the DFT codes. The parsing of the electron Hamiltonian from the DFT codes are now in a separate python package called HamiltonIO (github.com/mailhexu/HamiltonIO). This package is used by TB2J but is made general to be used with other packages too.
|
15
|
+
|
16
|
+
|
17
|
+
#### v0.11.0 October 10, 2024
|
18
|
+
- Allowing to symmetrize the exchange according to the crystal symmetry with the TB2J\_symmetrize.py script. Note that the spin order is not considered in this symmetrization process.
|
19
|
+
|
20
|
+
#### v0.10.0 September 1, 2024
|
5
21
|
- Improved orbital-decomposition to the ABACUS interface.
|
6
22
|
- Allow computing anisotropic J and DMI without three or more calculations within ABACUS and SIESTA interfaces.
|
7
23
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
from setuptools import find_packages, setup
|
3
3
|
|
4
|
-
__version__ = "0.9.
|
4
|
+
__version__ = "0.9.9_rc8"
|
5
5
|
|
6
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
7
|
|
@@ -1,225 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
|
3
|
-
import numpy as np
|
4
|
-
|
5
|
-
from TB2J.utils import symbol_number
|
6
|
-
from ase.units import Bohr, nm
|
7
|
-
|
8
|
-
|
9
|
-
def get_ind_shell(distance_dict, symprec=1e-5):
|
10
|
-
"""
|
11
|
-
return a dictionary of shell index for each pair of atoms.
|
12
|
-
The index of shell is the ith shortest distances between all magnetic atom pairs.
|
13
|
-
"""
|
14
|
-
shell_dict = {}
|
15
|
-
distances = np.array([x[1] for x in distance_dict.values()])
|
16
|
-
distances_int = np.round(distances / symprec).astype(int)
|
17
|
-
dint = sorted(np.unique(distances_int))
|
18
|
-
dintdict = dict(zip(dint, range(len(dint))))
|
19
|
-
for key, val in distance_dict.items():
|
20
|
-
di = np.round(val[1] / symprec).astype(int)
|
21
|
-
shell_dict[key] = dintdict[di]
|
22
|
-
return shell_dict
|
23
|
-
|
24
|
-
|
25
|
-
def _write_symmetry(cls, path, fname="symmetry.in", symmetry=True):
|
26
|
-
fname = os.path.join(path, fname)
|
27
|
-
if not symmetry:
|
28
|
-
with open(fname, "w") as myfile:
|
29
|
-
myfile.write("1 \n")
|
30
|
-
myfile.write("\n")
|
31
|
-
myfile.write("! identity operation\n")
|
32
|
-
myfile.write("1.0000000000 0.0000000000 0.0000000000\n")
|
33
|
-
myfile.write("0.0000000000 1.0000000000 0.0000000000\n")
|
34
|
-
myfile.write("0.0000000000 0.0000000000 1.0000000000\n")
|
35
|
-
myfile.write("0.0000000000 0.0000000000 0.0000000000\n")
|
36
|
-
else:
|
37
|
-
raise NotImplementedError("Symmetry not implemented yet")
|
38
|
-
|
39
|
-
|
40
|
-
def write_matjes(cls, path="TB2J_results/Matjes", symmetry=False):
|
41
|
-
if not os.path.exists(path):
|
42
|
-
os.makedirs(path)
|
43
|
-
inputfname = os.path.join(path, "input")
|
44
|
-
with open(inputfname, "w") as myfile:
|
45
|
-
_write_lattice_supercell(cls, myfile)
|
46
|
-
_write_atoms(cls, myfile)
|
47
|
-
_write_magnetic_interactions(cls, myfile)
|
48
|
-
#_write_isotropic_exchange(cls, myfile, symmetry=symmetry)
|
49
|
-
_write_magnetic_anisotropy(cls, myfile)
|
50
|
-
# _write_dmi(cls, myfile)
|
51
|
-
_write_exchange_tensor(cls, myfile, symmetry=symmetry)
|
52
|
-
_write_parameters(cls, myfile, symmetry=symmetry)
|
53
|
-
print(f"writting symmetries ")
|
54
|
-
_write_symmetry(cls, path, fname="symmetries.in", symmetry=False)
|
55
|
-
|
56
|
-
def _write_parameters(cls, myfile, symmetry=False):
|
57
|
-
if symmetry:
|
58
|
-
myfile.write("cal_sym T\n")
|
59
|
-
myfile.write("sym_mode 2\n")
|
60
|
-
else:
|
61
|
-
myfile.write("cal_sym F \n")
|
62
|
-
myfile.write("sym_mode 0\n")
|
63
|
-
|
64
|
-
def _write_lattice_supercell(cls, myfile):
|
65
|
-
myfile.write("# Lattice and supercell\n")
|
66
|
-
myfile.write(
|
67
|
-
"Periodic_log .T. .T. .T. # periodic boundary conditions along vector 1, 2 and 3\n"
|
68
|
-
)
|
69
|
-
myfile.write("Nsize 8 8 8 # size of the supercell\n")
|
70
|
-
try:
|
71
|
-
unitcell = cls.atoms.get_cell().reshape((3, 3))
|
72
|
-
except Exception:
|
73
|
-
unitcell = cls.atoms.get_cell().array.reshape((3, 3))
|
74
|
-
uc_lengths = np.linalg.norm(unitcell, axis=1)
|
75
|
-
unitcell /= uc_lengths[:, None]
|
76
|
-
myfile.write(f"alat {uc_lengths[0]/nm} {uc_lengths[1]/nm} {uc_lengths[2]/nm} #lattice constant lengths\n")
|
77
|
-
myfile.write(
|
78
|
-
"lattice #lattice vector should be orthogonal or expressed in cartesian\n")
|
79
|
-
myfile.write(
|
80
|
-
f"{unitcell[0][0]} {unitcell[0][1]} {unitcell[0][2]} # a_11 a_12 a_1 first lattice vector in line (does not need to be normalize)\n"
|
81
|
-
)
|
82
|
-
myfile.write(
|
83
|
-
f"{unitcell[1][0]} {unitcell[1][1]} {unitcell[1][2]} # a_21 a_22 a_23 second lattice vector in line (does not need to be normalize)\n"
|
84
|
-
)
|
85
|
-
myfile.write(
|
86
|
-
f"{unitcell[2][0]} {unitcell[2][1]} {unitcell[2][2]} # a_31 a_32 a_33 third lattice vector in line\n"
|
87
|
-
)
|
88
|
-
|
89
|
-
|
90
|
-
def get_atoms_info(atoms, spinat, symmetry=False):
|
91
|
-
if symmetry:
|
92
|
-
raise NotImplementedError("Symmetry not implemented yet")
|
93
|
-
else:
|
94
|
-
symnum = symbol_number(atoms)
|
95
|
-
atom_types = list(symnum.keys())
|
96
|
-
magmoms = np.linalg.norm(spinat, axis=1)
|
97
|
-
masses = atoms.get_masses()
|
98
|
-
tags = [i for i in range(len(atom_types))]
|
99
|
-
return atom_types, magmoms, masses, tags
|
100
|
-
|
101
|
-
|
102
|
-
def _write_atoms(cls, myfile, symmetry=False):
|
103
|
-
myfile.write("\n")
|
104
|
-
myfile.write("# Atoms\n")
|
105
|
-
atom_types, magmoms, masses, tags = get_atoms_info(
|
106
|
-
cls.atoms, cls.spinat, symmetry=symmetry
|
107
|
-
)
|
108
|
-
|
109
|
-
myfile.write(f"atomtypes {len(atom_types)} #Number of types atom\n")
|
110
|
-
for i, atom_type in enumerate(atom_types):
|
111
|
-
m = magmoms[i]
|
112
|
-
mass = masses[i]
|
113
|
-
charge = 0
|
114
|
-
myfile.write(
|
115
|
-
f"{atom_type} {m} {mass} 0.0 F 0 # atom type: (name, mag. moment, mass, charge, displacement, number TB-orb.)\n"
|
116
|
-
)
|
117
|
-
|
118
|
-
myfile.write(
|
119
|
-
f"\natoms {len(cls.atoms)} positions of the atom in the unit cell\n"
|
120
|
-
)
|
121
|
-
for i, atom in enumerate(cls.atoms):
|
122
|
-
spos = cls.atoms.get_scaled_positions()[i]
|
123
|
-
myfile.write(f"{atom_types[tags[i]]} {spos[0]}, {spos[1]}, {spos[2]} \n")
|
124
|
-
|
125
|
-
|
126
|
-
def _write_magnetic_interactions(cls, myfile, symmetry=False):
|
127
|
-
myfile.write("\nThe Hamiltonian\n")
|
128
|
-
myfile.write("# Magnetic interactions\n")
|
129
|
-
|
130
|
-
|
131
|
-
def _write_isotropic_exchange(cls, myfile, symmetry=False):
|
132
|
-
myfile.write("\nmagnetic_J\n")
|
133
|
-
shell_dict = get_ind_shell(cls.distance_dict)
|
134
|
-
if symmetry:
|
135
|
-
Jdict = cls.reduced_exchange_Jdict
|
136
|
-
else:
|
137
|
-
Jdict = cls.exchange_Jdict
|
138
|
-
for key, val in Jdict.items():
|
139
|
-
R, i, j = key
|
140
|
-
ishell = shell_dict[(R, i, j)]
|
141
|
-
myfile.write(
|
142
|
-
f"{i+1} {j+1} {ishell} {val} # between atoms type {i+1} and {j+1}, shell {R}, amplitude in eV \n"
|
143
|
-
)
|
144
|
-
myfile.write(
|
145
|
-
"\nc_H_J -1 apply 1/2 in front of the sum of the exchange energy - default is -1\n"
|
146
|
-
)
|
147
|
-
|
148
|
-
|
149
|
-
def _write_magnetic_anisotropy(cls, myfile):
|
150
|
-
if cls.k1 is None:
|
151
|
-
return
|
152
|
-
else:
|
153
|
-
myfile.write("\nmagnetic_anisotropy \n")
|
154
|
-
for i, k1 in enumerate(cls.k1):
|
155
|
-
myfile.write(
|
156
|
-
f"{i+1} {cls.k1dir[i][0]} {cls.k1dir[i][1]} {cls.k1dir[i][2]} {k1} anisotropy of atoms type {i+1}, direction {cls.k1dir[i][0]} {cls.k1dir[i][1]} {cls.k1dir[i][2]} and amplitude in eV\n"
|
157
|
-
)
|
158
|
-
myfile.write("\nc_H_ani 1.0\n")
|
159
|
-
|
160
|
-
|
161
|
-
def _write_dmi(cls, myfile):
|
162
|
-
if cls.has_dmi:
|
163
|
-
myfile.write("\nmagnetic_D\n")
|
164
|
-
for key, val in cls.dmi_ddict.items():
|
165
|
-
R, i, j = key
|
166
|
-
myfile.write(
|
167
|
-
f"{i+1} {j+1} {R[0]} {R[1]} {R[2]} {val} #between atoms type {i+1} and {j+1}, mediated by atom type {R}, shell {R}, amplitude in eV\n"
|
168
|
-
)
|
169
|
-
myfile.write(
|
170
|
-
"\nc_H_D -1.0 # coefficients to put in from of the sum - default is -1\n"
|
171
|
-
)
|
172
|
-
|
173
|
-
|
174
|
-
def _write_exchange_tensor(cls, myfile, symmetry=False):
|
175
|
-
myfile.write(
|
176
|
-
"\nmagnetic_r2_tensor #Exchange tensor elements, middle 9 entries: xx, xy, xz, yx, etc. (in units of eV) and direction in which it should be applied\n"
|
177
|
-
)
|
178
|
-
|
179
|
-
Jtensor = cls.get_J_tensor_dict()
|
180
|
-
shelldict = get_ind_shell(cls.distance_dict)
|
181
|
-
unitcell = cls.atoms.get_cell().array.reshape((3, 3))
|
182
|
-
uc_lengths = np.linalg.norm(unitcell, axis=1)
|
183
|
-
if Jtensor is not None:
|
184
|
-
for key, val in Jtensor.items():
|
185
|
-
i, j, R = key
|
186
|
-
# distance vector
|
187
|
-
dvec = cls.distance_dict[(R, i, j)][0]/nm/uc_lengths
|
188
|
-
dscalar = np.linalg.norm(dvec)
|
189
|
-
val = np.real(val)
|
190
|
-
ishell = shelldict[(R, i, j)]
|
191
|
-
myfile.write(
|
192
|
-
f"{i+1} {j+1} {ishell} {' '.join([str(x) for x in val.flatten()])} {dvec[0]} {dvec[1]} {dvec[2]} \n"
|
193
|
-
#f"{i+1} {j+1} {dscalar} {' '.join([str(x) for x in val.flatten()])} {dvec[0]} {dvec[1]} {dvec[2]} \n"
|
194
|
-
)
|
195
|
-
myfile.write(
|
196
|
-
"\nc_H_Exchten -1 apply 1/2 in front of the sum of the exchange tensor energy - default is -1\n"
|
197
|
-
)
|
198
|
-
|
199
|
-
def rattle_atoms_and_cell(atoms, stdev=0.001, cell_stdev=0.001):
|
200
|
-
"""
|
201
|
-
Rattle both atomic positions and cell parameters.
|
202
|
-
|
203
|
-
Parameters:
|
204
|
-
-----------
|
205
|
-
atoms: ASE atoms object
|
206
|
-
The atoms to be rattled
|
207
|
-
stdev: float
|
208
|
-
Standard deviation for atomic displacement in Angstrom
|
209
|
-
cell_stdev: float
|
210
|
-
Standard deviation for cell parameter variation (fractional)
|
211
|
-
|
212
|
-
Returns:
|
213
|
-
--------
|
214
|
-
None
|
215
|
-
The atoms object is modified in-place
|
216
|
-
"""
|
217
|
-
# Rattle atomic positions
|
218
|
-
positions = atoms.get_positions()
|
219
|
-
displacement = np.random.normal(0, stdev, positions.shape)
|
220
|
-
atoms.set_positions(positions + displacement)
|
221
|
-
|
222
|
-
# Rattle cell parameters
|
223
|
-
cell = atoms.get_cell()
|
224
|
-
cell_noise = np.random.normal(0, cell_stdev, cell.shape)
|
225
|
-
atoms.set_cell(cell * (1 + cell_noise), scale_atoms=True)
|
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
|