Struct qsym2::symmetry::symmetry_symbols::SymmetryClassSymbol
source · pub struct SymmetryClassSymbol<R: Clone + Serialize> { /* private fields */ }
Expand description
Structure to handle conjugacy class symbols.
Implementations§
source§impl<R: Clone + Serialize> SymmetryClassSymbol<R>
impl<R: Clone + Serialize> SymmetryClassSymbol<R>
sourcepub fn new(
symstr: &str,
rep: Option<Vec<R>>,
) -> Result<Self, GenericSymbolParsingError>
pub fn new( symstr: &str, rep: Option<Vec<R>>, ) -> Result<Self, GenericSymbolParsingError>
Creates a class symbol from a string and some representative elements.
Some permissible conjugacy class symbols:
"1||C3||"
"1||C3|^(2)|"
"12||C2|^(5)|"
"2||S|^(z)|(α)"
Note that the prefactor is required.
§Arguments
symstr
- A string to be parsed to give a class symbol.rep
- Optional representative elements for this class.
§Returns
A Result
wrapping the constructed class symbol.
§Panics
Panics when unable to construct a class symbol from the specified string.
§Errors
Errors when the string contains no parsable class size prefactor, or when the string cannot be parsed as a generic symbol.
Trait Implementations§
source§impl<R: Clone + Clone + Serialize> Clone for SymmetryClassSymbol<R>
impl<R: Clone + Clone + Serialize> Clone for SymmetryClassSymbol<R>
source§fn clone(&self) -> SymmetryClassSymbol<R>
fn clone(&self) -> SymmetryClassSymbol<R>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<R: Clone + Serialize> CollectionSymbol for SymmetryClassSymbol<R>
impl<R: Clone + Serialize> CollectionSymbol for SymmetryClassSymbol<R>
§type CollectionElement = R
type CollectionElement = R
source§fn from_reps(
symstr: &str,
reps: Option<Vec<Self::CollectionElement>>,
) -> Result<Self, GenericSymbolParsingError>
fn from_reps( symstr: &str, reps: Option<Vec<Self::CollectionElement>>, ) -> Result<Self, GenericSymbolParsingError>
source§fn representative(&self) -> Option<&Self::CollectionElement>
fn representative(&self) -> Option<&Self::CollectionElement>
source§fn representatives(&self) -> Option<&Vec<Self::CollectionElement>>
fn representatives(&self) -> Option<&Vec<Self::CollectionElement>>
source§impl<'de, R> Deserialize<'de> for SymmetryClassSymbol<R>
impl<'de, R> Deserialize<'de> for SymmetryClassSymbol<R>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<R: FiniteOrder + Clone + Serialize> FiniteOrder for SymmetryClassSymbol<R>
impl<R: FiniteOrder + Clone + Serialize> FiniteOrder for SymmetryClassSymbol<R>
source§impl<R: Clone + Serialize> MathematicalSymbol for SymmetryClassSymbol<R>
impl<R: Clone + Serialize> MathematicalSymbol for SymmetryClassSymbol<R>
source§fn main(&self) -> String
fn main(&self) -> String
The main part of the symbol, which denotes the representative symmetry operation.
source§fn prefactor(&self) -> String
fn prefactor(&self) -> String
The prefactor part of the symbol, which denotes the size of the class.
source§fn postfactor(&self) -> String
fn postfactor(&self) -> String
The postfactor part of the symbol, which is empty.
source§fn multiplicity(&self) -> Option<usize>
fn multiplicity(&self) -> Option<usize>
The number of times the representative elements are ‘duplicated’ to give the size of the class.
source§impl<R: Clone + Serialize> PartialEq for SymmetryClassSymbol<R>
impl<R: Clone + Serialize> PartialEq for SymmetryClassSymbol<R>
source§impl<R> Serialize for SymmetryClassSymbol<R>
impl<R> Serialize for SymmetryClassSymbol<R>
source§impl<R: SpecialSymmetryTransformation + Clone + Serialize> SpecialSymmetryTransformation for SymmetryClassSymbol<R>
impl<R: SpecialSymmetryTransformation + Clone + Serialize> SpecialSymmetryTransformation for SymmetryClassSymbol<R>
source§fn contains_time_reversal(&self) -> bool
fn contains_time_reversal(&self) -> bool
Checks if this class contains a time reversal operation.
§Returns
A flag indicating if this class contains a time reversal operation.
source§fn is_su2(&self) -> bool
fn is_su2(&self) -> bool
Checks if this class contains an active associated spin rotation (normal or inverse).
§Returns
A flag indicating if this class contains an active associated spin rotation.
source§fn is_su2_class_1(&self) -> bool
fn is_su2_class_1(&self) -> bool
Checks if this class contains an active and inverse associated spin rotation.
§Returns
A flag indicating if this class contains an active and inverse associated spin rotation.
source§fn is_spatial_identity(&self) -> bool
fn is_spatial_identity(&self) -> bool
source§fn is_spatial_binary_rotation(&self) -> bool
fn is_spatial_binary_rotation(&self) -> bool
source§fn is_spatial_inversion(&self) -> bool
fn is_spatial_inversion(&self) -> bool
source§fn is_spatial_reflection(&self) -> bool
fn is_spatial_reflection(&self) -> bool
source§fn is_identity(&self) -> bool
fn is_identity(&self) -> bool
\mathsf{O}(3)
$, E
, or
in $\mathsf{SU}(2)
$, E(Σ)
. Read moresource§fn is_time_reversal(&self) -> bool
fn is_time_reversal(&self) -> bool
\mathsf{O}(3)
$, θ
, or
in $\mathsf{SU}(2)
$, θ(Σ)
. Read moresource§fn is_inversion(&self) -> bool
fn is_inversion(&self) -> bool
\mathsf{O}(3)
$, i
, but not in
$\mathsf{SU}(2)
$, i(Σ)
. Read moresource§fn is_reflection(&self) -> bool
fn is_reflection(&self) -> bool
\mathsf{O}(3)
$, σ
, but not in
$\mathsf{SU}(2)
$, σ(Σ)
. Read moreimpl<R: Clone + Serialize> Eq for SymmetryClassSymbol<R>
Auto Trait Implementations§
impl<R> Freeze for SymmetryClassSymbol<R>
impl<R> RefUnwindSafe for SymmetryClassSymbol<R>where
R: RefUnwindSafe,
impl<R> Send for SymmetryClassSymbol<R>where
R: Send,
impl<R> Sync for SymmetryClassSymbol<R>where
R: Sync,
impl<R> Unpin for SymmetryClassSymbol<R>where
R: Unpin,
impl<R> UnwindSafe for SymmetryClassSymbol<R>where
R: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.