pub enum TbError {
Show 50 variants
Io(Error),
FileParse {
file: String,
message: String,
},
InvalidOrbitalProjection(String),
InvalidAtomType(String),
DirectoryCreation {
path: String,
message: String,
},
FileCreation {
path: String,
message: String,
},
Linalg(LinalgError),
Lapack {
routine: &'static str,
info: i32,
},
MatrixInversionFailed,
EigenvalueComputationFailed,
SvdComputationFailed,
DimensionMismatch {
context: String,
expected: usize,
found: usize,
},
InvalidArrayShape {
expected: Vec<usize>,
found: Vec<usize>,
},
UnclosedWilsonLoop(Array1<f64>),
InvalidDirectionIndex {
index: usize,
dim: usize,
},
InvalidSupercellSize(usize),
InvalidShapeIdentifier(usize),
InvalidSupercellMatrix,
SpinNotAllowed(SpinDirection),
InvalidKmeshDimensions(Array1<usize>),
InvalidEnergyRange {
min: f64,
max: f64,
},
OnsiteHoppingMustBeReal(Complex<f64>),
MissingHermitianConjugateHopping {
r: Array1<isize>,
},
InvalidOperationForZeroDimension,
ModelNotInitialized,
NoBandsInEnergyRange,
ConvergenceFailed {
iterations: usize,
},
SkParameterMissing {
param: String,
atom1: AtomType,
atom2: AtomType,
shell: usize,
},
UnsupportedOrbitalCombination(OrbProj, OrbProj),
InvalidSearchRange(i32),
NoShellsFound,
HybridOrbitalNotSupported(String),
NotImplemented(String),
LatticeDimensionError {
expected: usize,
actual: usize,
},
RVectorLengthError {
expected: usize,
actual: usize,
},
ZeroDimKPathError,
PathLengthMismatch {
expected: usize,
actual: usize,
},
InvalidDirection {
index: usize,
dim: usize,
},
InvalidShape {
shape: usize,
supported: Vec<usize>,
},
InvalidDimension {
dim: usize,
supported: Vec<usize>,
},
DuplicateOrbitals,
InvalidSupercellDet {
det: f64,
},
InvalidAtomConfiguration,
TransformationMatrixDimMismatch {
expected: usize,
actual: usize,
},
MissingHermitianConjugate {
r: Array1<isize>,
},
InvalidSpinValue {
spin: usize,
supported: Vec<usize>,
},
ZeroTemperatureNotSupported,
KVectorLengthMismatch {
expected: usize,
actual: usize,
},
LapackEigenFailed {
info: i32,
},
Other(String),
}
Expand description
The primary error type for all fallible operations in this library.
Variants§
Io(Error)
FileParse
InvalidOrbitalProjection(String)
InvalidAtomType(String)
DirectoryCreation
FileCreation
Linalg(LinalgError)
Lapack
MatrixInversionFailed
EigenvalueComputationFailed
SvdComputationFailed
DimensionMismatch
InvalidArrayShape
UnclosedWilsonLoop(Array1<f64>)
InvalidDirectionIndex
InvalidSupercellSize(usize)
InvalidShapeIdentifier(usize)
InvalidSupercellMatrix
SpinNotAllowed(SpinDirection)
InvalidKmeshDimensions(Array1<usize>)
InvalidEnergyRange
OnsiteHoppingMustBeReal(Complex<f64>)
MissingHermitianConjugateHopping
InvalidOperationForZeroDimension
ModelNotInitialized
NoBandsInEnergyRange
ConvergenceFailed
SkParameterMissing
UnsupportedOrbitalCombination(OrbProj, OrbProj)
InvalidSearchRange(i32)
NoShellsFound
HybridOrbitalNotSupported(String)
NotImplemented(String)
LatticeDimensionError
RVectorLengthError
ZeroDimKPathError
PathLengthMismatch
InvalidDirection
InvalidShape
InvalidDimension
DuplicateOrbitals
InvalidSupercellDet
InvalidAtomConfiguration
TransformationMatrixDimMismatch
MissingHermitianConjugate
InvalidSpinValue
ZeroTemperatureNotSupported
KVectorLengthMismatch
LapackEigenFailed
Other(String)
Trait Implementations§
Source§impl Error for TbError
impl Error for TbError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<LinalgError> for TbError
impl From<LinalgError> for TbError
Source§fn from(source: LinalgError) -> Self
fn from(source: LinalgError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TbError
impl !RefUnwindSafe for TbError
impl Send for TbError
impl Sync for TbError
impl Unpin for TbError
impl !UnwindSafe for TbError
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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