spinWannier.wannier_utils#
Utility functions for the spinWannier package.
Functions
|
For a k-space Hamiltonian Hk (function of kx and ky), calculate the eigen-energies and expectation values of spin Sx, Sy, Sz, at all the k-points in 'kpoints'. |
|
Transform from Wannier gauge to Hamiltonian gauge, i.e., for every k-point either diagonalize Hamiltonian |
Return the lowest band with the spin projection below the threshold for 'kpoint'. |
|
|
Check if file exists. If yes, add him a number in parentheses that does not exist. |
|
wannier90_hr.dat has sometimes the R vectors shifted (probably to facilitate the 'minimal replice' interpolation. |
|
Coerce angles to be positive (i.e., in the range [0, 2pi]). |
|
Convert the outputs of my wannier to TB to Joaquin's code. |
|
Convert hr or spn dictionary to a matrix accepted by wannierBerri: first index is m, second n, third is the index of an R_vector from iRvec list. |
|
Return the eigenvalues as a dictionary with the keys being the k-point tuples. |
|
Return the eigenvalue at 'kpoint' and 'band'. |
|
Plot scatter points with a spin texture on a constant energy xy surface (probably at E=EF) if the energy difference of each given point is lower than some threshold. |
|
Convert wannier90 files to pickled dictionaries files. |
|
Get a 2D mesh of k-points in the reciprocal space. |
|
Get the 'mp_grid' from wannier90.win file which tells the k-grid used in the DFT calculation. |
|
Parse wannier90.win file to get k-point names as a list of tuples. |
|
Interpolate between kpoints in the kpoint_matrix to obtain a k-point path with Nk points in each segment. |
|
Get the number of skiprows in wannier90_hr.dat file. |
|
Convert wannier90 hr.dat to dictionary in the form that we are using: R vectors as keys and hopping as a complex number matrix as the values. |
|
Takes operator O (Hamiltonian, spin-operator ...) evaluated on a coarse DFT k-mesh and Hamiltonian eigenstates onto 'kpoints' using the |
|
If not text_file, than it's binary. |
|
Parse the wannier90 .eig file to get the k-point and band-resolved eigenvalues. |
|
Return a 3x3 matrix where 1st row is the 1st lattice vector etc. |
|
Return True if MAGMOM in INCAR_path lies purely OOP, else return False. |
|
Return 0 / 1 / 2 if spin is along x / y / z direction, respectively. |
|
Convert the material name to LaTeX format. |
|
Convert data matrix (e.g. the Ham_R or SS_R file from symmetrization) into a dictionary with |
|
Return the expectation values of Operator (an N x N matrix, where N is the size of the eigenvectors) for all eigenvectors. |
|
Outer product between a 2x2 spin matrix and a general orbital nxn M matrix, so that the spin blocks are the big blocks. |
|
Works for s matrix of any dimension, but slower than 'outer(s, M)' Outer product between a nxn spin matrix and a general orbital nxn M matrix, so that the spin blocks are the big blocks. |
|
Parse the KPOINTS file. |
|
Output a figure with Sx, Sy, and Sz-projected band structure. |
|
Get the section of PROCAR belonging to the first occurence of 'kpoint' in PROCAR_file. |
|
Get the real-space grid from the seedname_hr.dat file. |
|
Perform inverse Fourier transformation from real-space operator to k-space in Wannier gauge. |
|
Perform inverse Fourier transformation from real-space operator to k-space in Wannier gauge. |
Return the reciprocal lattice vectors from the real-space lattice vectors. |
|
Replace the middle of the colormap with a custom color. |
|
|
Save the bands and spin texture information for given kpoints. |
|
Save the bands and spin texture information for given kpoints. |
|
|
|
Split dictionary with keys as ((Rx, Ry, Rz), spin_component_name) to three dictionaries |
|
Convert wannier90.spn file to a dictionary object and save as pickle. |
|
Convert _u.mat from wannier90 to pickled python dictionary. |
|
From the maxima in each direction, make a regular mesh |
|
Unite dictionary with keys as (Rx, Ry, Rz) to three dictionaries |
|
Get energy window limits for wannierization. |