Tutorial
In the example, we provide the instructions and files needed to calculate carrier mobility limited by S-vacancy of MoS2.
After downloading the package, the files could be found in example folder.
Setup
This example consists of the input files for QE to generate the wavefunction and the perturbation potential modelling a S-vacancy of MoS2 in a 6-by-6 supercell. The obtained files could then be used to calculate the e-d interaction matrix elements with EDI. Further instructions are then provided to obtain the carrier mobility limited defect.
When running the example, first follow the instructions in the Installation section and compile pw.x, pp.x, and edi.x.
Assume they are located in $BIN folder,
then copy the files in the example to a working directory to perform the calculation.
DFT calculation
Scf calculation to obtain the perturbation potential:
Use the input files
pristine.scf.inanddefect.scf.into perform scf calculations for the pristine and defect structures.
$ mpirun -np $N $BIN/pw.x <prinstine.scf.in >prinstine.scf.out
$ mpirun -np $N $BIN/pw.x <defect.scf.in >defect.scf.out
Postprocessing to generate the files of the perturbation potential:
Use the input files
pristine.pp.inanddefect.pp.into generate potential data files for the pristine and defect structures.
$ mpirun -np $N $BIN/pp.x <prinstine.pp.in >prinstine.pp.out
$ mpirun -np $N $BIN/pp.x <defect.pp.in >defect.pp.out
EDI preprocessing
Calculate the band structure for full k grid
Use the input files
unitcell.scf.in,unitcell.w90.into generate a coarse grid band structure.
$ mpirun -np $N $BIN/pw.x <unitcell.scf.in >unitcell.scf.out
$ mpirun -np $N $BIN/pw.x <unitcell.w90.in >unitcell.w90.out
Use the input files
w90_mos2.win,pw2w90.into generate a fine grid band structure. This example is usingwannier90.x, assuming under the same directory$BIN.
$ mpirun -np $N $BIN/wannier90.x -pp w90_mos2
$ mpirun -np $N $BIN/pw2wannier90.x <pw2w90.in >pw2w90.out
$ mpirun -np $N $BIN/wannier90.x w90_mos2
$ mpirun -np $N $BIN/postw90.x w90_mos2
The generated velocity file
w90_mos2_geninterp.datis needed for next step.
Generate the needed k points for e-d interaction matrix elements with triangular integral method
Use the script
wmat_mos2.pyto obtain a list of k points in filekpt.dat, and a list of k point pairs to calculate the e-d interaction matrix element together with the weightwt.dat.
$ python wmat_mos2.py
Prepare the input files for nscf calculation with the data from
kpt.datfile. This resulted file is provided asunitcell.nscf.in.
EDI calculation
Generate the wavefunctions for the needed k points
Use the input files
unitcell.scf.inandunitcell.nscf.into generate wavefunctions with proper k points.
$ mpirun -np $N $BIN/pw.x <unitcell.scf.in >unitcell.scf.out
$ mpirun -np $N $BIN/pw.x -nk $NK <unitcell.nscf.in >unitcell.nscf.out
Calculate e-d interaction matrix element
Use the input files
calcmdefect.datand prepared weight filewt.datto perform matrix element calculation withedi.x.
$ mpirun -np $N $BIN/edi.x -ni $N >output
Mobility calculation
Use MRTA model to calcualted the carrier mobility
Previous calculation gives
pp.datfile, use this file and the postprocessing scriptmu.pyto calculate the carrier mobility.
$ python mu.py
This step will generate an output file containing the mobility, as well as the scattering rate which is ready to be plot.