pub struct Spectrum<'a> { /* private fields */ }Expand description
The kernel polynomial method on the Hamiltonian of a Model on a Region.
Energies are those of the model. Densities are per unit energy and per sample: the density of
states integrates to the number of orbitals of the region. The energy resolution of the
Jackson kernel is about π · half_width / moments (Self::resolution).
Implementations§
Source§impl<'a> Spectrum<'a>
impl<'a> Spectrum<'a>
Sourcepub fn periodic(model: &'a Model, region: &'a Region, periods: &[Cell]) -> Self
pub fn periodic(model: &'a Model, region: &'a Region, periods: &[Cell]) -> Self
The region repeated along periods (cells), e.g. [[n, 0, 0], [0, n, 0]] for an
n × n torus. The spectral bounds come from Gershgorin’s theorem, widened by 1 %.
Sourcepub fn bounds(self, lower: f64, upper: f64) -> Self
pub fn bounds(self, lower: f64, upper: f64) -> Self
Bounds on the spectrum, tighter than Gershgorin’s for a finer resolution. They must contain every eigenvalue (they are widened by 1 %).
Sourcepub fn vectors(self, vectors: usize) -> Self
pub fn vectors(self, vectors: usize) -> Self
Number of random-phase vectors of the stochastic trace (default 10).
Sourcepub fn exact_trace(self) -> Self
pub fn exact_trace(self) -> Self
Exact traces over every basis vector instead of random vectors (small systems).
Sourcepub fn device(self, options: Options) -> Self
pub fn device(self, options: Options) -> Self
Where the density-of-states moments run (CPU by default; see caroli_gpu::Options).
Sourcepub fn scaling(&self) -> (f64, f64)
pub fn scaling(&self) -> (f64, f64)
(centre, half_width) of the rescaling H̃ = (H − centre)/half_width.
Sourcepub fn resolution(&self) -> f64
pub fn resolution(&self) -> f64
Width of the Jackson kernel, π · half_width / moments.
Sourcepub fn hamiltonian(&self) -> &SparseMatrix
pub fn hamiltonian(&self) -> &SparseMatrix
The Hamiltonian (unscaled).
Sourcepub fn dos_moments(&self) -> (Vec<c64>, Report)
pub fn dos_moments(&self) -> (Vec<c64>, Report)
Moments μ_n = g_n Tr T_n(H̃) of the density of states, and where they ran.
Sourcepub fn density(&self, mu: &[c64], energies: &[f64]) -> Vec<f64>
pub fn density(&self, mu: &[c64], energies: &[f64]) -> Vec<f64>
Density per unit energy at energies from moments of H̃ (zero outside the bounds).
Sourcepub fn projected_dos(&self, op: &CMat, energies: &[f64]) -> Vec<f64>
pub fn projected_dos(&self, op: &CMat, energies: &[f64]) -> Vec<f64>
Tr[O δ(E − H)] for a Hermitian on-site operator O (the same matrix on every site, e.g.
a spin or sublattice projector; all sites must carry O.nrows() orbitals).
Sourcepub fn ldos(&self, sites: &[usize], energies: &[f64]) -> Vec<Vec<f64>>
pub fn ldos(&self, sites: &[usize], energies: &[f64]) -> Vec<Vec<f64>>
Local densities of states Σ_a ⟨i, a| δ(E − H) |i, a⟩ of the sites sites (indices into
the region), summed over their orbitals: one curve per site.
Sourcepub fn orbital_ldos(
&self,
sites: &[usize],
energies: &[f64],
) -> Vec<Vec<Vec<f64>>>
pub fn orbital_ldos( &self, sites: &[usize], energies: &[f64], ) -> Vec<Vec<Vec<f64>>>
Local densities of states ⟨i, a| δ(E − H) |i, a⟩ of every orbital a of the sites
sites: one curve per site and orbital. The basis vectors go through the Chebyshev
recursion in blocks, so that the memory stays that of a few blocks of vectors.
Sourcepub fn conductivity(
&self,
a: Vec3,
b: Vec3,
mus: &[f64],
temperature: f64,
) -> Vec<f64>
pub fn conductivity( &self, a: Vec3, b: Vec3, mus: &[f64], temperature: f64, ) -> Vec<f64>
Kubo–Bastin conductivity σ_ab in units of e²/h at the chemical potentials mus and the
temperature temperature (energy units; 0 for a step), for a region periodic in every
direction of the lattice (an n × n torus in 2D). a and b are directions (unit
vectors). The cost grows as moments² per random vector.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Spectrum<'a>
impl<'a> !UnwindSafe for Spectrum<'a>
impl<'a> Freeze for Spectrum<'a>
impl<'a> Send for Spectrum<'a>
impl<'a> Sync for Spectrum<'a>
impl<'a> Unpin for Spectrum<'a>
impl<'a> UnsafeUnpin for Spectrum<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more