pub struct LatticeSearch { /* private fields */ }Expand description
Candidate-site search through an infinite periodic Lattice.
Implementations§
Source§impl LatticeSearch
impl LatticeSearch
Sourcepub fn new(lattice: &Lattice) -> Self
pub fn new(lattice: &Lattice) -> Self
Prepare the per-cell site list of lattice
(Lattice::orthogonal_cell).
Sourcepub fn lattice_constant(&self) -> f64
pub fn lattice_constant(&self) -> f64
Lattice constant a, metres (the first cell edge).
Sourcepub fn cell_edges(&self) -> [f64; 3]
pub fn cell_edges(&self) -> [f64; 3]
Edges of the rectangular search cell along x, y, z, metres.
Sourcepub fn search(
&self,
origin: [f64; 3],
direction: [f64; 3],
p_max: f64,
length: f64,
) -> Result<Vec<Candidate>, CrystalError>
pub fn search( &self, origin: [f64; 3], direction: [f64; 3], p_max: f64, length: f64, ) -> Result<Vec<Candidate>, CrystalError>
Candidate sites within p_max of the segment of length length
starting at origin along direction (any non-zero length; it is
normalised), ordered along the path. See the module docs for the
boundary and ordering rules.
§Errors
CrystalError::InvalidSearch for a non-finite origin, a zero or
non-finite direction, a p_max that is not finite and positive, or a
length that is not finite and non-negative.
Trait Implementations§
Source§impl Clone for LatticeSearch
impl Clone for LatticeSearch
Source§fn clone(&self) -> LatticeSearch
fn clone(&self) -> LatticeSearch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LatticeSearch
impl RefUnwindSafe for LatticeSearch
impl Send for LatticeSearch
impl Sync for LatticeSearch
impl Unpin for LatticeSearch
impl UnsafeUnpin for LatticeSearch
impl UnwindSafe for LatticeSearch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more