Difference between revisions of "Yambopy tutorial: band structures"

From The Yambo Project
Jump to navigation Jump to search
Line 35: Line 35:
[[File:Bands BN 1.png| 400 px |Band structure of BN calculated at the level of DFT-LDA]]
[[File:Bands BN 1.png| 400 px |Band structure of BN calculated at the level of DFT-LDA]]


Alternatively we can use the function plot_eigen_ax. This functions requires as input the figure object and with given axes, as in the next example.


'''Plot atomic orbital projected Band structure'''
'''Plot atomic orbital projected Band structure'''


[[File:Bands AOP BN 1.png| 400 px | Atomic orbital projected band structure of monolayer BN]]
[[File:Bands AOP BN 1.png| 400 px | Atomic orbital projected band structure of monolayer BN]]


==Tutorial 2==
==Tutorial 2==

Revision as of 14:45, 4 April 2022

The full tutorial, including the Quantum espresso and Yambo databases that we will read, can be downloaded and extracted from the yambo website:

$wget www.yambo-code.org/educational/tutorials/files/databases_qepy.tar
$tar -xvf databases_qepy.tar
$cd databases_qepy

Tutorial 1. BN (semiconductor). Band structure

The qepy classes are useful not only to execute Quantum Espresso but also to analyze the results. The full qepy library is imported by simply doing:

from qepy import *

Plot Band structure

The class PwXML reads the data file generated by Quantum Espresso and post-process the data. The class is initiated doing:

xml = PwXML(prefix='bn', path='bands')

The variable prefix corresponds to the same variable of the QE input. The folder location is indicated by variable path. Previously to plot the bands, we define the k-points path using the function Path:

npoints = 50
path_kpoints = Path([ [[0.0, 0.0, 0.0],'$\Gamma$'],
                      [[0.5, 0.0, 0.0],'M'],
                      [[1./3,1./3,0.0],'K'],
                      [[0.0, 0.0, 0.0],'$\Gamma$']], [int(npoints*2),int(npoints),int(sqrt(5)*npoints)])

It is worth to note that the path should coincide with the selected path for the QE calculations.

In order to plot we do:

xml.plot_eigen(path_kpoints)

This function will automaticall plot the bands as shown below.

Band structure of BN calculated at the level of DFT-LDA

Alternatively we can use the function plot_eigen_ax. This functions requires as input the figure object and with given axes, as in the next example.

Plot atomic orbital projected Band structure

Atomic orbital projected band structure of monolayer BN


Tutorial 2

Spin polarized band structure of iron calculated by DFT


Iron band structure. Size is proportional to the weights of the projection on atomic d-orbitals. Red (blue) is up (down) spin polarization.
Figure 5-iron-bands-colormap.png

Tutorial 3

Figure 6-slope-scissor.png
Figure 7-GW-band-structure-non-interpolated.png
Figure 8-GW-band-structure-interpolated.png
Figure 8-GW-band-structure-comparison.png

Links