[−][src]Struct bader::atoms::Lattice
Lattice - structure for containing information on the cell
distance_matrix ordering: 0 -> (-1,-1,-1) 7 -> (-1, 1, 0) 14 -> (0, 1,-1) 21 -> (1, 0, 0) 1 -> (-1,-1, 0) 8 -> (-1, 1, 1) 15 -> (0, 1, 0) 22 -> (1, 0, 1) 2 -> (-1,-1, 1) 9 -> (0,-1,-1) 16 -> (0, 1, 1) 23 -> (1, 1,-1) 3 -> (-1, 0,-1) 10 -> (0,-1, 0) 17 -> (1,-1,-1) 24 -> (1, 1, 0) 4 -> (-1, 0, 0) 11 -> (0,-1, 1) 18 -> (1,-1, 0) 25 -> (1, 1, 1) 5 -> (-1, 0, 1) 12 -> (0, 0,-1) 19 -> (1,-1, 1) 6 -> (-1, 1,-1) 13 -> (0, 0, 1) 20 -> (1, 0,-1)
Fields
a: f64
length of the a-vector
b: f64
length of the b-vector
c: f64
length of the c-vector
distance_matrix: [f64; 26]
Distance to move in each direction, follows the ordering listed in Lattice
.
shift_matrix: [[f64; 3]; 27]
The cartesian vectors for each shift in the [Lattice.distance_matrix
] with the
vector [0., 0., 0.] inserted at shift_matrix[13].
gradient_transform: [[f64; 3]; 3]
Transformation matrix for converting central difference gradients to the lattice basis.
to_fractional: [[f64; 3]; 3]
Transformation matrix for converting to fractional coordinates.
to_cartesian: [[f64; 3]; 3]
Transformation matrix for converting to cartesian coordinates.
volume: f64
The volume of the lattice.
Implementations
impl Lattice
[src]
pub fn new(lattice: [[f64; 3]; 3]) -> Self
[src]
Initialises the structure. Builds all the fields of the lattice structure from a 2d vector in the form:
[ [ax, ay, az], [bx, by, bz], [cx, cy, cz], ]
Auto Trait Implementations
impl RefUnwindSafe for Lattice
impl Send for Lattice
impl Sync for Lattice
impl Unpin for Lattice
impl UnwindSafe for Lattice
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,
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, 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.
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>,