vibeqc.SmearingOptions¶
- class vibeqc.SmearingOptions(temperature=0.0, flavor='fermi-dirac', mp_order=1, source='explicit', reason='')[source]¶
Bases:
objectCanonical user-facing smearing configuration.
temperatureis the electronic energyk_B Tin Hartree (matching the v0.4.0 contract on the C++ options surface).temperature == 0.0disables smearing — drivers fast-path on it.flavorselects the occupation function."fermi-dirac"is the only flavor implemented at v0.10.x;"methfessel-paxton"(M6) and"marzari-vanderbilt"(M7) construct without erroring so user code can pre-stage settings, butapply_smearingraisesNotImplementedErroruntil the relevant milestone lands.mp_orderis the Hermite-polynomial order for Methfessel-Paxton; ignored for other flavors.sourceandreasonmirrorSmearingResolutionso SCF logs can say “preset:metal” or “explicit:kelvin” rather than just a number.- __init__(temperature=0.0, flavor='fermi-dirac', mp_order=1, source='explicit', reason='')¶
Methods
__init__([temperature, flavor, mp_order, ...])from_legacy_kwarg(smearing_temperature, *[, ...])Build from the v0.4.0
smearing_temperature: floatkwarg.from_user([value, unit, flavor, mp_order, ...])Resolve user-facing temperature input to canonical options.
Attributes
- classmethod from_legacy_kwarg(smearing_temperature, *, flavor='fermi-dirac', mp_order=1)[source]¶
Build from the v0.4.0
smearing_temperature: floatkwarg.This is the internal driver-side constructor that bridges the legacy C++ option field to the new Python dataclass without involving the user. No deprecation warning here — the warning fires at the user-facing kwarg boundary.
- Parameters:
- Return type:
- classmethod from_user(value=0.0, *, unit='hartree', flavor='fermi-dirac', mp_order=1, metallic=None, band_gap_hartree=None, n_electrons=None)[source]¶
Resolve user-facing temperature input to canonical options.
Accepts everything
resolve_smearing_temperatureaccepts (numeric width,"1000 K","0.1 eV","metal","auto", etc.).