Difference between revisions of "Yambopy tutorial: band structures"

From The Yambo Project
Jump to navigation Jump to search
Line 7: Line 7:
==Tutorial 1. BN (semiconductor). Band structure==
==Tutorial 1. BN (semiconductor). Band structure==


The qepy classes are useful not only to execute Quantum Espresso but also to analyze the results.  
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'''
'''Plot Band structure'''
Line 13: Line 15:
The class '''PwXML''' reads the data file generated by Quantum Espresso and post-process the data. The class is initiated doing:
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')
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.
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.


[[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]]

Revision as of 14:31, 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.

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


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