This lesson aims at showing how to use the Wannier90 interface to compute Maximally Localized Wannier Functions (MLWFs).
This lesson should take about 1 hour. And it is important to note that all the cases in the tutorial are not converged they are just examples to show how to use the code.
Wannier90 is a code that computes MLWFs (see www.wannier.org ). Wannier90 uses the methodology introduced by N. Marzari and D. Vanderbilt in 1997 and it is highly recommended to read the following papers to understand its basics:
N. Marzari and D. Vanderbilt, Maximally localized generalized Wannier functions for composite energy bands, Phys. Rev. B 56, 12847 (1997)
I. Souza, N. Marzari and D. Vanderbilt, Maximally localized Wannier functions for entangled energy bands, Phys. Rev. B 65, 035109 (2002)Wannier functions (WFs) can be obtained from Bloch states by means of the formulas 1-3 of SMV. As you may note there is a freedom of choice of Bloch orbital's phase which is reflected on the shape and spatial extent of the WF. i.e., for different phases there will be WFs with different spatial localizations. To obtain the MLWFs we minimize the spread of the WF with respect to the choice of phase. This is done by using a steepest-descent algorithm, see section D of MV.
Now we will compute a set of MLWFs for the silicon case. We are going
to extract the Wannier functions corresponding to the four valence
states of silicon.
Before beginning, you might consider to work in a different
sub-directory as for the other lessons. Why not "Work_w90" ?
Copy the files tw90_1.files, tw90_1.in and wannier90.win in "Work_w90" :
Wannier90 also uses a secondary input file which is called wannier90.win. Therefore, you must include this file in the folder:
Now you are ready to run abinit. Please type in:
Let's examine the input file tw90_1.in, while the calculation is running.
The input file should look familiar to you. It is indeed the silicon
case. It has two data sets: first a SCF calculation and then a NSCF calculation which will call the Wannier90 library.
The only new input variable is
prtwant which has to be set to 2 in order to use
the Wannier90 utility.
Now lets look the secondary input file wannier90.win. This is a mandatory input file required by the Wannier90 library. There are many variables that can be defined inside this file. In our case we used num_wann and num_iter. These variables are to be used in the minimization of the spread to obtain the MLWF. In particular, num_wann tell us the number of Wannier functions to extract while num_iter sets the number of iterations. There are also variables to govern the disentanglement procedure outlined in SMV which are not used in this simple case. The complete list of input variables can be found in the Wannier90 user guide (see www.wannier.org).
We can now examine the log file. After the convergence of the SCF cycle is reached. We can see that the Wannier90 library is called. You will find the following lines:
Calculation of overlap and call to Wannier90 library to obtain Maximally Localized Wannier functions - wannier90.win is a mandatory secondary input - wannier90.wout is the output for the library - wannier90.amn contains projections - wannier90random.amn contains random projections - wannier90.mmn contains the overlap - wannier90.eig contains the eigenvaluesThis is an explanation of the input and output files for the Wannier90 library. As you can see many new files were created. The input files for Wannier90 which were created by ABINIT are:
If you want to obtain information about the disentanglement procedure just type:
+---------------------------------------------------------------------+<-- DIS | Iter Omega_I(i-1) Omega_I(i) Delta (frac.) Time |<-- DIS +---------------------------------------------------------------------+<-- DISSimilarly to obtain information about the steepest-descent minimization just issue:
+--------------------------------------------------------------------+<-- CONV | Iter Delta Spread RMS Gradient Spread (Ang^2) Time |<-- CONV +--------------------------------------------------------------------+<-- CONVYou can verify that the final spread you get is around 4.0 ang^2
Visualize the Wannier functions
You can see the Wannier functions in xcrysden format. Just type:
Notes:
The PAW method is implemented in such a way that it is very easy to use. For the silicon case we just have to add the variable pawecutdg. And the PAW Atomic Data is included in the pseudopotential file. An example has already been prepared.
Just copy the files tw90_2.files and tw90_2.in into "Work_w90":
We are going to reuse the wannier90.win of the previous example. Now, just run abinit again
As it is expected, the results should be similar than those of the PW case.
Important For the PAW case the UNK files are not those of the real wavefunctions. The contribution inside the spheres is not computed, however, they can be used to plot the Wannier functions.
We are going to extract the sp3 hybrid orbitals of Silane SiH4. You can start by copying the following files:
Now run abinit
While it is running we
can start to examine the input files.
Open the main input file tw90_3.in. The file is divided into
three datasets. First a SCF calculation is done. What follows is a NSCF
calculation including more bands. Finally, in the third dataset we just read
the wavefunction from the previous one and the Wannier90 library is
called.
w90iniprj is a keyword used to indicate that the
initial projections will be given in the .win file.
Note.
Now open the .win file. The initial projections will be the sp3 hybrid orbitals centered in the position of the silicon atom. This is written explicitly as:
begin projections Si:sp3 end projectionsThere is an enormous freedom of choice for the initial projections. For instance, you can define the centers in Cartesian coordinates or rotate the axis. Please refer to the Wannier90 user guide and see the part related to projections (see www.wannier90.org).
Now we will going to redo the silicon case but defining different initial projections.
This calculation will be more time consuming, so you can start by running the calculation while reading:
Initial projections:
In this example we extract sp3 orbitals centered on the silicon atoms. But you could also extract bonding and anti-bonding orbitals by uncommenting and commenting the required lines as it is indicated in tw90_4o_DS3_w90.win.
You can see that we are using r=4 in the initial projections block. This is to indicate that the radial part will be a Gaussian function whose width can be controlled by the value of the variable "zona". The main advantage over radial functions in the form of hydrogenic orbitals is that the time to write the .amn file will be reduced.
Interpolated band structure
We are going to run Wannier90 in standalone mode. Just comment out the first two lines of the .win file:
postproc_setup = .true. !used to write .nnkp file at first run num_iter = 100 wannier_plot = .true. wannier_plot_supercell = 3And uncomment the following two lines:
!restart = plot !bands_plot = .true.Now run Wannier90:
Now you can continue discovering the capabilities of Wannier90.