Band Structure, DOS, and Brillouin Zone

Integrated visualization of band structures, density of states, and Brillouin zone with k-path synchronization.

Electronic Bands with Fermi Level

Electronic band structures display the Fermi level (EF) as a dashed red line when efermi is present. Note: this example uses bands and DOS from different materials for demonstration.

<script>
  import { BrillouinBandsDos } from 'matterviz'
  import { electronic_bands } from '$site/electronic/bands'
  import { dos_spin_polarization } from '$site/electronic/dos'
  import { structure_map } from '$site/structures'
</script>

<BrillouinBandsDos
  band_structs={electronic_bands.cao_2605}
  doses={dos_spin_polarization}
  structure={structure_map.get('mp-1')}
  bands_props={{ y_axis: { label: 'Energy (eV)' } }}
  dos_props={{ y_axis: { label: '' } }}
  class="full-bleed"
  style="margin-block: 1em 2em"
/>

Phonon Bands with Custom Styling

Phonon band structure with acoustic/optical mode styling:

<script>
  import { BrillouinBandsDos } from 'matterviz'
  import { phonon_bands, phonon_data, phonon_dos } from '$site/phonons'

  const bands_props = {
    line_kwargs: {
      acoustic: { stroke: '#e74c3c', stroke_width: 2 },
      optical: { stroke: '#3498db', stroke_width: 1.5 },
    },
  }
</script>

<BrillouinBandsDos
  band_structs={[phonon_bands['mp-2758-Sr4Se4-pbe']]}
  doses={[phonon_dos['mp-2758-Sr4Se4-pbe']]}
  structure={phonon_data['mp-2758-Sr4Se4-pbe']?.primitive}
  {bands_props}
  dos_props={{ normalize: 'max', sigma: 0.15 }}
  style="margin-block: 1em 2em"
  class="full-bleed"
/>

Features

Comparing DFT vs ML potential

Compare phonon predictions from DFT and machine learning potentials:

<script>
  import { BrillouinBandsDos } from 'matterviz'
  import { phonon_bands, phonon_data, phonon_dos } from '$site/phonons'
</script>

<BrillouinBandsDos
  band_structs={{
    'DFT (PBE)': phonon_bands['mp-2667-Cs1Au1-pbe'],
    'CHGNet': phonon_bands['mp-2667-Cs1Au1-chgnet-v0.3.0'],
  }}
  doses={{
    'DFT (PBE)': phonon_dos['mp-2667-Cs1Au1-pbe'],
    'CHGNet': phonon_dos['mp-2667-Cs1Au1-chgnet-v0.3.0'],
  }}
  structure={phonon_data['mp-2667-Cs1Au1-pbe']?.primitive}
  dos_props={{ normalize: 'max', sigma: 0.15 }}
  class="full-bleed"
  style="margin-block: 1em 2em"
/>

Custom Brillouin zone appearance with multiple inputs

Customize the Brillouin zone appearance (colors, opacity, edges) via bz_props.

<script>
  import { BrillouinBandsDos } from 'matterviz'
  import { phonon_bands, phonon_data, phonon_dos } from '$site/phonons'
</script>

<BrillouinBandsDos
  band_structs={{
    'DFT (PBE)': phonon_bands['mp-2758-Sr4Se4-pbe'],
    'M3GNet': phonon_bands['mp-2758-Sr4Se4-m3gnet'],
    'CHGNet': phonon_bands['mp-2758-Sr4Se4-chgnet-v0.3.0'],
  }}
  doses={{
    'DFT (PBE)': phonon_dos['mp-2758-Sr4Se4-pbe'],
    'M3GNet': phonon_dos['mp-2758-Sr4Se4-m3gnet'],
    'CHGNet': phonon_dos['mp-2758-Sr4Se4-chgnet-v0.3.0'],
  }}
  structure={phonon_data['mp-2758-Sr4Se4-pbe']?.primitive}
  dos_props={{ normalize: 'max', sigma: 0.15 }}
  bz_props={{ surface_color: '#9b59b6', surface_opacity: 0.5, edge_color: '#2c3e50' }}
  class="full-bleed"
  style="margin-block: 1em 2em"
/>