[−][src]Struct bader::density::Density
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]
data: &'a [f64],
grid: [usize; 3],
lattice: [[f64; 3]; 3],
weight_tolerance: f64,
vacuum_tolerance: Option<f64>,
voxel_origin: [f64; 3]
) -> Self
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,