Skip to content

Commit

Permalink
update abacus-TB2J interface docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mailhexu committed Feb 19, 2024
1 parent 9c847ab commit b0975fa
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TB2J is a open source python package for calculating the magnetic interaction pa
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.
- 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.
Expand Down
11 changes: 6 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
Welcome to TB2J's documentation!
================================

TB2J is an open-source Python package for the automatic computation of magnetic interactions (including exchange and Dzyaloshinskii-Moriya) between atoms of magnetic crystals from density functional Hamiltonians based on Wannierfunctions or linear combinations of atomic orbitals. The program is based on Green’s function method with the local rigid spin rotation treated as a perturbation. As input, the package uses the output of either Wannier90, whichis interfaced with many density functional theory packages, or of codes based on localized orbitals. A minimal userinput is needed, which allows for easy integration into high-throughput workflows.
The source code can be found at `https://github.com/mailhexu/TB2J <https://github.com/mailhexu/TB2J>`_.
For questions please use the online forum at `<https://groups.google.com/g/tb2j>`_, or send email to `<[email protected]>`_.
More TB2J examples with full DFT/Wannier data can be found at `https://github.com/mailhexu/TB2J_examples <https://github.com/mailhexu/TB2J_examples>`_ .
TB2J is an open-source Python package for the automatic computation of magnetic interactions (including exchange and Dzyaloshinskii-Moriya) between atoms of magnetic crystals from density functional Hamiltonians based on Wannierfunctions or linear combinations of atomic orbitals. The program is based on Green’s function method with the local rigid spin rotation treated as a perturbation. As input, the package uses the output of either Wannier90, whichis interfaced with many density functional theory packages, or of codes based on localized orbitals (SIESTA, OpenMX and Abacus). A minimal user-input is needed, which allows for easy integration into high-throughput workflows.

The TB2J project is initialized in the PhyTheMa and Nanomat teams in the University of Liege.


The source code can be found at `https://github.com/mailhexu/TB2J <https://github.com/mailhexu/TB2J>`_.

For questions please use the online forum at `<https://groups.google.com/g/tb2j>`_, or send email to `<[email protected]>`_.

More TB2J examples with full DFT/Wannier data can be found at `https://github.com/mailhexu/TB2J_examples <https://github.com/mailhexu/TB2J_examples>`_ .

There are video tutorials in TB2J channel on youtube: `<https://www.youtube.com/channel/UCPbmKE10Wz3orbo4x-g0c9A>`_ .

Expand Down
26 changes: 20 additions & 6 deletions docs/src/abacus.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
### Use TB2J with Abacus

In this tutorial we will learn how to use TB2J with Abacus. The TB2J-Abacus interface is available since TB2J version 0.8.0.
In this tutorial we will learn how to use TB2J with Abacus. The TB2J-Abacus interface is available since TB2J version 0.8.0. There are three types of basis set in Abacus, the plane-wave (PW), the linear-combinatio of atomic orbitals (LCAO), and the LCAO-in-PW. With the LCAO basis set, TB2J can directly take the output and compute the exchange parameters. For the other type of basis set, the Wannier90 interace can be used instead. In this tutorial we will use LCAO.


#### Collinear calculation without SOC

Let's start from the example of Fe. The input files used can be found in the examples/Abacus/Fe directory.
Let's start from the example of Fe. The example files can be found here: https://github.com/mailhexu/TB2J_examples/tree/master/Abacus/Fe_no_SOC .

First do the abacus calculation there. There are three types of basis set in Abacus, the plane-wave (PW), the linear-combinatio of atomic orbitals (LCAO), and the LCAO-in-PW. With the LCAO basis set, TB2J can directly take the output and compute the exchange parameters. In this tutorial we will take this approach.
First do the abacus calculation. Note that the Kohn-Sham Hamiltonian and the overlap matrix is needed as the input to TB2J. We need to put

For the other type of basis set, the Wannier90 interace can be used instead.
```
out_mat_hs2 1
```

in the Abucus INPUT file, so that the two files will be written. In the INPUT, the line

```
sufffix Fe
```

specifies the suffix of the output. Thus the output will be in the directory OUT.Fe when the DFT calculation is finished.

In this calculation, we set the suffix to Fe. When the DFT calculation is finished.
In this calculation, we set the path to the directory of the DFT calculation, which is the current directory (". ") and the suffix to Fe.

Now we can run the abacus2J.py command to calculate the exchange parameters:

```bash
abacus2J.py --path . --suffix Fe --elements Fe --kmesh 7 7 7
```

This first read the siesta.fdf, the input file for Siesta. It then read the Hamiltonian and the overlap matrices, calculate the J with a 7x7x7 k-point grid. This allows for the calculation of exchange between spin pairs between 7x7x7 supercell.
This first read the atomic structures from th STRU file, then read the Hamiltonian and the overlap matrices stored in the files named starting from "data-HR-" and "data-SR-" files. It also read the fermi energy from the OUT.Fe/running_scf.log file.

With the command above, we can calculate the J with a 7x7x7 k-point grid. This allows for the calculation of exchange between spin pairs between 7x7x7 supercell.



#### Parameters of abacus2J.py

We can use the command

Expand Down

0 comments on commit b0975fa

Please sign in to comment.