pub struct SkinList { /* private fields */ }Expand description
Cutoff list with a Verlet skin.
update rebuilds the candidates when an atom has moved too far and
otherwise only filters them. The returned columns borrow the list.
Implementations§
Source§impl SkinList
impl SkinList
Sourcepub fn new(
cell: Cell,
cutoff: f64,
skin: f64,
half: bool,
) -> Result<Self, Error>
pub fn new( cell: Cell, cutoff: f64, skin: f64, half: bool, ) -> Result<Self, Error>
Empty list. The first Self::update builds the candidates.
Sourcepub fn columns(&self) -> &PairColumns
pub fn columns(&self) -> &PairColumns
Rows from the last Self::update.
Sourcepub fn vectors(&self) -> &[[f64; 3]]
pub fn vectors(&self) -> &[[f64; 3]]
Shifted vectors from the last update that asked for them. Empty when that update did not.
Sourcepub fn needs_rebuild(&self, xyz: &[[f64; 3]]) -> bool
pub fn needs_rebuild(&self, xyz: &[[f64; 3]]) -> bool
true when xyz is not covered by the stored candidates.
Sourcepub fn update(
&mut self,
xyz: &[[f64; 3]],
want_vector: bool,
) -> Result<&PairColumns, Error>
pub fn update( &mut self, xyz: &[[f64; 3]], want_vector: bool, ) -> Result<&PairColumns, Error>
Filter xyz, rebuilding the candidates first when the skin is spent.
want_vector fills Self::vectors with q + H S - p.
Auto Trait Implementations§
impl Freeze for SkinList
impl RefUnwindSafe for SkinList
impl Send for SkinList
impl Sync for SkinList
impl Unpin for SkinList
impl UnsafeUnpin for SkinList
impl UnwindSafe for SkinList
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
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