Skip to Content
Back

Drive a crystal from a TOML file

Getting Started

TOML configs are the canonical way to share a simulation: every parameter (geometry, grid, k-path, solver) lives in one file you can version-control. BulkDriver.run_streaming() yields one dict per job, so even a single-job run reads naturally as a for loop, ready to grow into a sweep without rewriting the loop body.

Explorer
crystal-from-toml/
run.py
1from blaze import BulkDriver
2
3# Everything about the crystal lives in a version-controllable TOML file.
4driver = BulkDriver("crystal.toml")
5
6# run_streaming() yields one result dict per job (here: a single job).
7for result in driver.run_streaming():
8    print(result["num_bands"], "bands ×", result["num_k_points"], "k-points")

Band diagram

Run the example to see the band diagram.

Result · BandResult

Run the example to inspect the result object.