DoS resolution in conduction bands, and prtdos

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Sun Mar 25, 2018 6:47 am

I'm doing a GaN (Gallium Nitride) calculation in wurtzite crystal structure (4 atoms: 2 Ga, 2 N), and I'm having issues generating a good quality DoS plot, as well as learning about the relevant abinit details.

After going through the tutorials, I thought there's no discussion on generating a good quality DoS, so it must be easy to extract one from the main calculation (the scf run after all convergence studies, and before the band-structure run). This was further supported by the fact that an abipy example plotted dos from the GSR.nc file from the main run. I did a similar thing with my calculation but the plotted dos is of low resolution / bad quality. The input file and dos plot are attached:

Code: Select all

kptopt 1
nshiftk 1
shiftk 0.0 0.0 0.5
ngkpt  6 6 2

toldfe  1.0e-10

            acell      6.0911781167E+00  6.0911781167E+00  9.9164297984E+00 Bohr
            rprim      1.0000000000E+00  0.0000000000E+00  0.0000000000E+00
                      -5.0000000000E-01  8.6602540378E-01  1.6076496088E-36
                       6.1232339957E-17  1.0605752387E-16  1.0000000000E+00
            natom           4
           ntypat           2
            typat      1  2  1  2
            znucl       31.00000    7.00000
             xred      6.6666666667E-01  3.3333333333E-01  3.7593954042E-01
                       6.6666666667E-01  3.3333333333E-01 -9.3954042085E-04
                       3.3333333333E-01  6.6666666667E-01  8.7593954042E-01
                       3.3333333333E-01  6.6666666667E-01  4.9906045958E-01

ecut 25.0
ecutsm 0.5
pawecutdg 50

nstep 50
diemac 12.0
ixc -101130


gsrdos.png
gsrdos.png (21.98 KiB) Viewed 7051 times


So I started looking, and it turns out there are a host of DoS generating variables (prtdos, dosdeltae, pawprtdos) that are not discussed at all in the first four tutorials, and barely touched upon in the PAW tutorial. prtdos documentation is not bad, but still doesn't help with the pros and cons of the various options. Plus it says prtdos 1 requires convergence study, but fails to mention what kind.

I did a prtdos 1 run as well and the result does not look much better. I tried prtdos 2, the resolution looks better for the valence band (it has sharper features) but conduction band looks bad, as given below:

prtdos2.png
prtdos2.png (19.35 KiB) Viewed 7051 times


Here, by conduction band I mean the bump between 0.3 and 0.45 Ha. This bump should look different, for reference the DoS for GaN (from Diakite et al, Calculated Electronic and Related Properties of Wurtzite and Zinc Blende Gallium Nitride (GaN), 2014) looks like this:

refwgandos.png
refwgandos.png (28.32 KiB) Viewed 7051 times


So I thought maybe I need to specify a nband value like in a band-structure calculation (I had to use nband 16 to get conduction bands), so I used nband 16 with prtdos 2 and now I'm getting the error:

Code: Select all

--- !ERROR
src_file: m_dtset.F90
src_line: 278
mpi_rank: 0
message: |
    Initialization of occ, with occopt=   1
    There are not enough bands to get charge balance right
    Action: modify input file ...
    (check the pseudopotential charges, the variable charge,
    and the declared number of bands, nband)


This error is against the extra parameters added to the input file shown above, as follows:

Code: Select all

nshiftk 2
shiftk
    0.0 0.0 0.0
    0.0 0.0 0.5
ngkpt 8 8 4
nband 16

prtdos 2
iscf -3
irdden 1


The DEN file comes from the main calculation (which was done after k point and ecut convergence, as well as structural relaxation of acell as well as atomic positions. The relaxed structure was manually copied into the input file shown above). The log file of that main calculation mentions nband of 19, so I'm not sure why abinit is complaining about nband 16.

Kindly advise as to what should be the next course of action. Thank you.

Also since I'm using PAW dataset, should I use prtdos 3. I still haven't read that section of prtdos and it looks a bit complicated but I can try.

Finally regarding nband 19 in the main calculation, which I did not specify, what if I want to do the main calculation (i.e., the generation of the DEN file) with higher number of bands? (btw, am I correct in thinking that the key output of the main abinit calculation is the DEN file, and once we have the DEN file we don't need anything else for band-structure and DoS and all other information, unless for efficiency reasons, e.g., we might use WFK to speed things up, I don't know.)

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: DoS resolution in conduction bands, and prtdos

