I want to calculate band gap of some materials but i want to know can i calculate it by just a scf run or i must calculate it by band run after svf in quantum espresso?
1. First of all you should relax the structure (or simple scf if it is already relaxes/optimized).
2. In output, check the number of bands you get from calculation. I.e. It depends on how dense Monkhorst - Pack grid you use or on k-point sampling. Check this by looking in output for the line with sentence i.e:
k = 0.0000 0.0000 0.0000 ( 91475 PWs) bands (ev):
you can grep it of course.
3. Under this sentence you will find "array like" or "matrix like" pack of numbers - count them and remember: It could looks like this:
So in this case (not proper case, but good for example and the first at hand ;) ), there is "nbnd=116" (you don't have this line right now in your input, QE calculates this number as an default value, thanks to other parameters like number of atoms, etc., and it is counted up to the HOMO level.)
4. And now. Do the same calculation as you did at the beginning BUT with added in &SYSTEM card, line with:
nbnd=120,
As you can see, it is higher value than this default one - and it means that you have more bands than HOMO level because you include the LUMO level (LUMO+1, LUMO+2, ...).
You should set nbnd not higher than 20% of yours first nbnd. So in this case you can't go with nbnd>139 (https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm250). You chose the nbnd in this range - it will affect only on computing time. So if you want calculate only the LUMO level set your nbnd=117 (in this case 116+1 = 117 HOMO+1)
5. And at the end check yours new output for the line with sentence like:
dear Miłosz Martynow thanks for your answer but there is a problem:
i founded a line you said in step 5 for GaAs 'highest occupied, lowest unoccupied level (ev): 6.6883 7.7887' but when i run a band input and plot bands structure for this input, in the plot the band gap is about 0.6 ev!
so whats the reason of this difference and so whats the real band gap?
Your system has to be insulator or semiconductor to get band gap. You have to relax the structure unless it has been already relaxed. For the input Occupation should be fixed and you get explicit something like this
Could you attach both of your inputs - pw.x input and band.x input? Maybe band calculation take non relaxed structure from pw.x output (I had such situation - bleh...).
Wikipedia says that the GaAs have 1.4eV direct band gap, so 1.1eV from pw.x calculation are much more reasonable. Achieve 1.4eV is an issue on fixing good other parameters like kinetic energy cutoff and so on.
I attach my all inputs of course i did not relaxed it because its a simple structure and my purpose was not to get good band gap result but i just want to learn how to get band gap in the fastest way.
anyway, if you run them in pw.x package (they dont spend much time) then you see difference of 'highest occupied' and 'lowest unoccupied' is different from band gap Is shown on band structure.
I have no computer for right now with compiled QE. But for first shot I will get focus on the K-points in your inputs of scf and bands calculations.
I see that in scf calculations you use quite dense 666 k-point monkhorst-pack, and in bands calculations you define different k-point grid/k-path (i believe it is something like gamma only calculations).
I know that from my research - denser k-point grid = better results = much more computational time. Please set in both inputs the same k - points grids. Differences between them can be crucial not only for band gaps. You can set in both cases yours 666 k-point monkhorst-pack (automatic), or denser (tpiba_b). First option for beginning is better in my opinion.
I propose that every calculation should have stable inputs. Please make small "benchmark" for few values of ecutwfc, and k-point and find the optimum, and use them in every calculations of the same system.
1. As far as i know from conventional DFT you will never get actual band gap of your sample. People have reported upto 50% lower estimation in B.G.
2. You have to go for Hybrid fuctional (getting band diagram is tedious, you have to extrapolate the hamiltonian with your Wannier basis) or GW correction. Both are very expensive in computational time.
3. Your Pw.Scf BG. and band plot B.G may not match. Pw.scf BG is calculated on the bais of higest and lowest occupied level but while doing band calculation you select a specific path. May be in that path proper gap wont appear.
I'm facing the same problem that you've posted, then please if you found any solution share it with us. I don't understand why the difference between HOMO and LUMO is different from the plot given by thermo_pw. If we take the example of GaAs which has a direct band gap, the energies HOMO and LUMO given in the output are not at the same point, which means that the gap is indirect???however in the plot the bandgap is direct.