Volumetric data files

Read/write

WannierIO.read_xsfMethod
read_xsf(filename)

Read xsf file.

Return

  • primvec: 3 * 3, Å, each column is a primitive lattice vector
  • convvec: 3 * 3, Å, each column is a conventional lattice vector
  • atoms: n_atoms String, atomic symbols or numbers
  • atom_positions: length-n_atoms vector, Å, cartesian coordinates
  • origin: 3, Å, origin of the grid
  • span_vectors: 3 * 3, Å, each column is a spanning vector
  • X: nx, fractional coordinate of grid points along the first spanning vector
  • Y: ny, fractional coordinate of grid points along the second spanning vector
  • Z: nz, fractional coordinate of grid points along the third spanning vector
  • W: nx * ny * nz, volumetric data
Note

Only support reading 1 datagrid in BLOCK_DATAGRID_3D.

source
WannierIO.write_xsfMethod
write_xsf(
    filename,
    lattice,
    atom_positions,
    atom_numbers,
    origin,
    span_vectors,
    W
)

Write xsf file.

Arguments

  • lattice: 3 * 3, Å, each column is a lattice vector
  • atom_positions: length-n_atoms vector, fractional coordinates
  • atom_numbers: n_atoms, atomic numbers
  • origin: 3, Å, origin of the grid
  • span_vectors: 3 * 3, Å, each column is a spanning vector
  • W: nx * ny * nz, volumetric data
source
WannierIO.read_bxsfMethod
read_bxsf(filename)

Read bxsf file.

Return

  • fermi_energy: Fermi energy in eV
  • origin: 3, Å⁻¹, origin of the grid
  • span_vectors: 3 * 3, Å⁻¹, each column is a spanning vector
  • X: nx, fractional coordinate of grid points along the first spanning vector
  • Y: ny, fractional coordinate of grid points along the second spanning vector
  • Z: nz, fractional coordinate of grid points along the third spanning vector
  • E: n_bands * nx * ny * nz, eigenvalues at each grid point
source
WannierIO.write_bxsfMethod
write_bxsf(filename, fermi_energy, origin, span_vectors, E)

Write bxsf file.

Arguments

  • fermi_energy: Fermi energy in eV
  • origin: 3, Å⁻¹, origin of the grid
  • span_vectors: 3 * 3, Å⁻¹, each column is a spanning vector
  • E: n_bands * nx * ny * nz, eigenvalues at each grid point
source
WannierIO.read_cubeMethod
read_cube(filename)

Read cube file.

Note

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

source
WannierIO.write_cubeMethod
write_cube(
    filename,
    atom_positions,
    atom_numbers,
    origin,
    voxel_vectors,
    W
)

Write cube file.

Arguments

  • atom_positions: 3 * n_atoms, Å, cartesian coordinates
  • atom_numbers: n_atoms, atomic numbers
  • origin: 3, Å, origin of the grid
  • voxel_vectors: 3 * 3, Å, each column is a voxel vector
  • W: nx * ny * nz, volumetric data
source