pub struct LatticeParameterization { /* private fields */ }Expand description
Independent physical lattice variables for one exact crystallographic setting.
Implementations§
Source§impl LatticeParameterization
impl LatticeParameterization
Sourcepub fn new(
space_group: SpaceGroup,
cell: UnitCell,
) -> Result<Self, LatticeError>
pub fn new( space_group: SpaceGroup, cell: UnitCell, ) -> Result<Self, LatticeError>
Derive a setting-aware independent-variable mapping.
§Errors
Returns LatticeError when the cell is incompatible with the group or
the exact metric basis does not describe a supported conventional setting.
Sourcepub const fn space_group(&self) -> &SpaceGroup
pub const fn space_group(&self) -> &SpaceGroup
Borrow the exact symmetry group.
Sourcepub fn parameter_names(&self) -> &[String]
pub fn parameter_names(&self) -> &[String]
Borrow independent parameter names in stable order.
Sourcepub const fn reference_cell(&self) -> UnitCell
pub const fn reference_cell(&self) -> UnitCell
Return the reference cell used for fixed components.
Sourcepub fn values_from_cell(&self, cell: UnitCell) -> Result<Vec<f64>, LatticeError>
pub fn values_from_cell(&self, cell: UnitCell) -> Result<Vec<f64>, LatticeError>
Extract independent values after checking setting compatibility.
§Errors
Returns LatticeError if the supplied cell is incompatible.
Sourcepub fn to_cell(&self, values: &[f64]) -> Result<UnitCell, LatticeError>
pub fn to_cell(&self, values: &[f64]) -> Result<UnitCell, LatticeError>
Expand independent values into all six direct-cell parameters.
§Errors
Returns LatticeError for shape, finite, or physical-cell failures.
Sourcepub fn cell_jacobian(&self, values: &[f64]) -> Result<Vec<f64>, LatticeError>
pub fn cell_jacobian(&self, values: &[f64]) -> Result<Vec<f64>, LatticeError>
Return row-major d(a,b,c,alpha,beta,gamma)/d(independent).
§Errors
Returns LatticeError if values do not describe a physical cell.
Trait Implementations§
Source§impl Clone for LatticeParameterization
impl Clone for LatticeParameterization
Source§fn clone(&self) -> LatticeParameterization
fn clone(&self) -> LatticeParameterization
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LatticeParameterization
impl Debug for LatticeParameterization
Source§impl PartialEq for LatticeParameterization
impl PartialEq for LatticeParameterization
impl StructuralPartialEq for LatticeParameterization
Auto Trait Implementations§
impl Freeze for LatticeParameterization
impl RefUnwindSafe for LatticeParameterization
impl Send for LatticeParameterization
impl Sync for LatticeParameterization
impl Unpin for LatticeParameterization
impl UnsafeUnpin for LatticeParameterization
impl UnwindSafe for LatticeParameterization
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.