Post by ebousquet » Mon Mar 26, 2018 6:43 pm

Dear fhssn1,
For insulator it is recommended to use prtdos=2 ( tetrahedron method). Your plot looks good to me, what do think is wrong actually? If you want the DOS with more unoccupied states, you have to generate a density file (or WFK) that contains enough bands, otherwise it will indeed not show them (the complain with 16 is because 16 band is not enough band to put all the valence electrons, do you actually checked how many valence electron your system has?). If that was the problem, then just increase nband such that you have as many unoccupied band as you want.
For good comparison between plots, be careful to use the same unit and that the Fermi energy is set at 0.
dosdeltae would give you more resolution points in your plot but the default is often already good if you don't have to zoom in too much.
prtdos 3 or pawprtdos will not help you, this is for projected DOS on atoms and orbitals.
Best wishes,
Eric

fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

Re: DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Mon Mar 26, 2018 9:08 pm

ebousquet wrote:Dear fhssn1,
Your plot looks good to me, what do think is wrong actually? If you want the DOS with more unoccupied states, you have to generate a density file (or WFK) that contains enough bands, otherwise it will indeed not show them (the complain with 16 is because 16 band is not enough band to put all the valence electrons, ).
Eric


Dear Eric,

Thanks for the response. To answer your question, you guessed it right, I need better coverage of unoccupied states (what I called conduction bands). I will take your advice regarding using nband to generate DEN file (main calculation) and post an update. I used to think nband is only for post-processing (e.g., non-scf band structure generation).

ebousquet wrote:do you actually checked how many valence electron your system has?


I'm afraid I didn't check. I would look into this and post an update.

- My guess is that if we include more electrons into valence category (meaning leaving less electrons into the core category) then we need more bands to get to the unoccupied levels?

- Also I would need advise on what criteria, from a physics point of view, should be used (other than the "convenience criteria" of keeping band count low) to put electrons into valence vs core categories? e.g., one criteria I can think of is that we look at DoS plot and see the sharp/isolated level on the left-most of the plot or not relevant to our study (e.g., we're doing semiconductor study and mainly interested in valence states near fermi level and the higher unoccupied/conduction states) then we would like to reduce number of valence electrons?

- Furthermore, in our case of GaN, consisting of Ga and N, it is advisable to keep same core electrons in both elements? e.g., if N valence consists of only 2p and higher, then Ga valence should also be only 2p and higher? I'm not sure, it would depend on how the electrons from the two elements interact to form the DoS of the compound (maybe N 2s states end up very near the fermi level, then it would not be a good idea to put N's 2s electrons into core).


edit: I just realized that maybe core vs valence is fixed in the pseudopotential/PAW that you provide to the calculation. So if I want to adjust that I need to regenerate the pseudopotential/PAW? or edit the exisiting one? I don't know. Kindly advise.

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: DoS resolution in conduction bands, and prtdos

Post by ebousquet » Tue Mar 27, 2018 11:23 am

The number of valence/core electrons is indeed fixed in the pseudopotential. You can see that if you open the xml file of the PAW datasets where it is explicitly mentioned at the beginning of the file. If you want to change the number of valence/core electrons you need to regenerate a new pseudo, which is not advised unless you really need that.
In the case you have an insulator, adding more unoccupied bands will not change the ground state properties. It is important if you want to do exited stuff like GW. In the case of DOS, you need them if you want to see them on the plot them and probe the band gap, that's it.
In the case of metals, then you need to have enough "unnocupied" bands to get correct physical properties, even ground state.
All the best,
Eric

fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

Re: DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Tue Mar 27, 2018 7:55 pm

Thanks so much Eric. I guess I have no more questions on this topic at the moment and I will take your advice to further my calculations.

fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

Re: DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Tue Apr 10, 2018 8:10 am

I made a 2x2x2 supercell out of my system and computed the DoS, and unfortunately, I now have the opposite problem, my DoS is too high-resolution and noisy (I used prtdos 2).

noisydos.png
noisydos.png (34.08 KiB) Viewed 7009 times


