QNANO
Example: Graphene tight-binding calculation

Basic tight-binding calculation for monolayer graphene

Directory: "examples/graphene/02_tightbinding_monolayer_Eigen":

Directory: "examples/graphene/03_tightbinding_monolayer_slepc":

This example shows how to diagonalize small tight-binding problems in the case of graphene. The code supports exact diagonalization using the Eigen library as well as the iterative methods supported by SLEPc. Iterative methods are required when the dimension of the Hamiltonian becomes too large for exact diagonalization routines. One advantage of the exact diagonalization routine is that no installation of SLEPc/PETSc is required.

To run the example go to a new directory and execute:

$QNANO_DIR/examples/graphene/02_tightbinding_monolayer_Eigen/run_example.sh

The first step in these scripts is the structure generation. This has already been addressed in the previous example. The diagonalization is performed by the command

echo "Diagonalizing armchair structure ..."
$QNANO_DIR/bin/tightbinding_eigen -resources_dir $QNANO_DIR/resources \
-positions positions_armchair_hex8.dat \
-eigenvalue_filename "energies_armchair_hex8.dat"  -EV_filename_pattern "EV*_armchair_hex8.dat"  -nr_print 2 \
-eps_target 0.000001 -eps_nev 20  -eps_max_it 1000000 -eps_tol 1e-8

The tool "tightbinding_eigen" requires the specification of a "positions" file from the stucture generation process. The materials specified in this file are looked for in the "resources_dir". The default parameter files are provided in "$QNANO_DIR/resources".

The optional parameters "eigenvalue_filename" and "EV_filename_pattern" determine the name of the generated files for eigenvalues and eigenvectors. "nr_print" is the number of eigenstates that are printed (if it is set to -1 all converged states will be printed).

Parameters starting with "eps_" are in general forwarded to SLEPc (cf. documentation of SLEPc). However, to be able to use the same parameters for the exact diagonalization we also use "eps_target" for the targeted eigenvalue (EV0_... will be the eigenstate closest to the target). The SLEPc parameters "eps_nev" for the number of eigenstates to be calculated and "eps_max_it" for the maximal number of iteration used in the iterative method are ignored here but are used in example "03_tightbinding_monolayer_slepc". The same is true for the convergence criterion "eps_tol" (tolerance for convergence of eigenvalue) used for the iterative method.

The generated output has the following form: the eigenvalue file "energies_armchair_hex8.dat" contains one eigenvalue per line:

0.281264240785
0.281264240785
-0.281264240785
-0.281264240785
0.429409803843
-0.429409803843
0.617728017747
-0.617728017747
0.624044501574
...

(Note: we have used a target value slightly larger than zero to make the positive eigenvalues the first ones to be listed, just for the sake of definiteness) The eigenvector corresponding to the first eigenstate can be found in "EV0_armchair_hex8.dat":

number_of_atoms 1014
number_of_orbitals 1
0.001278289 0
-0.01792051 0
0.000521853 0
0.00286991 0
-0.029912409 0
0.000134836 0
0.017792104 0
-0.003200369 0
...

where after the first two lines the linear combination of atomic orbitals (LCAO) coefficients (real and imaginary parts) for each orbital on each atom are listed.

Because the eigenvalues are sorted according to their distance to the target value, we restore an ascending order for plotting using the Linux command line

cat energies_armchair_hex8.dat |sort -g > energies_armchair_hex8_sorted.dat

Open the file "energies.pdf" to see the resulting energy levels around zero energy.

The charge density of an eigenstate can be displayed using

$QNANO_DIR/bin/QNANO2ps -positions positions_armchair_hex8.dat -displayEV EV0_armchair_hex8.dat EV1_armchair_hex8.dat -outfile EV0_and_1_armchair_hex8.ps

Similarly to generating a postscript of a structure, we have to supply the position file. Additionally, we specify with "displayEV" the eigenvector files. If more than one eigenvector file is provided, the charge densities are added (For degenerate states, every linear combination is also an eigenstates. The sum of the charge densities is, however, independent of which linear combination is used).

To check that the same result is also obtained with iterative methods, go to a new directory and execute:

$QNANO_DIR/examples/graphene/03_tightbinding_monolayer_slepc/run_example.sh