[−][src]Struct gchemol_lattice::Lattice
Periodic 3D lattice
Methods
impl Lattice
[src]
pub fn replicate(
&self,
ra: impl Iterator<Item = isize> + Clone,
rb: impl Iterator<Item = isize> + Clone,
rc: impl Iterator<Item = isize> + Clone
) -> impl Iterator<Item = Vector3f>
[src]
&self,
ra: impl Iterator<Item = isize> + Clone,
rb: impl Iterator<Item = isize> + Clone,
rc: impl Iterator<Item = isize> + Clone
) -> impl Iterator<Item = Vector3f>
Create a supercell along three cell directions.
impl Lattice
[src]
pub fn new<T: Into<Vector3f> + Copy>(tvs: [T; 3]) -> Self
[src]
Construct Lattice
from three lattice vectors.
pub fn from_matrix<T: Into<Matrix3f>>(tvs: T) -> Self
[src]
Construct Lattice
from lattice matrix (3x3).
pub fn from_params(
a: f64,
b: f64,
c: f64,
alpha: f64,
beta: f64,
gamma: f64
) -> Self
[src]
a: f64,
b: f64,
c: f64,
alpha: f64,
beta: f64,
gamma: f64
) -> Self
Construct lattice from lattice parameters Unit cell angles in degrees, lengths in Angstrom
pub fn widths(&self) -> [f64; 3]
[src]
Return the perpendicular widths of the cell along three directions. i.e. the distance between opposite faces of the unit cell
pub fn volume(&self) -> f64
[src]
Return the volume of the unit cell the cache will be updated if necessary
pub fn set_origin<T: Into<Vector3f>>(&mut self, loc: T)
[src]
Set cell origin in Cartesian coordinates
pub fn lengths(&self) -> [f64; 3]
[src]
Lattice length parameters: a, b, c
pub fn angles(&self) -> [f64; 3]
[src]
Lattice angle parameters in degrees
pub fn scale_by(&mut self, v: f64)
[src]
Scale Lattice by a positive constant
pub fn origin(&self) -> Vector3f
[src]
Get cell origin in Cartesian coordinates
pub fn to_frac<T: Into<Vector3f>>(&self, p: T) -> Vector3f
[src]
Returns the fractional coordinates given cartesian coordinates.
pub fn to_cart<T: Into<Vector3f>>(&self, p: T) -> Vector3f
[src]
Returns the cartesian coordinates given fractional coordinates.
pub fn vector_a(&self) -> Vector3f
[src]
Lattice vector a
pub fn vector_b(&self) -> Vector3f
[src]
Lattice vector b
pub fn vector_c(&self) -> Vector3f
[src]
Lattice vector c
pub fn vectors(&self) -> [Vector3f; 3]
[src]
Three lattice vectors.
pub fn matrix(&self) -> Matrix3f
[src]
Lattice vectors
pub fn is_orthorhombic(&self) -> bool
[src]
Check if lattice is orthorhombic
pub fn wrap<T: Into<Vector3f>>(&self, vec: T) -> Vector3f
[src]
Wrap a point in cartesian coordinates into unit cell, obeying the periodic boundary conditions. Returns cartesian coordinates.
pub fn wrap_frac<T: Into<Vector3f>>(&self, f: T) -> Vector3f
[src]
Wrap a point in fractional coordinates into unit cell, obeying the periodic boundary conditions. Returns fractional coordinates.
pub fn distance<T: Into<Vector3f>>(&self, pi: T, pj: T) -> f64
[src]
Return the shortest distance between pi
(point i) and the periodic
images of pj
(point j) under the minimum image convention
Parameters
- pi, pj: Cartesian coordinates of point i and point j
pub fn apply_mic<T: Into<[f64; 3]>>(&self, p: T) -> Vector3f
[src]
Return the shortest vector obeying the minimum image convention.
Trait Implementations
impl Clone for Lattice
[src]
impl Copy for Lattice
[src]
impl Debug for Lattice
[src]
impl Default for Lattice
[src]
impl<'de> Deserialize<'de> for Lattice
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Lattice
[src]
Auto Trait Implementations
impl RefUnwindSafe for Lattice
impl Send for Lattice
impl Sync for Lattice
impl Unpin for Lattice
impl UnwindSafe for Lattice
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,