pub struct Lattice { /* private fields */ }Expand description
A Bravais lattice with a basis.
Implementations§
Source§impl Lattice
impl Lattice
Sourcepub fn new(vectors: &[Vec3]) -> Self
pub fn new(vectors: &[Vec3]) -> Self
Lattice with the given primitive vectors (1 to 3 of them) and no sublattice yet.
Sourcepub fn with_sublattice(self, name: &str, offset: Vec3, orbitals: usize) -> Self
pub fn with_sublattice(self, name: &str, offset: Vec3, orbitals: usize) -> Self
Adds a sublattice and returns the lattice (builder style).
Sourcepub fn square(a: f64, orbitals: usize) -> Self
pub fn square(a: f64, orbitals: usize) -> Self
Square lattice of constant a with one sublattice of orbitals orbitals.
Sourcepub fn cubic(a: f64, orbitals: usize) -> Self
pub fn cubic(a: f64, orbitals: usize) -> Self
Simple cubic lattice of constant a with one sublattice of orbitals orbitals.
Sourcepub fn honeycomb(a: f64, orbitals: usize) -> Self
pub fn honeycomb(a: f64, orbitals: usize) -> Self
Honeycomb lattice with nearest-neighbour distance a (sublattices A and B).
Sourcepub fn sublattices(&self) -> &[Sublattice]
pub fn sublattices(&self) -> &[Sublattice]
Sublattices of the basis, indexed by Site::sub.
Trait Implementations§
impl StructuralPartialEq for Lattice
Auto Trait Implementations§
impl Freeze for Lattice
impl RefUnwindSafe for Lattice
impl Send for Lattice
impl Sync for Lattice
impl Unpin for Lattice
impl UnsafeUnpin 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