Struct pdbtbx::UnitCell [−][src]
A unit cell of a crystal, containing its dimensions and angles
Implementations
impl UnitCell
[src]
pub fn new(
a: f64,
b: f64,
c: f64,
alpha: f64,
beta: f64,
gamma: f64
) -> UnitCell
[src]
a: f64,
b: f64,
c: f64,
alpha: f64,
beta: f64,
gamma: f64
) -> UnitCell
Create a new UnitCell construct.
Arguments
a
- a-axis dimensionb
- b-axis dimensionc
- c-axis dimensionalpha
- alpha angle in degreesbeta
- beta angle in degreesgamma
- gamma angle in degrees
pub fn a(&self) -> f64
[src]
Get the a-axis dimension
pub fn b(&self) -> f64
[src]
Get the b-axis dimension
pub fn c(&self) -> f64
[src]
Get the c-axis dimension
pub fn set_a(&mut self, new_a: f64)
[src]
pub fn set_b(&mut self, new_b: f64)
[src]
pub fn set_c(&mut self, new_c: f64)
[src]
pub fn alpha(&self) -> f64
[src]
Get the alpha angle in degrees
pub fn set_alpha(&mut self, new_alpha: f64)
[src]
Set the alpha angle in degrees
Panics
It panics if the new value is not finite. It also panics if the alpha value is outside of bounds [0, 360)
pub fn beta(&self) -> f64
[src]
Get the beta angle in degrees
pub fn set_beta(&mut self, new_beta: f64)
[src]
Set the beta angle in degrees
Panics
It panics if the new value is not finite. It also panics if the beta value is outside of bounds [0, 360)
pub fn gamma(&self) -> f64
[src]
Get the gamma angle in degrees
pub fn set_gamma(&mut self, new_gamma: f64)
[src]
Set the gamma angle in degrees
Panics
It panics if the new value is not finite. It also panics if the gamma value is outside of bounds [0, 360)
pub fn size(&self) -> (f64, f64, f64)
[src]
Get the dimensions in a tuple (a, b, c)
Trait Implementations
impl Clone for UnitCell
[src]
impl Debug for UnitCell
[src]
impl Default for UnitCell
[src]
impl PartialEq<UnitCell> for UnitCell
[src]
impl PartialOrd<UnitCell> for UnitCell
[src]
fn partial_cmp(&self, other: &UnitCell) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for UnitCell
[src]
Auto Trait Implementations
impl RefUnwindSafe for UnitCell
impl Send for UnitCell
impl Sync for UnitCell
impl Unpin for UnitCell
impl UnwindSafe for UnitCell
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,