Input Files

To run WanTiBEXOS, you’ll need the main input file that specifies the names of the other input files. Here’s an example of what that main input file might look like:

NTHREADS= 16
SYSDIM= "2D"
DFT= V
BANDS= T
BSE= T
DTDIAG= T
CPOL= T
BSE_BND= T
SPEC= T
PP_ONLY= F
TMCOEF= T
BSE_WF= F
EXC_WF_I= 1
EXC_WF_F= 2
PARAMS_FILE= "gesnse2_hr.dat"
KPATH_FILE= "kpoints.dat"
KPATH_BSE= "kpoints-bse.dat"
OUTPUT= "./out2/"
CALC_DATA= "./out2/"
COULOMB_POT= "V2DT"
MESH_TYPE= "RK2D"
RK= 120
CSHIFT= 0.05
ENSPECI=  0.00
ENSPECF=  4.00
NESPEC=   6001
NBANDSC= 4
NBANDSV= 3

Warning

All Flags in the input file should be written according to this pattern FLAG= Value (no blank spaces between the FLAG string and the ‘=’ symbol).

Warning

The order of the flags is not important.

Executable files

After compiling the code, seven executable files will be generated in the bin folder. Each of them has the following functions:

  • wtb.x: This is the main executable file. It can be executed using the command: wtb.x < input.dat, where input.dat is the main input file. Note: This code does not contain an interface with MPI, so do not try to run it using the mpirun -np command.

  • wtbf.x: This file is faster than wtb.x, but it consumes more RAM memory during BSE calculations.

  • dirgapf.x: This post-processing script reads the band.dat file and finds both direct and indirect bandgaps. It can be executed using the command: dirgapf.x nb nocp nk < bands.dat > dirgap.out, where nb, nocp, and nk are the numbers of wannier projections, occupied states, and k-points used to generate the band.dat file, respectively.

  • param_gen.x or param_gen_vasp.x: These pre-processing tools are used to read the wannier90.win file and its output files, and then generate the MLWF-TB parameters file named tb_hr.dat. They should be executed in the folder containing the DFT and Wannier90 outputs. Before running these scripts, the Wannier90 input.win file must be renamed to wannier90.win.

  • nc_nv_finder.x: This post-processing tool can be used to estimate the number of conduction and valence states (NBANDSC and NBANDSV) necessary to provide a reliable dielectric function in the interval of ENSPECI to ENSPECF. To use this tool, enter the command: nc_nv_finder.x < input.dat >> input.dat.

WanTiBEXOS Flags

\(\texttt{NTHREADS}\)

Description: Number of threads used to run the code in parallel with OpenMP.

1Type: integer
2Default: NTHREADS= 1

\(\texttt{SYSDIM}\)

Description: Used to define the dimensions of your system, it’s used to select the correct expression to calculate exciton lifetime, showed in section ref{sec:lft}. (It is used to define the dimension of your system so that a proper expression of Coulomb interaction is chosen to calculate exciton lifetime, see section ref{sec:lft})

1Type: character(len=2)
2Default: SYSDIM= 3D
3Available values: 3D, 2D, 1D

\(\texttt{DFT}\)

