[][src]Struct bader::density::Density

pub struct Density<'a> {
    pub data: &'a [f64],
    pub size: Size,
    pub vacuum_tolerance: Option<f64>,
    pub voronoi: Voronoi,
    pub voxel_lattice: Lattice,
    pub voxel_origin: [f64; 3],
    pub weight_tolerance: f64,
    // some fields omitted
}

Structure for managing the reference density and movement within it.

Fields

data: &'a [f64]

Charge density in a flattened array.

size: Size

The 3d size of the data.

vacuum_tolerance: Option<f64>

The cut-off for being considered vacuum.

voronoi: Voronoi

The voronoi vectors and their alphas.

voxel_lattice: Lattice

Information on the voxel basis.

voxel_origin: [f64; 3]

The origin of each voxel.

weight_tolerance: f64

The cut-off for ignoring the weight contribution.

Implementations

impl<'a> Density<'a>[src]

pub fn new(
    data: &'a [f64],
    grid: [usize; 3],
    lattice: [[f64; 3]; 3],
    weight_tolerance: f64,
    vacuum_tolerance: Option<f64>,
    voxel_origin: [f64; 3]
) -> Self
[src]

Initialises a density structure. Computes the voxel_lattice from the grid and lattice.

pub fn full_shift(&self, p: isize) -> [isize; 26][src]

get the full shift to visit the surrounding 26 voxels

pub fn reduced_shift(&self, p: isize) -> [isize; 6][src]

get the reduced shift to visit the surrounding 6 voxels

pub fn gradient_shift(&self, p: isize, gradient: [f64; 3]) -> isize[src]

Get the gradient shift from the current point

pub fn voronoi_shift(&self, p: isize, shift: &[usize]) -> isize[src]

Shifts a point, p, by a single voronoi vector.

pub fn to_cartesian(&self, p: isize) -> [f64; 3][src]

Converts a point in the array to cartesian.

Trait Implementations

impl<'a> Index<isize> for Density<'a>[src]

type Output = f64

The returned type after indexing.

fn index(&self, i: isize) -> &Self::Output[src]

Index the reference charge inside the Density structure

Auto Trait Implementations

impl<'a> RefUnwindSafe for Density<'a>

impl<'a> Send for Density<'a>

impl<'a> Sync for Density<'a>

impl<'a> Unpin for Density<'a>

impl<'a> UnwindSafe for Density<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.