[][src]Struct wavecar_rs::Wavecar

pub struct Wavecar { /* fields omitted */ }

Main Wavecar struct

The structure of WAVECAR is illustrated in the main page.

Implementations

impl Wavecar[src]

pub fn get_wavecar_size(&self) -> u64[src]

Returns the length of WAVECAR file

pub fn get_record_len(&self) -> u64[src]

pub fn get_precision_type(&self) -> WFPrecisionType[src]

pub fn get_wavecar_type(&self) -> WavecarType[src]

Returns the WAVECAR type, Standard, SOC, GammaX or GammaZ

pub fn get_num_spin(&self) -> u64[src]

pub fn get_num_kpoints(&self) -> u64[src]

pub fn get_num_bands(&self) -> u64[src]

pub fn get_en_cutoff(&self) -> f64[src]

pub fn get_en_fermi(&self) -> f64[src]

pub fn get_real_cell(&self) -> Array2<f64>[src]

Returns the lattice vectors in real-space

pub fn get_reci_cell(&self) -> Array2<f64>[src]

Returns the lattice vectors in reciprocal space

pub fn get_real_cell_volume(&self) -> f64[src]

pub fn get_num_plane_waves(&self) -> &Vec<u64>[src]

pub fn get_k_vecs(&self) -> &Array2<f64>[src]

Returns the reference of all k-point vectors

pub fn get_band_eigs(&self) -> &Array3<f64>[src]

Returns the eigenvalue of each all bands, imaginary part is abandoned

pub fn get_band_fweights(&self) -> &Array3<f64>[src]

pub fn set_wavecar_type(&mut self, t: WavecarType) -> &mut Self[src]

Manually set the wavecar_type, if the given type is not consistent with WAVECAR, a panic will be thrown.

impl Wavecar[src]

pub fn from_file(path: &impl AsRef<Path> + ?Sized) -> Result<Self>[src]

Read WAVECAR from file.

Note: Band coefficients are not read here for the performance consideration.

pub fn check_indices(
    &self,
    ispin: u64,
    ikpoint: u64,
    iband: u64
) -> Result<(), WavecarError>
[src]

Checks the ispin, ikpoint, iband index validation. WavecarError is returned if fails.

pub fn check_spin_index(&self, ispin: u64) -> Result<(), WavecarError>[src]

pub fn check_kpoint_index(&self, ikpoint: u64) -> Result<(), WavecarError>[src]

pub fn check_band_index(&self, iband: u64) -> Result<(), WavecarError>[src]

pub fn generate_fft_grid(&self, ikpoint: u64) -> Vec<Vec<i64>>[src]

Returns the kgrid indices corresponding to coefficients in WAVECAR.

pub fn check_wavecar_type(&self, t: WavecarType) -> Result<(), WavecarError>[src]

pub fn read_wavefunction_coeffs(
    &mut self,
    ispin: u64,
    ikpoint: u64,
    iband: u64
) -> Result<Array1<Complex64>, WavecarError>
[src]

Read the coefficients from WAVECAR and return them.

impl Wavecar[src]

pub fn get_wavefunction_in_realspace(
    &mut self,
    ispin: u64,
    ikpoint: u64,
    iband: u64,
    ngrid: Vec<u64>
) -> Result<Wavefunction, WavecarError>
[src]

Transform the k-space wavefunction into real-space wavefunction.

A grid size is needed

pub fn get_wavefunction_in_realspace_default_ngrid(
    &mut self,
    ispin: u64,
    ikpoint: u64,
    iband: u64
) -> Result<Wavefunction, WavecarError>
[src]

An alias of get_wavefunction_in_realspace but with default 2x grid size supplied.

Trait Implementations

impl Debug for Wavecar[src]

Auto Trait Implementations

impl RefUnwindSafe for Wavecar

impl Send for Wavecar

impl Sync for Wavecar

impl Unpin for Wavecar

impl UnwindSafe for Wavecar

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.