Plotting filtered electronic band structures #

In this tutorial, we show how to upload the results of your DFT band-structure files to DFT-Hub, select certain projections, and generate, customize, and export a band structure.

Upload the electronic band structure files #

The first step is to upload the required files from your DFT simulation. The upload panel indicates which files can be provided. Not all files are mandatory; however, the file that contains the band information is essential (for example, PROCAR is required for a VASP simulation). In this section, you are also asked to provide the Fermi energy. If the Fermi energy is given, the plot will automatically shift the energies so that the Fermi level is set to zero.

Screenshot of the upload panel indicating the required band-structure files

After selecting the files you can proceed by clicking on the Parse button.

Select filters/projections #

To plot a filtered electronic band structure, first add a filter by clicking the Add Filter button. This will automatically check the Plot filtered bands checkbox and uncheck Plot plain bands. If you also want to show the plain bands, re-enable the Plot plain bands checkbox. You can add multiple filters and overlay them in the same figure.

Screenshot of the add filter button

Each time you click the Add Filter button, a new filter panel is added where you can specify the settings for that filter. You can remove any filter by clicking Remove. When using multiple filters, make sure to select the same values for line width, marker size, vmin, and vmax so the plots remain visually consistent.

Coloring scheme and dynamic width #

There are two coloring modes: colormap and solid color. You can switch between them using the radio buttons.

Screenshot of the coloring panel for filtered electronic band structure

Colormap: selecting the colormap radio button activates the dropdown menu where you can choose a colormap from a searchable dropdown menu. A list of available colormaps can be found on the matplotlib website. You can reverse the direction of the colormap by checking the Reverse checkbox.

Solid color: selecting the solid color radio button activates the browser’s color picker. For this option to produce a meaningful visualization, it is recommended to enable Dynamic width by checking its checkbox.

Dynamic width: when dynamic width is enabled, the line width scales with the selected projection value. Thicker lines correspond to larger projection values.

Line and marker #

The Line and Marker panel controls the line style, line width, markers, and marker size.

Screenshot of the line and marker panel for filtered electronic band structure

Line: use the dropdown menu to choose the line style (solid, dashed, dotted). You can remove the line completely by selecting none. This is useful when you want to display only markers and have Plot plain bands enabled.

Width: set the line width by entering a number (in pixels). If dynamic width is selected, this value is used as a multiplier.

Marker: choose a marker shape using the dropdown menu. The selected shape will appear at each sampled k-point along the band. You can remove markers by selecting none.

Size: set the marker size by entering a number (in pixels). If dynamic width is selected, this value is also used as a multiplier.

Vmin, Vmax, and opacity #

This panel controls the minimum and maximum projection values as well as the item opacity.

Screenshot of the vmin, vmax, and opacity panel for filtered electronic band structure

Vmin: set the minimum projection value that will be mapped to the lowest color, width, or size.

Vmax: set the maximum projection value that will be mapped to the lowest color, width, or size.

Opacity: set the opacity of item to any value between 0 and 1, where 0 means fully transparent and 1 means fully opaque.

Label and smoothing #

This panel controls the legend label and curve smoothing.

Screenshot of the label and smoothing panel for filtered electronic band structure

Label: set the legend label for this filter.

Smooth: select a smoothing value using the slider. Smoothing is applied using a Catmull-Rom spline. We recommend using smoothing only for exploratory plots and relying on a denser k-point sampling for publication-quality figures.

Selecting atomic, orbital, and spin filters #

Each time you add a filter, a table listing all atoms, orbitals, and spin channels (for non-collinear simulations) is added to the page so you can select any specific projection you need. By checking or unchecking each box, you include or exclude that selection from the filter, respectively.

Screenshot of the filter table with atoms categorized under a single Ion group

You can access any atom by expanding the collapsible ▸ Ions button. If the files provided in the upload section contain information about the crystal structure (for example, a POSCAR file for VASP), the table will group atoms of the same species together and replace “Ion” with the species name in the collapsible button.

Screenshot of the filter table with atoms categorized by species

The first row for each species and the first column of the table can be used to apply changes to all entries in that row or column, respectively.

If the simulation is non-collinear, three additional columns for Sx, Sy, and Sz will be added.

Screenshot of the filter table with atoms categorized by species, including spin columns

Plot and export the figure #

After uploading the input files and configuring the settings, the band structure can be visualized in the plot area. The central panel displays the band-structure plot, and the surrounding controls let you generate, clear, and download the figure.

To create the plot, click the Plot button. The band structure will be rendered in the chart area. If the plot is wider than the available space, you can scroll horizontally using the scroll bar beneath the figure to inspect different regions of the Brillouin zone.

If you want to clear the current figure and start over (for example, after changing the input files or settings), use the Reset button. This will remove the existing plot and return the plot area to its initial state.

The Download split button allows you to export the current band-structure plot as an image. Clicking the main Download button will save the figure using the default export option. By clicking the small arrow next to it, you open a menu where you can choose the desired format: PNG, JPEG, or SVG. This makes it easy to include the band-structure plot in presentations, reports, or publications.

Band-structure plot area with plot, reset, and download controls