Struct pdbtbx::UnitCell[][src]

pub struct UnitCell { /* fields omitted */ }

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]

Create a new UnitCell construct.

Arguments

  • a - a-axis dimension
  • b - b-axis dimension
  • c - c-axis dimension
  • alpha - alpha angle in degrees
  • beta - beta angle in degrees
  • gamma - 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]

Set the a-axis dimension

Panics

It panics if the new value is not finite

pub fn set_b(&mut self, new_b: f64)[src]

Set the b-axis dimension

Panics

It panics if the new value is not finite

pub fn set_c(&mut self, new_c: f64)[src]

Set the c-axis dimension

Panics

It panics if the new value is not finite

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]

fn default() -> Self[src]

Default UnitCell with all sizes set to 0.0 and angles to 90.0

impl PartialEq<UnitCell> for UnitCell[src]

impl PartialOrd<UnitCell> for UnitCell[src]

impl StructuralPartialEq for UnitCell[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.