el: tight-binding models from Wannier90

class elphmod.el.Model(hrdat)

Tight-binding model for the electrons.

Parameters
hrdatstr

File with Hamiltonian in Wannier basis from Wannier90.

Attributes
Rndarray

Lattice vectors of Wigner-Seitz supercell.

datandarray

Corresponding onsite energies and hoppings.

sizeint

Number of Wannier functions/bands.

H(k1=0, k2=0, k3=0)

Set up Hamilton operator for arbitrary k point.

elphmod.el.eband_from_qe_pwo(pw_scf_out)

The ‘one-electron contribution’ energy in the Quantum ESPRESSO pw_scf-output is a sum of eband+deband. Here, we can calculate the eband part:

To compare it with the Quantum ESPRESSO result, you need to modify the ‘SUBROUTINE print_energies ( printout )’ from ‘electrons.f90’.

CHANGE:

‘WRITE( stdout, 9060 ) &

( eband + deband ), ehart, ( etxc - etxcc ), ewld’

TO

‘WRITE( stdout, 9060 ) &

eband, ( eband + deband ), ehart, ( etxc - etxcc ), ewld’

AND

9060 FORMAT(/’ The total energy is the sum of the following terms:’,/,&

/’ one-electron contribution =’,F17.8,’ Ry’ &

TO

9060 FORMAT(/’ The total energy is the sum of the following terms:’,/,&

/’ sum bands =’,F17.8,’ Ry’ & /’ one-electron contribution =’,F17.8,’ Ry’ &

At some point, we should add the deband routine as well…

Parameters
pw_scf_out: string
The name of the output file (typically ‘pw.out’)
Returns
eband: float

The band energy

elphmod.el.proj_sum(proj, orbitals, *groups)

Sum over selected atomic projections.

Examples:

proj = read_atomic_projections('atomic_proj.xml')
orbitals = read_projwf_out('projwfc.out')
proj = proj_sum(proj, orbitals, 'S-p', 'Ta-d{z2, x2-y2, xy}')
elphmod.el.read_Fermi_level(pw_scf_out)

Read Fermi level from output of self-consistent PW run.

elphmod.el.read_atomic_projections(atomic_proj_xml, order=False, from_fermi=True, **order_kwargs)

Read projected bands from outdir/prefix.save/atomic_proj.xml.

elphmod.el.read_atomic_projections_old(atomic_proj_xml, order=False, from_fermi=True, **order_kwargs)

Read projected bands from outdir/prefix.save/atomic_proj.xml.

elphmod.el.read_bands(filband)

Read bands from filband just like Quantum ESRESSO’s plotband.x.

elphmod.el.read_bands_plot(filbandgnu, bands)

Read bands from filband.gnu produced by Quantum ESPRESSO’s bands.x.

Parameters
filbandgnustr

Name of file with plotted bands.

bandsint

Number of bands.

Returns
ndarray

Cumulative reciprocal distance.

ndarray

Band energies.

elphmod.el.read_hrdat(hrdat)

Read _hr.dat file from Wannier90.

elphmod.el.read_projwfc_out(projwfc_out)

Identify orbitals in atomic_proj.xml via output of projwfc.x.

elphmod.el.read_pwo(pw_scf_out)

Read energies from PW output file.

elphmod.el.read_symmetry_points(bandsout)

Read positions of symmetry points along path.

Parameters
bandsoutstr

File with standard output from Quantum ESPRESSO’s bands.x.

Returns
list

Positions of symmetry points.

elphmod.el.read_wannier90_eig_file(seedname, num_bands, nkpts)

Read Kohn-Sham energies (eV) from the Wannier90 output seedname.eig file.

Parameters
seedname: string

For example ‘tas2’, if the file is named ‘tas2.eig’

num_bands: integer

Number of bands in your pseudopotential

nkpts: integer

Number of k-points in your Wannier90 calculations. For example 1296 for 36x36x1

Returns
ndarray

Kohn-Sham energies: eig[num_bands, nkpts]