Examples
Runnable scripts live in the package’s examples/ directory. Each one
is self-contained and operates on artifacts produced by the API.
File |
What it does |
|---|---|
|
Default mode: upload a pymatgen |
|
One |
|
|
|
|
|
|
|
|
|
|
|
Three more static WannierBerri quantities versus Fermi energy on a single sweep: cumulative DOS (carrier-count integral), quantum metric (Fermi-sea integral), and nonlinear Drude conductivity (a centrosymmetric-zero sanity check on Bi2Se3). |
|
Frequency-dependent Kubo optical conductivity
\(\sigma_{\alpha\beta}(\omega)\) from
|
|
Heads-only fine-tune on a SET of (API-embedding,
user-Wannier-Hamiltonian) pairs via
|
|
|
Each script targets a single workflow stage so customers can pick the slice they care about and run it in isolation. They share three conventions worth knowing about:
Single material per script. Every example takes one
Structure(from a.ciffile) at the top and threads it through the pipeline. Multi-material batches are not in the examples by design — looping over a CIF directory is one line of Python on top.Default device is CPU. Every post-processing class accepts a
device="cuda"argument; the examples leave it at"cpu"so they run anywhere. Switching to GPU is a one-line change at the top of any of them.Results are saved as both figures AND raw arrays. Every post-processing class returns a Result dataclass with
.figure*matplotlib objects AND an.as_dict()fornp.savez. Examples demonstrate both so customers see the full surface.