Skip to content

Latest commit

 

History

History
87 lines (75 loc) · 3.2 KB

wannier90.md

File metadata and controls

87 lines (75 loc) · 3.2 KB

ABACUS-wannier90 interface

back to main page

Wannier90 is a useful package to calculate the maximally-localized Wannier functions (MLWFs) [15] and related quantities. ABACUS provides an interface to Wannier90 package. The users are assumed to be familiar with the use of Wannier90. To construct the MLWFs using the wave functions of ABACUS generally requires four steps. Here we use the diamond as an example.

This example can be found in examples/wannier90-example/ABACUS_towannier90/.

First, you need prepare a Wannier90 input file, e.g., “diamond.win”, which is the master input file for Wannier90. It contains the specification of the system and any parameters for the run. You should run “wannier90 -pp diamond.win” to generate “diamond.nnkp” file which will be read in by ABACUS later.

num_wann = 4
num_iter = 20
wvfn_formatted = .true.
begin atoms_frac
C -0.12500 -0.1250 -0.125000
C 0.12500 0.1250 0.125000
end atoms_frac
begin projections
f=0.0,0.0,0.0:s
f=0.0,0.0,0.5:s
f=0.0,0.5,0.0:s
f=0.5,0.0,0.0:s
end projections
begin unit_cell_cart
-1.613990 0.000000 1.613990
0.000000 1.613990 1.613990
-1.613990 1.613990 0.000000
end unit_cell_cart
mp_grid : 4 4 4
begin kpoints
0.0000 0.0000 0.0000
0.0000 0.2500 0.0000
...
end kpoints

Second, do a self-consistent calculation as described in Sec. 4.6.1 and get the converged charge density. Third, do a non-self-consistent calculation. You should setup the ABACUS INPUT parameters and KPT file according to the “diamond.win” file. The ABACUS INPUT file and KPT file for the nscf calculation for the fifth example (diamond) in the Wannier90 package are given below.

INPUT_PARAMETERS
ntype 1
ecutwfc 40
nbands 4 ! number of bands
calculation nscf ! non-self-consistent calculation
niter 40
ethr 1.0e-8
dr2 1.0e-8
start_charge file ! read charge from files
#Parameters(wannier90)
towannier90 1 ! use the ABACUS-wannier90 interface
nnkpfile diamond.nnkp ! specify .nnkp file
K_POINTS
64
Direct
0.0000 0.0000 0.0000 0.0156250
0.0000 0.2500 0.0000 0.0156250
0.0000 0.5000 0.0000 0.0156250
0.0000 0.7500 0.0000 0.0156250
0.2500 0.0000 0.0000 0.0156250
0.2500 0.2500 0.0000 0.0156250
0.2500 0.5000 0.0000 0.0156250
0.2500 0.7500 0.0000 0.0156250
0.5000 0.0000 0.0000 0.0156250
0.5000 0.2500 0.0000 0.0156250
0.5000 0.5000 0.0000 0.0156250
0.5000 0.7500 0.0000 0.0156250
...

Here, we have two parameters:

  • towannier90 : 1, generate files for wannier90 code; 0, do not generate.
  • nnkpfile : the name of the .nnkp file If you use nspin=2, there is one additional parameter in the INPUT:
  • wannier_spin : up, calculate the Wannier functions for the spin up components ; down, calculate the Wannier functions spin down components.

After the nscf calculation, ABACUS will generate “diamond.amn”, “diamond.mmn”, “diamond.eig”, “UNK*” files in the OUT.* folder. Finally, you should run “wannier90 diamond.win”, to get the MLWFs.

Notes:

  • The ABACUS-wannier90 interface can be used in both pw and lcao basis.
  • You must set “wvfn_formatted = .true.” in “diamond.win”, otherwise Wannier90 code cannot read files generated by ABACUS because these files are not binary files.

back to top