Expand description
§vanhove
Model densities of states with integrable van Hove singularities, their convolutions, and accurate integration of spectral functions.
Many quantities in condensed matter physics are frequency integrals $\int A(\omega) f(\omega) d\omega$ of a spectral function $A(\omega)$ against some function $f(\omega)$. Doing such integrals numerically is awkward whenever $A(\omega)$ has van Hove singularities: they defeat generic adaptive quadrature even though the integrals themselves converge.
This crate handles them by splitting each singular model into a smooth part $R(\omega)$ and analytically known asymptotics $S_p(\omega)$ around every singular point $\Omega_p$,
$$ \int A(\omega) f(\omega) d\omega = \int R(\omega) f(\omega) d\omega + \sum_p \int S_p(\omega) [f(\omega) - f(\Omega_p)] d\omega + \sum_p f(\Omega_p) \int S_p(\omega) d\omega. $$
Only the first two terms are integrated numerically, and both integrands are regular; the last term uses a closed-form value of $\int S_p(\omega) d\omega$. The numerical work is delegated to the bilby quadrature.
§Models
| Function | Density of states |
|---|---|
discrete(levels, weights) | Sum of discrete levels, $\sum_p w_p \delta(\omega - \varepsilon_p)$ |
flat(eps, d, delta) | Flat band with Fermi-like edges, sharp for delta = 0 |
gaussian(eps, sigma) | Gaussian |
semicircle(eps, r) | Semicircle (Wigner), square-root band edges |
powerlaw(eps, r, w) | One-sided power-law band edge, divergent for r < 0 |
pseudogap(eps, r, d) | Pseudogap, $\lvert\omega-\epsilon\rvert^r$ at the band center |
chain(eps, t) | Linear chain, square-root divergent edges |
bethe(z, eps, t) | Bethe lattice of coordination number z, square-root band edges |
square(eps, t) | Square lattice, logarithmic van Hove peak |
simple_cubic(eps, t) | Simple cubic lattice, square-root cusps at four van Hove points |
triangular(eps, t) | Triangular lattice, asymmetric with a logarithmic peak |
honeycomb(eps, t) | Honeycomb lattice, two logarithmic peaks about a Dirac point |
kagome(eps, t) | Kagome lattice, flat band $\delta$-peak at a band edge |
lieb(eps, t) | Lieb lattice, flat band $\delta$-peak at the band center |
Every model except discrete() is normalized to unit spectral weight. Spectral
functions can be scaled by real numbers, negated, added and subtracted, so mixed
discrete/continuous spectra are built by simple arithmetic. They can also be
displaced in frequency (shifted()), reflected (mirrored()) and convolved
(conv()). broadened() evaluates a Lorentzian-broadened spectral function at a
given frequency, and precomputed() replaces a regular part that is expensive to
evaluate with a Chebyshev interpolation of it.
A model defined outside the crate implements the ContinuousSF trait, supplying
its support, its regular part and the closed form of each singular part, and
SpectralFunction::from_continuous() turns it into a spectral function.
§Convolution
conv() computes the convolution $\int A(\nu) B(\omega - \nu) d\nu$ of two
spectral functions. The singular structure of the result is derived in closed
form: its singular points are the pairwise sums of the frequencies where either
operand stops being smooth, and the asymptotics at each of them follows from those
of the operands. Only the smooth remainder of the convolution is interpolated, so
the result can be integrated and convolved again like any built-in model. The
continuous parts of both operands must have bounded supports.
§Usage
[dependencies]
vanhove = "0.2"use num_complex::Complex64;
use vanhove::models::{chain, discrete, semicircle, square};
// 80% square-lattice band plus 20% of a single discrete level at ω = 3
let dos = 0.8 * square(0.0, 1.0) + 0.2 * discrete(&[3.0], &[1.0]);
assert_eq!(dos.total_weight(), 1.0);
// First spectral moment ∫A(ω) ω dω
let m1 = dos.integrate(|omega| omega, None).unwrap();
assert!(m1.converged);
assert!((m1.value - 0.6).abs() < 1e-10);
// Retarded Green's function of a semicircular band at z = 0.5 + 10⁻³i,
// just above the real axis
let z = Complex64::new(0.5, 1e-3);
let g = semicircle(0.0, 2.0)
.integrate_complex(|omega| 1.0 / (z - omega), None)
.unwrap();
assert!(g.value.im < 0.0);
// Two linear chains convolve into the square lattice
let sq = chain(0.0, 1.0).conv(&chain(0.0, 1.0), None);
assert!((sq.continuous_at(1.0) - square(0.0, 1.0).continuous_at(1.0)).abs() < 1e-9);integrate() takes an optional absolute tolerance (1e-10 by default) and
returns a Result, since the underlying adaptive quadrature refuses a request it
cannot make sense of, such as a tolerance that is not a number. A request it accepts
yields an Integral, which contains the value, an estimate of its absolute error,
and whether each quadrature it is assembled from has reached the tolerance.
SpectralFunction is Send and Sync, so a frequency scan can be spread over
threads, each evaluating continuous_at(), integrate() or broadened() at
frequencies of its own.
§Documentation
API documentation is available at https://docs.rs/vanhove. The mathematics
behind the splitting, integrate() and conv() is laid out in the
theory module.
Formulas in the docs are rendered with KaTeX, so building them locally requires the extra header:
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps --open§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Modules§
- discrete
- Discrete spectral function.
- interp
- Chebyshev interpolation of the regular part of a spectral function.
- models
- Model densities of states commonly used in physics.
- segment
- Segments of the frequency axis.
- singularity
- Closed-form description of an integrable singularity of a spectral function.
- theory
- The mathematics underneath.
Structs§
- Integral
- Integral computed by quadrature, with an estimate of its absolute error.
- Spectral
Function - Spectral function as a weighted sum of discrete resonances and continuous contributions.
Traits§
- ContinuousSF
- Continuous spectral function possibly containing integrable singularities.