pub struct Lattice {
pub cartesian_shift_matrix: [[f64; 3]; 27],
pub to_fractional: [[f64; 3]; 3],
pub to_cartesian: [[f64; 3]; 3],
pub reduced_cartesian_shift_matrix: [[f64; 3]; 27],
pub reduced_grid_shift_matrix: Vec<Vec<usize>>,
pub reduced_to_fractional: [[f64; 3]; 3],
pub reduced_to_cartesian: [[f64; 3]; 3],
pub volume: f64,
}
Expand description
Lattice - structure for containing information on the cell
shift matrix ordering: 0 -> (-1,-1,-1) 7 -> (-1, 1, 0) 14 -> (0, 0, 1) 21 -> (1, 0,-1) 1 -> (-1,-1, 0) 8 -> (-1, 1, 1) 15 -> (0, 1,-1) 22 -> (1, 0, 0) 2 -> (-1,-1, 1) 9 -> (0,-1,-1) 16 -> (0, 1, 0) 23 -> (1, 0, 1) 3 -> (-1, 0,-1) 10 -> (0,-1, 0) 17 -> (0, 1, 1) 24 -> (1, 1,-1) 4 -> (-1, 0, 0) 11 -> (0,-1, 1) 18 -> (1,-1,-1) 25 -> (1, 1, 0) 5 -> (-1, 0, 1) 12 -> (0, 0,-1) 19 -> (1,-1, 0) 26 -> (1, 1, 1) 6 -> (-1, 1,-1) 13 -> (0, 0, 0) 20 -> (1,-1, 1)
Fields§
§cartesian_shift_matrix: [[f64; 3]; 27]
The cartesian vectors for every combination of lattice vector.
to_fractional: [[f64; 3]; 3]
Transformation matrix for converting to fractional coordinates.
to_cartesian: [[f64; 3]; 3]
Transformation matrix for converting to cartesian coordinates.
reduced_cartesian_shift_matrix: [[f64; 3]; 27]
The cartesian vectors for every combination of reduced lattice vector.
reduced_grid_shift_matrix: Vec<Vec<usize>>
The conversion of the reduced shift matrix to the individual steps in the
crate::grid::Grid
reduced_to_fractional: [[f64; 3]; 3]
Transformation matrix for converting to fractional coordinates.
reduced_to_cartesian: [[f64; 3]; 3]
Transformation matrix for converting to cartesian coordinates.
volume: f64
Volume of the lattice.
Implementations§
source§impl Lattice
impl Lattice
sourcepub fn new(lattice: [[f64; 3]; 3]) -> Self
pub fn new(lattice: [[f64; 3]; 3]) -> Self
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§
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
Mutably borrows from an owned value. Read more