Description: Uses (Chose) V if obtained the wannierization from VASP package, using the patch for MLWF, available in: url{https://github.com/Chengcheng-Xiao/VASP2WAN90_v2_fix}, or O if another DFT code is used (otherwise, for other DFT packages, select “O” ). It’s used to performs (perform) SpinDOS and band structure calculations with average values of \(S_z\) operator.

1Type: character(len=1)
2Default: DFT= V
3Available values: V, O

\(\texttt{TA}\)

Description: Used to define the bandgap correction due to temperature effects.

Type: character(len=2)
Default: TA= FA
Available values: FA, BE, VE

\(\texttt{PARAMS_FILE}\)

Description: Localization of the TB parameters file.

Warning

Mandatory flag to run the code

\(\texttt{OUTPUT}\)

Description: Folder to put the output files generated by the code.

1Type: character(len=70)
2Default: `./`

\(\texttt{CALC_DATA}\)

Description: Folder to put the output log files generated by the code.

1Type: character(len=70)
2Default: `./`

\(\texttt{PP_ONLY}\)

Description: If set to T, the code will only perform the post-processing steps. If set to F, the code will perform the post-processing steps and the electronic structure calculations.

1Type: logical
2Default: PP_ONLY= F

\(\texttt{KPATH_FILE}\)

Description: Localization for the file with the \(\textbf{k}\)-path (Directory which contains the file of \(\textbf{k}\)-path) used for electronic structure and berry curvature calculations.

1Type: character(len=70)
2Default: KPATH_FILE= non declared file

\(\texttt{KPATH_BSE}\)

Description: Localization for the file with the \(\textbf{k}\)-path (Directory which contains the file of \(\textbf{k}\)-path)

1Type: character(len=70)
2Default: non declared file

\(ORB_W\)

Description: Localization of the file with the selected orbitals to make projected DOS and band structure by using orbital contribution color code.

1Type: character(len=70)
2Default: non declared file

\(\texttt{BANDS}\)

Description: \(\texttt{BANDS= T}\) run electronic band structure calculation.

1Type: logical
2Default: BANDS= F

\(\texttt{DOS}\)

1Type: logical
2Default: DOS= F

\(\texttt{BSE}\)

Description: \(\texttt{BSE= T}\) run BSE calculation. Gives only direct exciton energies and their oscillator force for each state, using the selected conduction and valence states. Also calculates oscillator force for each direct optical transition, using the selected conduction and valence states.

1Type: logical
2Default: BSE= F

\(\texttt{BSET}\)

Description: \(\texttt{BSET= T}\) run BSE calculation with temperature effects. It gives only direct exciton energies and their oscillator force for each state, using the selected conduction and valence states. Also calculates oscillator force for each direct optical transition, using the selected conduction and valence states.

1Type: logical
2Default: BSET= F

\(\texttt{BSE_BND}\)

Description: \(\texttt{BSE_BND= T}\) run BSE excitonic band structure calculation. Gives indirect exciton energies, using the selected conduction and valence states.

1Type: logical
2Default: BSE_BND= F

\(\texttt{BSET_BND}\)

Description: \(\texttt{BSE_BND= T}\) run BSE excitonic band structure calculation, with temperature effects. It gives indirect exciton energies, using the selected conduction and valence states.

1Type: logical
2Default: BSET_BND= F

\(\texttt{DIEL}\)

Description: \(\texttt{DIEL= T}\) calculates oscillator force for each direct optical transition, using the selected conduction and valence states.

1Type: logical
2Default: DIEL= F

\(\texttt{OPT_BZ}\)

Description: \(\texttt{OPT_BZ= T}\) calculates oscillator force per \(\textbf{k}\)-point, using the selected conduction and valence states.

1Type: logical
2Default: OPT_BZ= F

\(\texttt{SPEC}\)

Description: \(\texttt{SPEC= T}\) calculates dielectric function (real and imaginary parts), absorption coefficient, extinction coefficient, refractive index and reflectibility with (texttt{BSE= T} or texttt{BSET= T}) or without excitation coefficients (texttt{DIEL= T}).

1Type: logical
2Default: SPEC= F

\(\texttt{RNMD}\)

Description: \(\texttt{RNMD= T}\) makes a renormalization of the imaginary component of dielectric function.

1Type: logical
2Default: RNMD= T

\(\texttt{BERRY_BZ}\)

Description: \(\texttt{BERRY_BZ= T}\) calculates total Berry curvature (semiconductors only) in the entire Brillouin Zone.

1Type: logical
2Default: BERRY_BZ= F

\(\texttt{BERRY}\)

Description: \(\texttt{BERRY= T}\) calculates total Berry curvature (semiconductors only) in a selected \(\textbf{k}\)-path given by the \(\texttt{KPATH_FILE}\).

1Type: logical
2Default: BERRY= F

\(\texttt{PP_ONLY}\)

Description: \(\texttt{PP_ONLY= T}\) calculates dielectric function (real and imaginary parts), absorption coefficient, extinction coefficient, refractive index, reflectibility and energy loss function with (texttt{BSE= T} or texttt{BSET= T}) and/or without excitonic effects (texttt{DIEL= T}), and exciton lifetimes, \({If \texttt{BSE= T}\) (\(\texttt{BSET= T}\)) and/or \(\texttt{DIEL= T}\), was calculated on previous run using \(\texttt{SPEC= F}\)}.

1Type: logical
2Default: PP_ONLY= F

\(\texttt{BSE_WF}\)

Description: \(\texttt{BSE_WF= T}\) returns excitonic wave function output file, from \(\texttt{BSE= T}\) (\(\texttt{BSET= T}\)) and/or \(\texttt{BSE_BND= T}\) (\(\texttt{BSET_BND= T}\)) calculations, from the excitonic states defined in the interval \(\texttt{EXC_WF_I}\) to \(\texttt{EXC_WF_F}\) variables.

1Type: logical
2Default: BSE_WF= F

\(\texttt{TMCOEF}\)

Description: \(\texttt{TMCOEF= T}\) generates transition matrix elements (oscillator force) for the optical transitions for each \(\textbf{k}\)-point, using the selected conduction and valence states.

1Type: logical
2Default: TMCOEF= F

\(\texttt{DTDIAG}\)

Description: \(\texttt{DTDIAG= T}\) calculates the xy, xz and yz components of dielectric functions from

\(\texttt{BSE= T}\) (\(\texttt{BSET= T}\)) calculation, if \(\texttt{DTDIAG= F}\) these components are set to 0.

1Type: logical
2Default: DTDIAG= F

\(\texttt{CPOL}\)

Description: \(\texttt{CPOL= T}\) calculates the dielectric functions considering the circular polarization, \(\sigma_{+}\) and \(\sigma_{-}\) components, from \(\texttt{BSE= T}\) (\(\texttt{BSET= T}\)) calculations, if \(\texttt{CPOL= F}\) these components are set to 0.

1Type: logical
2Default: CPOL= F

\(\texttt{PCE}\)

Description: \(\texttt{PCE= T}\) calculates the power conversion efficiency for solar cells with the corresponding crystal of \(\texttt{PARAMS_FILE}\). For this calculation it is necessary to calculate first the absorption spectrum with or/and without excitonic effects. It’s also necessary to informs the selected solar temperature (\(\texttt{CTEMP}\)), maximum cell thickness (\(\texttt{THMAX}\)), fundamental bandgap (\(\texttt{EG}\)), direct bandgap (\(\texttt{EGD}\)), direct bandgap (\(\texttt{EGD}\)), exciton ground state energy (\(\texttt{EGS}\)) and exciton bright ground state energy (\(\texttt{EBGS}\)).

1Type: logical
2Default: PCE= F

\(\texttt{NGX}\)

Description: \(\texttt{NGX}\) sets the number of grid points in the \(\textbf{k}\)-mesh grid along the first reciprocal lattice vector.

1Type: integer
2Default: NGX= 1

\(\texttt{NGY}\)

Description: \(\texttt{NGY}\) sets the number of grid points in the \(\textbf{k}\)-mesh grid along the second reciprocal lattice vector.

1Type: integer
2Default: NGY= 1

\(\texttt{NGZ}\)

Description: \(\texttt{NGZ}\) sets the number of grid points in the \(\textbf{k}\)-mesh grid along the third reciprocal lattice vector.

1Type: integer
2Default: NGZ= 1

\(\texttt{SHIFT_1}\)

Description: \(\texttt{SHIFT\_1}\) sets the first component of the \(\textbf{k}\)-mesh shift first coordinate, direct units.

1Type: real
2Default: SHIFT_1= 0.0

\(\texttt{SHIFT_2}\)

Description: \(\texttt{SHIFT_2}\) sets the second component of the \(\textbf{k}\)-mesh shift first coordinate, direct units.

1Type: real
2Default: SHIFT_2= 0.0

\(\texttt{SHIFT_3}\)

Description: \(\texttt{SHIFT_3}\) sets the third component of the \(\textbf{k}\)-mesh shift first coordinate, direct units.

1Type: real
2Default: SHIFT_3= 0.0

\(\texttt{MESH_TYPE}\)

Description: \(\texttt{MESH_TYPE= MKH}\) generates a \(\textbf{k}\)-mesh with the input variables \(\texttt{NGX, NGY, NGZ}\). Otherwise, it creates an Automatic \(\textbf{K}\)-mesh for 3D or 2D systems, defining \(\texttt{NGX, NGY, NGZ}\) for a certain density of the \(\textbf{k}\)-points, given by the flag \(\texttt{RK}\).

1Type: character
2Default: MESH_TYPE= MKH
3Available values: MKH, RK3D or RK2D

\(\texttt{RK}\)

Description: \(\texttt{RK}\) sets the density of the \(\textbf{k}\)-points for the automatic \(\textbf{k}\)-mesh generator.

1Type: real
2Default: RK= 0.0

\(NEDOS\)

Description: \(\texttt{NEDOS}\) sets the number of points used in the electronic energy interval in \(\texttt{DOS= T}\) calculation.

1Type: integer
2Default: NEDOS= 6001

\(\texttt{SIGMA}\)

Description: \(\texttt{SIGMA}\) sets the Gaussian smearing parameter used in texttt{DOS= T} calculation.

1Type: real
2Default: SIGMA= 0.08

\(\texttt{NBANDSC}\)

Description: \(\texttt{NBANDSC}\) sets the number of conduction bands above Fermi level is used for the calculation of optical and excitonic properties.

1Type: integer
2Default: NBANDSC= 1

\(\texttt{NBANDSV}\)

Description: \(\texttt{NBANDSV}\) sets the number of valence bands below Fermi level is used for the calculation of optical and excitonic properties.

1Type: integer
2Default: NBANDSV= 1

\(\texttt{ENSPECI}\)

Description: \(\texttt{ENSPECI}\) sets the lower limit of photon energy in the calculation of dielectric function and other optical properties.

1Type: real
2Default: ENSPECI= 0.0

\(\texttt{ENSPECF}\)

Description: \(\texttt{ENSPECF}\) Upper limit of photon energy in the calculation of dielectric function and other optical properties.

1Type: real
2Default: ENSPECF= 3.0

\(\texttt{NESPEC}\)

Description: \(\texttt{NESPEC}\) Number of points used to calculate the dielectric function and other optical properties.

1Type: integer
2Default: NESPEC= 6001

\(\texttt{CSHIFT}\)

Description: \(\texttt{CSHIFT}\) Smearing parameter used to avoid numerical singularities in the calculation of dielectric function including both real and imaginary parts.

1Type: real
2Default: CSHIFT= 0.01

\(\texttt{KTOL}\)

Description: \(\texttt{KTOL}\) Tolerance factor to avoid numerical singularities in the calculation of the Coulomb Potentials, used in \(\texttt{BSE= T}\) and \(\texttt{BSE\_BND= T}\) calculations.

1Type: real
2Default: KTOL= 0.001

\(\texttt{EXC_WF_I}\)

Description: \(\texttt{EXC_WF_I}\) First excitonic state to plot exciton wavefunction.

1Type: integer
2Default: EXC_WF_I= 1

\(\texttt{EXC_WF_F}\)

Description: Last excitonic state to plot exciton wavefunction. The excitonic wavefunctions are plot for the excitonic states in the interval \(\texttt{EXC_WF_I}\) to \(\texttt{EXC_WF_F}\).

1Type: integer
2Default: EXC_WF_F= 2

\(\texttt{COULOMB_POT}\)

Description: \(\texttt{COULOMB_POT}\) Selects the Coulomb potential which is used in \(\texttt{BSE= T}\) and \(\texttt{BSE\_BND= T}\) calculations.

1Type: character
2Default: COULOMB_POT= V3D
3Available values: V3D, V3DL, V2DK, V2DT, V2DT2, V2DOH, V2DRK, V1DT, V0DT

\(\texttt{EDIEL}\)

Description: \(\texttt{EDIEL}\) Variable used to describe the Coulomb potentials.

1Type: real
2Default: EDIEL= 1.0

\(\texttt{EDIEL_T}\)

Description: \(\texttt{EDIEL_T}\) Variable used to describe the Coulomb potentials at finite temperature.

1Type: real
2Default: EDIEL_T= 1.0

\(\texttt{EDIEL\_B}\)

Description: \(\texttt{EDIEL_B}\) Variable used to describe the Coulomb potentials at finite temperature.

1Type: real
2Default: EDIEL_B= 1.0

\(\texttt{EDIEL_Z}\)

Description: \(\texttt{EDIEL_Z}\) Variable used to describe the Coulomb potentials at finite temperature.

1Type: real
2Default: EDIEL_Z= 1.0

\(\texttt{W_COUL}\)

Description: \(\texttt{W_COUL}\) Variable used to describe the Coulomb potentials.

1Type: real
2Default: W_COUL= 0.0

\(\texttt{LC}\)

Description: \(\texttt{LC}\) Variable used to describe the Coulomb potentials.

1Type: real
2Default: LC= 1.0

\(\texttt{R_0}\)

Description: \(\texttt{R_0}\) Variable used to describe the Coulomb potentials.

1Type: real
2Default: R_0= 1.0

\(\texttt{ST}\)

Description: \(\texttt{ST}\) Variable used in the finite temperature BSE.

1Type: real
2Default: ST= 0.0

\(\texttt{PHAVG}\)

Description: \(\texttt{PHAVG}\) Variable used in the finite temperature BSE.

1Type: real
2Default: PHAVG= 0.0

\(\texttt{TEMP}\)

Description: \(\texttt{TEMP}\) Temperature in \(K\) used in the finite temperature BSE.

1Type: real
2Default: TEMP= 0.0

\(\texttt{SES}\)

Description: \(\texttt{SES}\) Selection of the type of solar emission spectrum.

1Type: character
2Default: SES= AM15G
3Available values: AM15G,AM15D,AM0G

\(\texttt{CTEMP}\)

Description: \(\texttt{CTEMP}\) Solar cell Temperature in \(K\) used in the PCE calculation.

\(\texttt{THMAX}\)

Description: \(\texttt{THMAX}\) Maximum solar cell thickness in \(m\) for PCE, with SLME method calculation.

1Type: real
2Default: THMAX= 5E-06

\(\texttt{EG}\)

Description: \(\texttt{EG}\) Fundamental bandgap in \(eV\) used in the PCE calculation.

1Type: real
2Default: EG= 0.0

\(\texttt{EGD}\)

Description: \(\texttt{EGD}\) Optical bandgap (direct bandgap of allowed optical transition) in eV used in the PCE calculation.

1Type: real
2Default: EGD= 0.0

\(\texttt{EGS}\)

Description: \(\texttt{EGS}\) Exciton ground state energy in si{electronvolt} used in the PCE calculation. Usually it is the lowest energy value obtained from texttt{BSE_BND= T} or texttt{BSET_BND= T} calculations. If the material is of a direct bandgap, this value could also be the lowest energy value of texttt{BSE= T} or texttt{BSET= T} simulations.

1Type: real
2Default: EGS= 0.0

\(\texttt{EBGS}\)

Description: \(\texttt{EBGS}\) Bright exciton ground state energy in si{electronvolt} used in the PCE calculation. It is obtained from the lowest bright exciton energy calculation with the flags texttt{BSE= T} or texttt{BSET= T}.

1Type: real
2Default: EBGS= 0.0