#SBATCH -A mendoza_q
#SBATCH --exclude=amr-163,amr-178,amr-179
this should submit to our queue, exclude your buyin nodes and flip the jobs to run in the general partition, avoiding incurring cpu.
The wannier90 software is most useful for interfacing between DFT software to import parameters to fit electronic properties calculations. Essentially, the code generates an orthogonal basis of wannier orbitals from Bloch plane waves.
To run a wannier90 job requires four files:
<seedname>.win
<seedname>.mmn
<seedname>.amn
<seedname>.eig
These files hold information about the eigenvalues (eig), matrix elements from projections onto Bloch plane waves (mmn and amn), and input parameters (win). Generally, the mmn,amn, and eig files will be automatically generated by the software wannier90 is interfaced to (such as quantum EXPRESSO or VASP). The main file that is modified for the data of interest is the win file.
A simple submission script looks like:
#!/bin/bash
#SBATCH -J <seedname>
#SBATCH -N <number>
#SBATCH -t <hours>:<minutes>:<seconds>
#SBATCH -n <number which is <= 20 >
#SBATCH -p mendoza_q
##SBATCH --output=job.out
export PATH=/gpfs/research/software/wannier90/wannier90-3.0.0:$PATH
module purge
module load intel-openmpi
mpirun -np <# processors> wannier90.x <seedname>
Installing wannier90
After downloading the wannier90 package, access the main directory and copy the make file into it
cp ./config/make.inc.ifort ./make.inc
Open the make file and modify it to include the following lines
#=====================================================
# For Linux with intel version 11/12 on 64bit machines
#=====================================================
F90 = ifort
COMMS=mpi
MPIF90=mpif90
FCOPTS=-O2
LDOPTS=-O2
#========================================================
# Intel mkl libraries. Set LIBPATH if not in default path
#========================================================
#LIBDIR = /opt/intel/mkl/lib/intel64
LIBDIR = /gpfs/research/software/intel-2016-2/mkl/lib/intel64
LIBS = -L$(LIBDIR) -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lpthread
#=======================
# ATLAS Blas and LAPACK
#=======================
#LIBDIR = /usr/local/lib
#LIBS = -L$(LIBDIR) -llapack -lf77blas -lcblas -latlas
Then run the make file by entering make into the terminal. To get the library, enter into the terminal
make wannier lib test
which after running will produce the file libwannier.a in the main directory. This library will be needed for interfacing to DFT software.
Interfacing to VASP
One of the most useful features of wannier90 is the interfacing to DFT software. In particular, the interfacing to VASP allows for a convenient way to do post-processing on VASP results such as electronic properties, topological properties, and electron transport through semi-classical analysis.
I. Installing VASP with Wannier90 Interfacing
To interface properly with wannier90, VASP will need access to the wannier90 library. When installing VASP, the location of the library: libwannier.a will need to be added to the LIBS line as well as the precompiler flag -DVASP2WANNIER90.
II. Set-up:
A. .win file
Before starting the VASP Calculation, an initial .win file should be produced with a projection block specifying the orbitals to be used.
VASP by default sets the tag: use_bloch_phases to true, which means that Bloch plane waves are used instead of projections onto atomic orbitals. However, this produces nonsense. Rather a starting .win file should include the projection random (if the wave functions are not of interest) or specified projections (if they are).
Depending on what is of interest, mixing random and set projections is often the most convenient. Two reasons for this is because the number of bands VASP produces will change when performing parallel processing with processors or the k-mesh. Projections of interest can be set, and the rest can be set to random.
B. perform SCF run
Now, perform a VASP calculation performing an SCF cycle on a relaxed structure to produce a WAVECAR file. This step isn't necessary, but it will save time and remove the risk of restarting your entire calculation if the interface fails.
C. perform interface run
With the WAVECAR, in a new directory or include in the same INCAR the line LWANNIER90 = TRUE, and set ISTART = 1 and ICHARG = 0. Make sure your .win file from Step A. is in the same directory and run a new VASP calculation to perform the interface. If the job runs correctly, the .win file should now contain new blocks with input for the k-mesh, lattice vectors, and basis positions. The wannier90 files .amn, .mmn, and .eig should also be created.
Notes:
1. The VASP interface cannot perform SOC (and hence non-collinear magnetism).
2. The VASP interface sets num_bands = num_wann so that no disentanglement procedure can be done.
Interfacing to Quantum Espresso
Wannier90 also has the capability to be interfaced with the DFT software Quantum Espresso. The set-up for the interface is more complicated than with VASP, but the interfacing offers more control over the number of bands and the ability to include spin-orbit coupling/non-collinear spin calculations.
I. Set-up:
To interface, there are 4 input files that need to be constructed:
– <seedname>.scf The pwscf input file for ground state calculation (performs an scf cycle to get ground state information)
– <seedname>.nscf The pwscf input file to obtain Bloch states on a uniform grid (runs a non-scf cycle calculation to get Bloch states and corresponding eigenvalues. Needed for electron properties)
– <seedname>.pw2wan The input file for pw2wannier90 (This file is the interface, which tells QE to take projection and overlap information to create wannier data)
– <seedname>.win The wannier90 input file (Will be needed to create initial projections for pw2wan and for further post-processing)
1. Run pwscf to obtain the ground state of diamond
pw.x < <seedname>.scf > scf.out
2. Run pwscf to obtain the Bloch states on a uniform k-point grid
pw.x < <seedname>.nscf > nscf.out
3. Run wannier90 to generate a list of the required overlaps (written into the <seedname>.nnkp file).
wannier90.x -pp <seedname>
4. Run pw2wannier90 to compute the overlap between Bloch states and the projections for the
starting guess (written in the <seedname>.mmn and <seedname>.amn files).
pw2wannier90.x < <seedname>.pw2wan > pw2wan.out
5. Run wannier90 to compute the MLWFs.
wannier90.x <seedname>
Notes:
1. For whatever reason, running step 4 produces coordinates with decimals cut off. Need to copy data with at most 7 decimal sig figs. Otherwise the interface will fail.
2. It's hard to determine the number of bands initially, but once pw2wan is executed, the number of bands it determines can be taken and added into the .win file
3. If running SOC and you forget to set 'spinor = T', the error you get tells you that you are using too few projections (no matter the number of projections set).
Interfacing to WannierTools
WannierTools can be thought of as an extension of DFT software which can do standard post-processing (electron properties) and topological calculations (Chern number, Weyl points, Berry curvature, etc.). Input you need are
1. data file containing tight-binding Hamiltonian (from Wannier90 or VASP)
2. wt.in which in the input file
For the input file, there are several sections which must be provided:
&TB_FILE
&SYSTEM
ATOM_POSITIONS
LATTICE
PROJECTORS
WANNIER_CENTRES
SURFACE
Additional vital control sections are:
&CONTROL
&PARAMETERS
A simple submission script looks like:
#!/bin/bash
#SBATCH -J <seedname>
#SBATCH -N <number>
#SBATCH -t <hours>:<minutes>:<seconds>
#SBATCH -n <number which is <= 20 >
#SBATCH -p mendoza_q
##SBATCH --output=job.out
module purge
module load gnu
module load gnu-openmpi
mpirun -np <# processors> wt.x <seedname>
To see examples and tutorials, view: https://buildmedia.readthedocs.org/media/pdf/wannier-tools/latest/wannier-tools.pdf
And download the wannier_tools examples to your workspace.