---
title: "Thermoelectrics API: 5–7x faster band structures, and an HSE06 gap fix that didn't work"
description: "We moved the DFT band step to one MPI rank per core, and tested an HSE06 scissor correction for the PBE band gap. The first is live; the second we are not shipping."
url: "https://ouro.foundation/posts/mmoderwell/thermoelectrics-api-5-7x-faster-band-structures-and-an-hse06-gap-fix-that-didnt-work"
id: "01a0f8f7-378e-735a-a4e9-15d8b9e0f691"
type: "post"
---

# Thermoelectrics API: 5–7x faster band structures, and an HSE06 gap fix that didn't work

Post by @mmoderwell in #thermoelectrics (all) · 2026-10-01

- Asset id: `01a0f8f7-378e-735a-a4e9-15d8b9e0f691`
- Page: https://ouro.foundation/posts/mmoderwell/thermoelectrics-api-5-7x-faster-band-structures-and-an-hse06-gap-fix-that-didnt-work

Two changes were on the table for the [Thermoelectrics API](https://ouro.foundation/services/mmoderwell/thermoelectrics-api) today. One is live. The other we tested and decided not to ship, and the reason is worth sharing.

## What changed: the band-structure step is 5–7x faster

The `/seebeck` and `/predict` routes get their electronic transport from an ABACUS band structure (PBE, with spin-orbit coupling for Sn and heavier), which BoltzTraP2 then turns into Seebeck, conductivity and electronic thermal conductivity.

That ABACUS step was running 2 MPI ranks with 4 OpenMP threads each on an 8-core container. It now runs 8 ranks with 1 thread each, splits the k-points into one pool per rank (`kpar`), and pins OpenBLAS to one thread per rank so the ranks do not oversubscribe the cores. This is the same layout that made the [DFT API faster](https://ouro.foundation/posts/mmoderwell/ouro-dft-was-running-at-a-fraction-of-its-speed-one-environment-variable-and-a-process-layout-make-scf-56-faster-at-a-fifth-of-the-cost).

Same four materials, same 8-core containers, old layout against new:

> Embedded dataset: [Thermoelectrics ABACUS layout benchmark](https://ouro.foundation/datasets/mmoderwell/thermoelectrics-abacus-layout-benchmark)

| Material | Atoms | SOC | Old (s) | New (s) | Speedup | KS gap, both layouts (eV) |
| -------- | ----- | --- | ------- | ------- | ------- | ------------------------- |
| Si | 2 | no | 10 | 4 | 2.5x | 0.644 |
| PbTe | 2 | yes | 176 | 34 | 5.2x | 0.196 |
| Bi2Te3 | 5 | yes | 411 | 61 | 6.7x | 0.165 |
| SnSe | 8 | yes | 661 | 119 | 5.6x | 0.499 |

The gaps are identical between layouts, so this is purely a speed change. The gain is largest with spin-orbit coupling: ABACUS turns symmetry off there, so the band step runs over the full k-grid, and k-points parallelize almost perfectly across ranks.

Two caveats. These are single runs, so read the ratios as approximate. And `/predict` runs the band step alongside the phonon calculation, so it only gets faster when the band step was the slower of the two; `/seebeck` gets the speedup directly.

## What we tested: an HSE06 correction for the band gap

PBE underestimates band gaps, and the pipeline feeds PBE bands straight into BoltzTraP2. A gap that is too small turns on minority carriers too early, which lowers the Seebeck coefficient and raises the electronic thermal conductivity at high temperature. So a better gap should mean better transport at 700–900 K.

Running the whole dense band structure with a hybrid functional is too expensive. The standard cheaper route is a scissor shift:

1. Run a coarse-mesh SCF with PBE and with HSE06, both without spin-orbit coupling.
2. Take the difference in gap as the shift.
3. Move the conduction bands of the dense PBE(+SOC) band structure up by that shift.

We built ABACUS 3.10.1 with LibRI for exact exchange and ran this on four well-known materials:

> Embedded dataset: [HSE06 scissor test on four thermoelectrics](https://ouro.foundation/datasets/mmoderwell/hse06-scissor-test-on-four-thermoelectrics)

| Material | PBE(+SOC) (eV) | HSE06 − PBE shift (eV) | Shifted gap (eV) | Experiment (eV) | Error before (eV) | Error after (eV) |
| -------- | -------------- | ---------------------- | ---------------- | --------------- | ----------------- | ---------------- |
| Si | 0.64 | 0.58 | 1.23 | 1.12 | −0.48 | +0.11 |
| SnSe | 0.50 | 0.54 | 1.04 | 0.86 | −0.36 | +0.18 |
| PbTe | 0.20 | 0.41 | 0.61 | 0.31 | −0.11 | +0.30 |
| Bi2Te3 | 0.17 | 0.31 | 0.47 | 0.15 | +0.02 | +0.32 |

## What we learned

**The shift helps where spin-orbit coupling is weak and hurts where it sets the gap.** Si and SnSe get much closer to experiment. PbTe and Bi2Te3 get much worse: the corrected gaps are two to three times the experimental ones.

**The spin-orbit reduction of the gap is not the same in HSE06 as in PBE.** A scissor shift assumes the two corrections simply add. In PbTe, spin-orbit coupling takes the PBE gap from 0.82 eV down to 0.20 eV. For the shifted result to match experiment, it would have to remove about 0.9 eV from the HSE06 gap of 1.23 eV. A shift computed without spin-orbit coupling cannot know that. In Bi2Te3 the gap exists because of spin-orbit band inversion, so a rigid shift is not even the right picture.

**PBE with spin-orbit coupling is already close for the heavy narrow-gap materials.** It lands within about 0.1 eV of experiment on both PbTe and Bi2Te3. That is partly error cancellation, but for screening it is the better number.

**HSE06 is expensive in this setup.** The coarse-mesh HSE06 run took 14 minutes for PbTe, 17 for Bi2Te3 and 35 for SnSe, against 1–2 minutes for the entire PBE band step on the new layout. It also needed a much larger memory allocation than the PBE runs.

So the gap stays PBE(+SOC) for now, and the API continues to label it that way. A correction limited to structures without heavy elements is still an option, since that is where PBE's error is largest and the shift is trustworthy.

## Limits of this test

- Single runs on one coarse mesh (k-spacing 0.3), with the DZP numerical-orbital basis and default exact-exchange settings. Nothing was tuned.
- Four materials. The pattern is physically sensible, but it is a small sample.
- Experimental gaps are the usual room-temperature literature values.
- The screening preset's k-mesh may not be fully converged for the gap: one PbTe check on the coarser screening mesh gave 0.13 eV against 0.20 eV on the denser mesh. We have not followed that up yet.
- None of this touches the bigger limit on absolute ZT, which is the constant relaxation time (\(\tau = 10^{-14}\) s) used for every material. Seebeck does not depend on it, but conductivity and ZT scale with it.

If you have a material where the PBE gap is clearly wrong and it matters for your screening, reply here. Real cases would help decide whether the light-element correction is worth building.

## Assets in this post

- [Thermoelectrics ABACUS layout benchmark](https://ouro.foundation/datasets/mmoderwell/thermoelectrics-abacus-layout-benchmark) (dataset, id `01a0f8f6-8b1b-766a-be5f-82542b05d30f`)
- [HSE06 scissor test on four thermoelectrics](https://ouro.foundation/datasets/mmoderwell/hse06-scissor-test-on-four-thermoelectrics) (dataset, id `01a0f8f6-ac03-716e-9e66-76b3d3347e8e`)
- [Thermoelectrics API](https://ouro.foundation/services/mmoderwell/thermoelectrics-api) (service, id `7ad9122e-8149-4802-a0f7-0b856f62d66a`)
- [Ouro DFT was running at a fraction of its speed: one environment variable and a process layout make SCF 5–6× faster at a fifth of the cost](https://ouro.foundation/posts/mmoderwell/ouro-dft-was-running-at-a-fraction-of-its-speed-one-environment-variable-and-a-process-layout-make-scf-56-faster-at-a-fifth-of-the-cost) (post, id `01a0ebb9-d195-7657-8652-04bbda5f22f2`)
