Tools for the projection on wannier functions scheme (adaptor).
Source: wannier.jl
ZenCore.adaptor_callZenCore.pw2wan_execZenCore.pw2wan_initZenCore.pw2wan_saveZenCore.w90_diag_hamkZenCore.w90_find_bwinZenCore.w90_make_chipsiZenCore.w90_make_ctrlZenCore.w90_make_groupZenCore.w90_make_hamkZenCore.w90_make_hamrZenCore.w90_make_kpathZenCore.w90_make_mapZenCore.w90_make_projZenCore.w90_make_rcellZenCore.w90_make_windowZenCore.w90_read_amatZenCore.w90_read_eigsZenCore.w90_read_hamrZenCore.w90_read_udisZenCore.w90_read_umatZenCore.w90_read_woutZenCore.w90_write_winZenCore.wannier_adaptorZenCore.wannier_execZenCore.wannier_initZenCore.wannier_save
Functions
ZenCore.adaptor_call — Methodadaptor_call(::WANNIERAdaptor,
D::Dict{Symbol,Any},
ai::Array{Impurity,1})It is a dispatcher for the DFT-DMFT adaptor. It calls wannier_adaptor() function to deal with the outputs of wannier90 code and generate key dataset for the IR adaptor. Note that similar functions are also defined in vasp.jl, qe.jl, and plo.jl.
See also: wannier_adaptor.
ZenCore.wannier_adaptor — Functionwannier_adaptor(D::Dict{Symbol,Any}, ai::Array{Impurity,1})Adaptor support. It will read and parse the outputs of the wannier90 code, convert the data into IR format. The data contained in D dict will be updated.
Be careful, now this adaptor only supports quantum espresso (pwscf).
See also: qe_adaptor, ir_adaptor.
ZenCore.wannier_init — Functionwannier_init(D::Dict{Symbol,Any}, sp::String = "")Try to generate the w90.win file, which is the essential input for the wannier90 code. Here, we always use w90 as the seedname. If the system is spin polarized (the argument sp is up or dn), then the seednames will be w90up and w90dn, respectively.
See also: wannier_exec, wannier_save.
ZenCore.wannier_exec — Functionwannier_exec(sp::String = ""; op::String = "")Execute the wannier90 program, monitor the convergence progress, and output the relevant information. The argument sp denotes the spin component, while op specifies the running mode for wannier90. If op == -pp, the wannier90 code will try to generate the w90.nnkp.
See also: wannier_init, wannier_save.
ZenCore.wannier_save — Functionwannier_save(sp::String = ""; op::String = "")Backup and check the output files of wannier90 if necessary. Actually, there are no files that need to be stored. We just check whether they have been created correctly.
See also: wannier_init, wannier_exec.
ZenCore.w90_make_ctrl — Functionw90_make_ctrl(latt:Lattice, nband::I64, fermi::F64)Try to make the control parameters for the w90.win file. The latt object represent the crystallography information, and nband is the total number of Kohn-Sham states outputed by the DFT code, fermi is the fermi level. This function is called by wannier_init().
See also: w90_make_proj.
ZenCore.w90_make_proj — Functionw90_make_proj()Try to make the projection block for the w90.win file. We will not check the validness of these projections here. This function is called by the wannier_init() function.
See also: w90_make_ctrl.
ZenCore.w90_make_map — FunctionZenCore.w90_make_group — Functionw90_make_group(latt::Lattice, sp::String = "")Try to read the w90.nnkp file, parse the projections block. Finally, it will return arrays of PrTrait and PrGroup objects, which contain the definitions of projectors. The argument latt is essential. It includes the atomic coordinates for all lattice sites, which are quite useful to distinguish these projectors. And the argument sp is optional. It is used when the system is spin-polarized.
ZenCore.w90_make_window — Functionw90_make_window(PG::Array{PrGroup,1}, enk::Array{F64,3})Make band window to filter the projections. Actually, all of the Kohn-Sham eigenvalues are retained, so the band window is always [1, nband]. This function will return an array of PrWindow struct.
See also: PrWindow.
w90_make_window(PG::Array{PrGroup,1},
ewin::Tuple{F64,F64},
bwin::Array{I64,2})Make band window to filter the projections. Actually, only those relevant bands (which are restricted by the energy window ewin or the band window bwin) are retained. This function will return an array of PrWindow struct. Be careful, ewin must be consistent with bwin (please check w90_find_bwin() for more details).
See also: PrWindow.
w90_make_window(PWup::Array{PrWindow,1}, PWdn::Array{PrWindow,1})Try to merge two arrays of PrWindow struct and generate a new one. Actually, the new array is similar to the olds. We only modify one of its members, kwin.
See also: PrWindow.
ZenCore.w90_make_chipsi — Functionw90_make_chipsi(umat::Array{C64,3}, udis::Array{C64,3})Try to merge the transform matrix umat with the disentanglement matrix udis to construct the final projection matrix chipsi, which actually is the overlap matrix between the wannier functions and the Kohn-Sham wave functions.
See also: w90_read_umat, w90_read_udis.
w90_make_chipsi(PG::Array{PrGroup,1}, chipsi::Array{C64,4})Perform global rotations or transformations for the projectors. In this function, the projectors will be classified into different groups, and then they will be rotated group by group. This function is just a copy of the plo_rotate() function.
See also: PrGroup, plo_rotate.
w90_make_chipsi(PW::Array{PrWindow,1}, chipsi::Array{Array{C64,4},1}}Filter the projector matrix according to band window. This function is just a copy of the plo_filter() function.
See also: PrWindow, plo_filter.
ZenCore.w90_make_kpath — Functionw90_make_kpath(ndiv::I64,
kstart::Array{F64,2},
kend::Array{F64,2})Try to generate 𝑘-path along the selected high-symmetry directions in the Brillouin zone. The argument ndiv means the number of divisions for each 𝑘-path. While kstart and kend denote the 𝑘 coordinates for the starting and ending points of the 𝑘-path, respectively. Note that this function is used to perform wannier band interpolation.
See also: w90_make_rcell.
ZenCore.w90_make_rcell — Functionw90_make_rcell(latt::Lattice)Calculates a grid of points that fall inside of (and eventually on the surface of) the Wigner-Seitz supercell centered on the origin of the given lattice (latt).
See also: w90_make_kpath.
ZenCore.w90_make_hamr — Functionw90_make_hamr(kvec::Array{F64,2},
rvec::Array{I64,2},
hamk::Array{C64,3})Convert the hamiltonian from 𝑘-space to 𝑟-space via the fast fourier transformation. The arguments kvec and rvec define the 𝑘-mesh and 𝑟-mesh, respectively. hamk means $H(K)$ which should be defined in a uniform 𝑘-mesh.
See also: w90_make_hamk.
ZenCore.w90_make_hamk — Functionw90_make_hamk(kvec::Array{F64,2},
rdeg::Array{I64,1},
rvec::Array{I64,2},
hamr::Array{C64,3})Convert the hamiltonian from 𝑟-space to 𝑘-space via the fast fourier transformation. The arguments kvec and rvec define the 𝑘-mesh and 𝑟-mesh, respectively. hamr means $H(R)$ which should be defined in a Wigner-Seitz cell.
See also: w90_make_hamr.
ZenCore.w90_diag_hamk — Functionw90_diag_hamk(hamk::Array{C64,3})Diagonalize the hamiltonian to give band structure.
See also: w90_make_hamk.
ZenCore.w90_find_bwin — Functionw90_find_bwin(ewin::Tuple{F64,F64}, enk::Array{F64,3})During the disentanglement procedure, we can define an outer energy window to restrict the Kohn-Sham eigenvalues. This function will return the corresponding band window, which will be used to displace the disentanglement matrix. Here, ewin is the outer energy window which is extracted from w90.wout, and enk is the Kohn-Sham eigenvalues.
This function works for spin-unpolarized case only.
See also: w90_read_udis, w90_read_wout.
ZenCore.w90_read_amat — Functionw90_read_amat(sp::String = "")Try to read and parse the w90.amn file to get the $A_{mn}$ matrix, which represents the projection of the Bloch states onto trail localized orbitals. The argument sp denotes the spin component.
Note that this function has not been used so far.
ZenCore.w90_read_eigs — Functionw90_read_eigs(sp::String = "")Try to read and parse the w90.eig file to get the band eigenvalues. Note that the eigenvalues from nscf.out are not accurate enough. We will use the data extracted from w90.eig to update them. The argument sp denotes the spin component.
See also: qeio_eigen.
ZenCore.w90_read_hamr — Functionw90_read_hamr(f::String, sp::String = "")Try to read and parse the w90_hr.dat file, return the hamiltonian matrix in WF representation, the Wigner-Seitz grid points, and their weights (degeneracies). The argument sp denotes the spin component. The data return by this function can be used to validate the projection matrix further.
ZenCore.w90_read_umat — Functionw90_read_umat(sp::String = "")Try to read and parse the w90_u.mat file, return the u-matrix, which gives the unitary rotations from the optimal subspace to the optimally smooth states. The argument sp denotes the spin component.
See also: w90_read_udis.
ZenCore.w90_read_udis — Functionw90_read_udis(bwin::Array{I64,2}, sp::String = "")Try to read and parse the w90_u_dis.mat file. Return the udis-matrix, which gives the nproj dimension optimal subspace from the original bloch states. Actually, it is the transform matrix for disentanglement. The argument sp denotes the spin component, the band window bwin is from w90_make_window() and w90_read_wout().
See also: w90_read_umat.
ZenCore.w90_read_wout — Functionw90_read_wout(sp::String = "")Try to read and parse the w90.wout file. Return the energy window for disentanglement procedure. The argument sp denotes the spin component.
See also: w90_make_window.
ZenCore.w90_write_win — Functionw90_write_win(io::IOStream, w90c::Dict{String,Any})Write control parameters into w90.win.
See also: wannier_init.
w90_write_win(io::IOStream, proj::Array{String,1})Write projection block into w90.win.
See also: wannier_init.
w90_write_win(io::IOStream, latt::Lattice)Write crystallography information into w90.win.
See also: Lattice, wannier_init.
w90_write_win(io::IOStream, kmesh::Array{F64,2})Write 𝑘-mesh block into w90.win.
See also: wannier_init.
ZenCore.pw2wan_init — Functionpw2wan_init(case::String, sp::String = "")Check the runtime environment of pw2wannier90, prepare necessary input files (it is case.pw2wan). The argument case means the prefix for quantum espresso, and sp determines the spin component which can be empty string, up, or dn.
See also: pw2wan_exec, pw2wan_save.
ZenCore.pw2wan_exec — Functionpw2wan_exec(case::String, sp::String = "")Execute the pw2wannier90 program, monitor the convergence progress, and output the relevant information. Here, case means the prefix for input files, and sp is up or dn.
See also: pw2wan_init, pw2wan_save.
ZenCore.pw2wan_save — Functionpw2wan_save(sp::String = "")Backup and check the output files of the pw2wannier90 code if necessary. The argument sp specifies the spin component. It could be empty string, up, or dn.
See also: pw2wan_init, pw2wan_exec.