Band gap — ASE documentation

### Navigation

- index
- modules |
- Documentation for modules in ASE »
- Density Functional Theory »

# Band gap

`ase.dft.bandgap.` `get_band_gap`(calc, direct=False, spin=None, output=<open file '<stdout>', mode 'w' at 0x7f3ee9ad2150>)

  Calculates the band-gap.

  Parameters:

  calc: Calculator object
    Electronic structure calculator object.
  direct: bool
    Calculate direct band-gap.
  spin: int or None
    For spin-polarized systems, you can use spin=0 or spin=1 to look only at a single spin-channel.
  output: file descriptor
    Use output=None for no text output.

  Rerurns a (gap, k1, k2) tuple where k1 and k2 are the indices of the valence and conduction k-points. For the spin-polarized case, a (gap, (s1, k1), (s2, k2)) tuple is returned.

  Example:

      >>> gap, k1, k2 = get_band_gap(silicon.calc)
      Gap: 1.2 eV
      Transition (v -> c):
          [0.000, 0.000, 0.000] -> [0.500, 0.500, 0.000]
      >>> print(gap, k1, k2)
      1.2 0 5
      >>> gap, k1, k2 = get_band_gap(atoms.calc, direct=True)
      Direct gap: 3.4 eV
      Transition at: [0.000, 0.000, 0.000]
      >>> print(gap, k1, k2)
      3.4 0 0

### Navigation

- index
- modules |
- Documentation for modules in ASE »
- Density Functional Theory »