`CastepReader.Bohr2Ang`

— ConstantFactor to convert Bohr to Å

`CastepReader.Ha2eV`

— ConstantFactor to convert Hatree to eV

`CastepReader.CastepInFile`

— TypeType for CASTEP input file

`CastepReader.ChargeDensity`

— Type`ChargeDensity(density)`

Construction from a density array.

`CastepReader.ChargeDensity`

— Method`ChargeDensity(ngx, ngy, ngz)`

Construction an empty ChargeDensity.

`CastepReader.WaveFunction`

— TypeType for storing a wavefunction

`CastepReader.WaveFunction`

— Method`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.fft`

— Method`fft(wavef::WaveFunction)`

FFT to transfer the wavefunction to the frequency space

`AbstractFFTs.ifft!`

— MethodIn place FFT to transfer the wavefunction to the real space

The in-place transformation is apply slice by slice

`AbstractFFTs.ifft`

— Method`fft(wavef::WaveFunction)`

FFT to transfer the wavefunction to the frequency space

`Base.getindex`

— MethodAllow access fields by c[:xx] notation

`CastepReader.CastepBin.update_wavefunction`

— FunctionUpdate wavefunction of an existing file

`CastepReader.CastepBin.update_wavefunction!`

— FunctionUpdate wavefunction of an existing file

`CastepReader.Chgcar.write_chgcar`

— Method`CastepReader.chargedensity`

— Method`chargedensity(wavef::WaveFunction, kidx, bidx, sidx)`

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

`CastepReader.chargedensity`

— Method`chargedensity(wavef::WaveFunction, ib, ik, is)`

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

`CastepReader.chargedensity`

— Method`chargedensity(wavef::WaveFunction)`

Compute charge density from the wavefunction

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

`CastepReader.clean_cell_lines`

— MethodClean lines by removing new line symbols and comments

`CastepReader.coeff_to_recip`

— Method`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_recip`

— Method`coeff_to_recip(coeff_array, data_dict::Dict)`

Convert plane wave coefficients to a reciprocal space grid.

`CastepReader.coord_to_indices`

— MethodConvert G-vector coordinates (unit of reciprocal lattice basis) to 1-based grid indices

`CastepReader.copy_density`

— MethodCopy density from a temporary array in to the spin channel

`CastepReader.copy_density`

— MethodCopy density from a temporary array in to the spin channel

`CastepReader.filename`

— MethodName of the file

`CastepReader.fine_grid_interpolate`

— MethodInterpolate charge density from `c1`

into `c2`

with a finner grid

`CastepReader.m_channel_mask`

— MethodGet 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_site`

— MethodReorder 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_raw`

— MethodRead 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_bands_header`

— MethodRead the header for the bands file

`CastepReader.read_cell_castep`

— MethodRead in CASTEP's cell/param files

`CastepReader.read_cst_ome`

— MethodRead the cst_ome file with given number of bands, kpoints, and spins

`CastepReader.read_cst_ome`

— Method`read_cst_ome(seed;)`

Read the `<seed>.cst_ome`

file, requires `<seed>.bands`

file to be present.

`CastepReader.read_lattice`

— MethodRead out the lattice from the input file

`CastepReader.read_om_castep`

— Method`read_om_castep(ome_file, nb, nk, ns;endian="big-endian", legacy_format=false)`

Read optical matrix element for CASTEP

`CastepReader.read_om_castep`

— Method`read_om_castep(seed; endian="big-endian", legacy_format=false)`

Read optical matrix element given a CASTEP seed name.

`CastepReader.read_ome_bin`

— MethodRead the ome_bin file

`CastepReader.read_ome_bin`

— Method`read_ome_bin(seed; legacy_format=false)`

Read the `<seed>.ome_bin`

file, requires `<seed>.bands`

file to be present.

`CastepReader.read_pdos_bin`

— Method`read_pdos_bin(fname::AbstractString)`

Read the `pdos_bin`

file.

`CastepReader.read_pdos_bin`

— Method`read_pdos_bin(f::FortranFile)`

Read the `pdos_bin`

file.

`CastepReader.read_symm_disp`

— MethodRead in the symmetry operations

Returns matrix of the rotations and that for the displacements

`CastepReader.recip_to_coeff`

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

`CastepReader.stem`

— MethodPart of the file exclude the suffix

`CastepReader.suffix`

— MethodSuffix of the file

`CastepReader.wavefunction`

— MethodLoad 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.

`CastepReader.weighted_density_by_bands`

— MethodComputed weighted density from some given weights by bands