Skip to content

mpinterfaces.mat2d.electronic_structure

ashtonmv edited this page Jul 4, 2017 · 1 revision

electronic_structure contains functions for calculating and analyzing your 2D material's electronic properties, with a special focus on its band structure. Part 1 of the tutorial below shows how you can perform and analyze 2D band structure calculations in VASP using both PBE and HSE xc-functionals. Part 2 has more fancy stuff that doesn't necessarily apply to all 2D materials (e.g. looking at Rashba spin-splitting), but that you might find useful.

Part 1: the basics

Running band structure calculations

We're just going to keep rolling with the MoS2 example from the stability module tutorial, and now we're going to calculate its band structure. PBE and HSE06, the two levels of exchange-correlation approximations that you'll see the most of in DFT publications, are both supported in mpinterfaces. In general, PBE is good for quick band structure calculations, but it usually underestimates the band gap by enough that you probably shouldn't publish it. HSE06 calculations can take forever, but they're usually very accurate. In this tutorial, you'll use both to calculate MoS2's band structure, so you can compare the results yourself.

It's easy to launch both calculations:

import os

from mpinterfaces.mat2d.electronic_structure.startup import run_pbe_calculation,\
   run_hse_calculation


os.chdir('MoS2')
run_pbe_calculation()
run_hse_calculation()
os.chdir('../')

I told you it was easy. Your directories should look something like this:

MoS2/
  POSCAR   KPOINTS   INCAR   POTCAR   vdw_kernel.bindat   runjob
  pbe_bands/
    POSCAR   KPOINTS   INCAR   POTCAR   runjob
  hse_bands/
    POSCAR   KPOINTS   INCAR   POTCAR   runjob

Plotting DOS and band structures

After both calculations are done, you can plot the two band structures and their corresponding densities of states like so:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import plot_band_structure,\
    plot_density_of_states


os.chdir('MoS2/pbe_bands')
plot_band_structure()
plot_density_of_states()
os.chdir('../hse_bands')
plot_band_structure()
plot_density_of_states()
os.chdir('../../')

Normal Bands

Also hopefully very easy. Thanks to the powerful tools in pymatgen, it's also easy to get some more cool insights from these band structures. In mpinterfaces.mat2d.electronic_structure.analysis you can also plot band structures that are colored according to each eigenvalue's projection onto an element (plot_color_projected_bands() and plot_elt_projected_bands() both do this. plot_color_projected_bands() looks cooler in my opinion, but only works for binary materials) or even onto specific orbitals with plot_orb_projected_bands(). plot_orb_projected_bands() is different from the other two in that it requires an argument, orbitals, to specify which orbital projections to plot. An example in our case might be:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import plot_band_structure


orbitals = {'Mo': ['s', 'd'], 'S': 'p'}
os.chdir('MoS2/pbe_bands')
plot_orb_projected_bands(orbitals)
os.chdir('../hse_bands')
plot_orb_projected_bands(orbitals)
os.chdir('../../')

Orbital Bands

Finding and plotting band edges

Another interesting thing to analyze are the material's band edge locations. We already have the data to get them, and they're useful for designing heterojunctions and photocatalysts. The convention is to calculate the band edge locations relative to a fixed potential- for 2D materials it's convenient to use the vacuum potential. The following script will get you a material's CBM and VBM:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import get_band_edges


os.chdir('MoS2/pbe_bands')
print 'PBE edges', get_band_edges()
os.chdir('../hse_bands')
print 'HSE edges', get_band_edges()
os.chdir('../../')

And then if you want to plot the band edges of several materials together, there's a function to do that automatically. If, for example, you have the following directories:

MoS2/
  pbe_bands/
VS2/
  pbe_bands/
BN/
  pbe_bands/

Then the following script will plot all of their band edges:

from mpinterfaces.mat2d.electronic_structure.analysis import plot_band_alignments


plot_band_alignments(['MoS2', 'VS2', 'BN'], run_type='PBE')

Band Alignments

They will all be plotted on top of the redox potential edges of H2O; those with edges enveloping the water band might be used as photocatalysts.

Part 2: advanced stuff

Maybe you're bored with plotting band structures and band edges. Fair enough, there are functions in here for you too.

Calculating effective masses

If you want to calculate the effective masses of electrons and holes in a semiconductor, this function is for you:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import get_effective_mass


os.chdir('MoS2/pbe_bands')
print get_effective_mass()
os.chdir('../../')

That will give you a dictionary of results. You can check the documentation on get_effective_mass() for details on what it returns.

Calculating Fermi Velocities

The fermi velocity of a metal can be calculated from the slopes of the bands crossing the fermi level. This value gives insight into the nature of electron transport in the material, and can be retrieved using the get_fermi_velcities() function:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import get_fermi_velocities


os.chdir('VS2/pbe_bands')
print get_fermi_velocities()
os.chdir('../')

The values returned are in Ansgtroms/s and are in order of the band indices as they occur in the EIGENVAL file. It should be noted that these slopes are calculated based on the KPOINTS immediately before and immediately after the band crosses the fermi level, so KPOINT paths that are extremely fine or coarse might not give the most meaningful results.

Rashba spin texture

Should you have a material without centrosymmetry and with large atoms for which spin-orbit coupling (SOC) could have significant effects, you might want to re-calculate its band structure with SOC turned on. You have to do that yourself; there's no function in mpinterfaces.mat2d for that but it's not too hard. If you notice that in the SOC calculation, the CBm or VBM have been split into two separate bands, you're probably looking at the Rashba effect.

At this point, you should generate a fine mesh of k-points around the k-point where the crossing occurs (in the example below it's Gamma) with mpinterfaces.mat2d.utils.write_circle_mesh_kpoints() and run another calculation with the same INCAR that you used for the SOC band structure calculation:

import os

from mpinterfaces.mat2d.utils import write_circle_mesh_kpoints


os.chdir('BiTeCl/SOC_bands')  # Just an example
write_circle_mesh_kpoints(center=(0, 0, 0), radius=0.1, resolution=20)

resolution is the number of mesh points along the x- and y- radii of the mesh. After this, you can submit the job however you want.

To plot the spin texture of the two cone-shaped bands (one outer and one inner), we made plot_spin_texture(). Please note that you need to figure out which band numbers are the two that have split using some other method. mpinterfaces.mat2d can't do that yet, but maybe someday it will. You also need to tell it the x and y coordinates of the center of the k-mesh you made above:

import os

from mpinterfaces.mat2d.electronic_structure.analysis import plot_spin_texture


os.chdir('BiTeCl/SOC_bands')
plot_spin_texture(inner_index=34, outer_index=35, center=(0, 0))

Note that the image below has been put together from the outputs of plot_spin_texture(). Spin Texture

That's pretty much everything you can do with the electronic_structure module.