Band Alignment Plotting Tutorial#

In this tutorial we will exemplify how to plot a band alignment diagram using data from previous calculations, resulting in a figure similar to the one below.

The input data#

The function requires a dictionary matching the material names to their band edges (EA, IP), as shown below:

energies = {
    'ZnO': [4.4, 7.7], 
    'MOF-5': [2.7, 7.3],
    'HKUST-1': [5.1, 6.0], 
    'ZIF-8': [0.9, 6.4], 
    'COF-1M': [1.3, 4.7], 
    'CPO-27-Mg': [2.9, 5.9],
    'MIL-125': [3.8, 7.6], 
    'TiO2': [4.8, 7.8]
}

Run the function#

import macrodensity as md

fig = md.plotting.energy_band_alignment_diagram(
    energies=energies,
)
fig
Figure saved as BandAlignment.pdf
../../_images/ac3abf099924070317ed6156ddbc37c44d87ced26e20bc845cfe3d246cf85a84.png

We can improve the plot above by adding a bit of space at the bottom and reducing the size of the arrow heads. We can do this using the options ylims and arrowhead:

fig = md.plotting.energy_band_alignment_diagram(energies, ylims=(-10, 0.0), arrowhead=0.15)
fig
Figure saved as BandAlignment.pdf
../../_images/0c3403e1fc4b157932f8195b894217d8e021611b657ac6a538271aefaaefd51b.png

Adding reference lines#

Finally, we can also add reference lines to show the redox potentials of water. To do this, we define a dictionary for the reference points, where the key is the name of the reference point and the value is the potential (where the potential is referenced against the vacuum level, just like the EA/IP are). Then we pass this dictionary to the plotting function with the flag references.

water_redox = {'E(H$_2$O/O$_2$)': 5.75, 'E(H$^+$/H$_2$)': 4.40}

fig = md.plotting.energy_band_alignment_diagram(
    energies,
    ylims=(-10, 0),
    arrowhead=0.15, 
    references=water_redox,
)
fig
Figure saved as BandAlignment.pdf
../../_images/82020f33813d5e44c309672358cab5e939303c9a7ef43c63c2c9de4dc4364511.png

Finally, if we want to tweak the colour scheme, we can use the cols option:

fig = md.plotting.energy_band_alignment_diagram(
    energies,
    ylims=(-10, 0),
    arrowhead=0.15, 
    cols=['#e6711e','#1e93e6'],
    references=water_redox,
    textsize=24 # Increase font size
)
fig
Figure saved as BandAlignment.pdf
../../_images/58c001ecf47d997cfc62322d501c1639d6f5c4c4c5ea3576f308e1f2e6c0bdd4.png