High-resolution is okay, but I don't want the noise. In general I know a supercell DoS becomes more noisy because of more states (I guess) compared to primitive cell. So I'm looking for 'standard procedures' to fix this issue, such that a supercell of the same system looks as good as that of primitive cell (not too smooth, not too noisy). In my case the 2nd DoS plot that I attached in the original post of this thread (with prtdos 2) looks ideal.

Should I use a higher value of dosdeltae to fix this or is there a better/proper solution? Default dosdeltae for prtdos 2 is 0.00005 Ha, I'm running it again with 0.001 Ha (I'm not sure if this is too high).

Another problem I have is the location of the Fermi level. I think it should be somewhere around 5 to 6 eV but I got a value of 0.366 Ha from the log file, which gives 9.97 eV (that's too high). It's also visible in the DoS plot (the fermi level, 0 of the x-axis, is showing inside the conduction/unoccupied bands and not in the band gap.) I read the 0.366 value from the following context of lines in the log file:

Code: Select all

--- !WARNING
src_file: vtowfk.F90
src_line: 864
message: |
    Wavefunctions not converged for nnsclo,ikpt=  100    2 max resid=  5.74591E-18
...

 newocc: new Fermi energy is       0.366714 , with nelect=    299.000000


However at the beginning of the log file there is this line:

Code: Select all

 in scfcv: results_gs%fermie:   0.226654435641612


and this value is alot more reasonable (it gives 6.1676 eV and the fermi level lies in the band gap). Those are the only two mentions of the word 'Fermi' so I'm wondering which one should I use. Also just before the 0.366 line there is a WARNING of wavefunction not converging. Is that a problem? related to bad fermi level value? (I used iscf -3 for the prtdos 2 calculation).

fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

Re: DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Tue Apr 10, 2018 6:14 pm

Well I generated DoS with dosdeltae of 0.001 Ha and it was a bit of an improvement but not too much. I ran with 0.004 Ha and the plot looks like this:

noisydos2.png
noisydos2.png (33.22 KiB) Viewed 7002 times


The noise is much reduced but the result is not what I'm looking for. It looks like there are unnecessary oscillations in various regions, almost as if I'm trying to brute force noise removal. I remember doing DoS calculations from electronic structure data in the past, and the key to fixing the noise was, not varying the resolution of energy levels (dosdeltae) but replacing the "summing up of the states" with a better algorithm, ideally based on "integration of the states". It looks like in this case the DoS is calculated through some kind of summing up of the states and probably that's why the results don't get much better.

Any advice to improve the quality of DoS highly appreciated.

P.S.: The fermi level issue is fixed in this plot since I'm using the lower value of 0.2x read from the beginning of the generated log file, not the 0.366x that appears later in the file. However I'm still unsure about which one to use and why there are two drastically different values, and whether this has anything to do with the wave-function convergence warning (as mentioned in my previous comment).

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: DoS resolution in conduction bands, and prtdos

Post by ebousquet » Wed Apr 18, 2018 9:34 pm

Dear fhssn1,
I don't know what you have in mind regarding the DOS, but to me this looks correct, what you call the "noise" is related to integrated method and smoothing out the plots.
Regarding the prtdos=2, this is what is called the tetrahedron method, you can find some infos in the following slides:
https://www.abinit.org/sites/default/fi ... aete_1.pdf

Whatever the size of the cell, the DOS should stay the same since it is an integration over the whole Brillouin zone and thus should not depend on the size of the supercell.

Regarding the Fermi level, it is written at the beginning of the DOS file. If you have states there, this means that you indeed have a metallic case, you can cehk that directly in the DOS file by going at the Fermi energy value in the data and see if the DOS is zero or not.

Best wishes,
Eric

fhssn1
Posts: 36
Joined: Mon Feb 26, 2018 7:52 pm

Re: DoS resolution in conduction bands, and prtdos

Post by fhssn1 » Wed Apr 18, 2018 9:52 pm

Thanks Eric. I will take your advise to carry out further computations.

In the meantime, would you be kind enough to answer my other questions in Ground State section of this forum? (especially the YbN magnetic moment one) I haven't received any answers in the past almost two weeks and I'm under a bit of a deadline. (I know you seem to be the only active person in this forum answering questions and I've already benefitted from your advice)

Locked