Skip to main content

PbcQuery

Struct PbcQuery 

Source
pub struct PbcQuery<'a> {
    pub periodic: [bool; 3],
    pub cutoff: f64,
    pub mask: Option<&'a [bool]>,
    pub cell_hint: Option<f64>,
    pub half: bool,
    pub closed: bool,
    pub exclude_self_images: bool,
}
Expand description

Options for pairs_within_pbc.

Fields§

§periodic: [bool; 3]

periodic[k] is false when lattice axis k is open.

§cutoff: f64

Pairs with squared distance below cutoff squared are kept. Self::closed also keeps the boundary.

§mask: Option<&'a [bool]>

None keeps every point. A false entry drops that point as both source and candidate.

§cell_hint: Option<f64>

Bin edge. None uses the cutoff, which does not move when the bounding span jitters inside a bin.

§half: bool

Keep one side of (i, j, S).

§closed: bool

Also keep dist2 == cutoff² on an open or mixed cell.

§exclude_self_images: bool

Drop rows with i == j, including a periodic image of the source.

Implementations§

Source§

impl<'a> PbcQuery<'a>

Source

pub fn periodic(cutoff: f64) -> Self

Fully periodic search. The other flags start unset.

Source

pub fn open(cutoff: f64) -> Self

Every axis open.

Source

pub fn new(periodic: [bool; 3], cutoff: f64) -> Self

periodic selects the axes that take images.

Source

pub fn mask(self, mask: Option<&'a [bool]>) -> Self

Set the point mask.

Source

pub fn cell_hint(self, cell_hint: Option<f64>) -> Self

Set the bin edge.

Source

pub fn half(self, half: bool) -> Self

Keep one side of each pair.

Source

pub fn closed(self, closed: bool) -> Self

Keep the cutoff boundary.

Source

pub fn exclude_self_images(self, exclude: bool) -> Self

Drop i == j.

Auto Trait Implementations§

§

impl<'a> Freeze for PbcQuery<'a>

§

impl<'a> RefUnwindSafe for PbcQuery<'a>

§

impl<'a> Send for PbcQuery<'a>

§

impl<'a> Sync for PbcQuery<'a>

§

impl<'a> Unpin for PbcQuery<'a>

§

impl<'a> UnsafeUnpin for PbcQuery<'a>

§

impl<'a> UnwindSafe for PbcQuery<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.