Using TBTK to calculate the density of states (DOS) of a 1D, 2D, and 3D square lattice
Most recent TBTK release at the time of writing: v1.0.2 (Updated to work with: v2.0.0)
In this post we will walk through how to calculate and plot the density of state (DOS) of a 1D, 2D, and 3D square lattice, using TBTK. To achieve this we will first implement three functions for creating the corresponding models. We will then create a fourth function in which the DOS is calculated for each of the three models.
This example also provides a simple demonstration of how TBTK naturally support the creation of general purpose code, in this case the calculation of the DOS, that can be used independently of the details of the model.
1 Creating the Model
1.1 One dimension
In one dimension the Hamiltonian is given by
(1) |
where t is a hopping parameter that we will set to one.
To create the model we loop over the summation index and feed each of the hopping amplitudes to the Model. Note how we let the numerical indices run over the positive discrete values 0 to 9999, while the argument of the cos function falls in the interval .
1.2 Two dimensions
In two dimension the Hamiltonian is given by
(2) |
where .
The corresponding Model is created as follows using a grid.
1.3 Three dimensions
In three dimension the Hamiltonian is given by
(3) |
where .
The corresponding Model is created as follows using a grid.
2 Calculating the DOS
We are now ready to implement the main function for calculating the DOS. To take advantage of that the Hamiltonian consists of independent blocks for each value, we will use the Solver::BlockDiagonalizer. Knowing that the density of states will lie in the interval for all three Models, we next setup the PropertyExtractor to work on the energy interval and calculate the DOS. Finally we plot the DOS, using gaussian smoothin with and a convolution window of 101 energy points and save the results to file.
3 Results
Below we show the result of the calculation for the three different cases.
3.1 One dimensional
![[Uncaptioned image]](post5/DOS_1D.png)
3.2 Two dimensional
![[Uncaptioned image]](post5/DOS_2D.png)
3.3 Three dimensional
![[Uncaptioned image]](post5/DOS_3D.png)
4 Full code
Full code is available in src/main.cpp in the project 2018_10_23 of the Second Tech code package. See the README for instructions on how to build and run.