CastepReader.WaveFunctionMethod
WaveFunction(data_dict::Dict)

Construct the WaveFunction from a Dict of read data from castep_bin/check file

AbstractFFTs.fft!Method
FFTW.fft!(wavef::WaveFunction)

In place FFT to transfer the wavefunction to the frequency space

The in-place transformation is apply slice by slice

AbstractFFTs.fftMethod
fft(wavef::WaveFunction)

FFT to transfer the wavefunction to the frequency space

AbstractFFTs.ifft!Method

In place FFT to transfer the wavefunction to the real space

The in-place transformation is apply slice by slice

AbstractFFTs.ifftMethod
fft(wavef::WaveFunction)

FFT to transfer the wavefunction to the frequency space

CastepReader.chargedensityMethod
chargedensity(wavef::WaveFunction, kidx, bidx, sidx)

Construct charge density for given kpoints, band, and spin indices

CastepReader.chargedensityMethod
chargedensity(wavef::WaveFunction, ib, ik, is)

Get the charge density for a single slice of band, kpoint, spin channel

CastepReader.chargedensityMethod
chargedensity(wavef::WaveFunction)

Compute charge density from the wavefunction

Note that the density does not include the augmentation charges involved in ultrasoft pseudopotentials

CastepReader.coeff_to_recipMethod
coeff_to_recip(coeff_array, nwaves_at_kp, grid_coords, ngx, ngy, ngz)

Convert planewave coefficients in the reduced representation to grids

CastepReader.coeff_to_recipMethod
coeff_to_recip(coeff_array, data_dict::Dict)

Convert plane wave coefficients to a reciprocal space grid.

CastepReader.m_channel_maskMethod

Get an masking for the m channels inferred from the repeated appearance of l channels

CASTEP does not write the m channel labels explicity, but they can be inferred from repeated l channels. This assumes that l channels of the same atom is written consecutively, which seem to be the case.

CastepReader.pdos_index_by_siteMethod

Reorder the PDOS information

Return a dictionary which can be used as

output = pdos_index_by_site(pdos_data)
idx = output[1][Orbitals.s]   # Index of the s orbital in the pdos_data.weights
weights = pdos_data.pdos_weights[idx, :, :, :]  # Slice the weight array to obtain the weigths for this site/am combination
CastepReader.read_bands_castep_rawMethod

Read the bands file

The bands file contains the eigenvalues of the

Arguments

  • reorder: If true, recover the orignial kpoint orders as defined in the cell file. Note that the

order of kpoint in other quantities, such as the optical matrix, are the same as they appear in the bands file rather than following the internal "counter".

CastepReader.read_cst_omeMethod
read_cst_ome(seed;)

Read the <seed>.cst_ome file, requires <seed>.bands file to be present.

CastepReader.read_om_castepMethod
read_om_castep(ome_file, nb, nk, ns;endian="big-endian", legacy_format=false)

Read optical matrix element for CASTEP

CastepReader.read_om_castepMethod
read_om_castep(seed; endian="big-endian", legacy_format=false)

Read optical matrix element given a CASTEP seed name.

CastepReader.read_ome_binMethod
read_ome_bin(seed; legacy_format=false)

Read the <seed>.ome_bin file, requires <seed>.bands file to be present.

CastepReader.recip_to_coeffMethod

Convert full grid representation back to reciprocal coefficients The original specifications of the wave function needs to be reused

CastepReader.wavefunctionMethod

Load wavefunction using data read from the checkpoint file.

Returns the reciprocal representation on the grids. Needs to be FFTed to get to the real space representation.