Skip to content

Volumetric data files

Read/write

Readers and writers for volumetric grid formats.

WannierIO.Xsf Type

Container for xsf structure and volumetric data.

julia
struct Xsf{T<:Real}

Fields

  • primvec: Primitive lattice vectors, each column is a primitive lattice vector in Å

  • convvec: Conventional lattice vectors, each column is a conventional lattice vector in Å

  • atoms: Atomic labels or numbers

  • atom_positions: Atomic positions in Cartesian coordinates in Å

  • origin: Grid origin in Cartesian coordinates in Å

  • span_vectors: Grid spanning vectors, each column is a spanning vector in Å

  • X: Fractional grid coordinates along first spanning vector

  • Y: Fractional grid coordinates along second spanning vector

  • Z: Fractional grid coordinates along third spanning vector

  • W: Volumetric values, with shape (n_x, n_y, n_z)

source
WannierIO.read_xsf Method
julia
read_xsf(io)

Read xsf file.

Arguments

  • file: The name of the input file, or an IO.

Return

  • Xsf struct containing the data in the file

Note

Only support reading 1 datagrid in BLOCK_DATAGRID_3D.

source
WannierIO.write_xsf Method
julia
write_xsf(io, xsf)

Write xsf file.

Arguments

  • file: The name of the output file, or an IO.

  • xsf: a Xsf struct

Note

xsf.atoms must contain integer-parseable labels (atomic numbers). If atom labels are strings (e.g. "Si"), convert them to atomic numbers first.

source
WannierIO.Bxsf Type

Container for bxsf volumetric band-grid data.

julia
struct Bxsf{T<:Real}

Fields

  • fermi_energy: Fermi energy in eV

  • origin: Grid origin in reciprocal-space coordinates in Å⁻¹

  • span_vectors: Spanning vectors, each column is a spanning vector in Å⁻¹

  • X: Fractional grid coordinates along first spanning vector

  • Y: Fractional grid coordinates along second spanning vector

  • Z: Fractional grid coordinates along third spanning vector

  • E: Band energies on the grid, in eV, with shape (n_bands, n_x, n_y, n_z)

source
WannierIO.read_bxsf Method
julia
read_bxsf(io)

Read bxsf file.

Arguments

  • file: The name of the input file, or an IO.

Return

  • Bxsf struct containing the data in the file
source
WannierIO.write_bxsf Method
julia
write_bxsf(io, bxsf)

Write bxsf file.

Arguments

  • file: The name of the output file, or an IO.

  • bxsf: a Bxsf struct

source
WannierIO.Cube Type

Container for cube volumetric data.

julia
struct Cube{T<:Real}

Fields

  • atom_positions: Atomic positions in Cartesian coordinates in Å

  • atom_numbers: Atomic numbers

  • origin: Grid origin in Cartesian coordinates in Å

  • voxel_vectors: Voxel vectors, each column is a voxel vector in Å

  • X: Fractional grid coordinates along first voxel direction

  • Y: Fractional grid coordinates along second voxel direction

  • Z: Fractional grid coordinates along third voxel direction

  • W: Volumetric values, with shape (n_x, n_y, n_z)

source
WannierIO.read_cube Method
julia
read_cube(io)

Read cube file.

Arguments

  • file: The name of the input file, or an IO.

Note

By default, cube use Bohr unit, here all returns are in Cartesian coordinates, Å unit.

source
WannierIO.write_cube Method
julia
write_cube(io, cube)

Write cube file.

Arguments

  • file: The name of the output file, or an IO.

  • cube: a Cube struct

source

Page index