Page 1 of 1

Band gap using conventional and primitive cells

Posted: Wed Oct 02, 2024 10:40 am
by IBRAHIM

Dear VASP admin,

We tried to model a spinel cobalt structure with conventional and primitive cells. After full relaxation, we performed single point calculation using HSE06 to get the band gap.
However, we found the structure to be metallic with the primitive cell while it is semiconductor with the conventional cell.

In the case of the conventional cell, the electronic convergence was down to 1E-03 at step 25, then back to 1E+00 and start to reconverge again until the electronic steps limit "60". Then, we recontinue with wavecar and the calculation converges with a bandgap of about 0.8 eV.

In the case of the primitive cell, the calculation is converged in 28 steps with a metallic behavior.

-Why such different results from both cases, which one we should rely on?

-and what happened with the conventional cell's run, is it normal to converge up to some degree then return back and reconverge again?

Many thanks in advance,
Ibrahim


Re: Band gap using conventional and primitive cells

Posted: Wed Oct 02, 2024 11:54 am
by martin.schlipf

I need to look into this in more detail but from a quick glance here is what is happening: The conventional cell and the primitive cell converge towards the same minimum. Then around step 27 something disrupts the trajectory of the conventional cell and pushes it towards a different minimum. That other minimum has a lower energy. Currently I can only speculate what is the cause of this, perhaps there is some symmetry break that is only realized in the more complex cell. What you could do is run the conventional cell for only 25-27 iterations. If you inspect the state there, I suspect it will resemble the one in the primitive cell. You can also look at the orbital occupancies and see whether a pattern is established that you can transform to the primitive cell.

Currently, I would expect the conventional cell to give the correct results because the final energy is much smaller.


Re: Band gap using conventional and primitive cells

Posted: Wed Oct 02, 2024 12:48 pm
by IBRAHIM

Thank you very much for your reply.

We will try the conventional cell up to 25 steps although it is very time consuming.

Please, we have two more questions:

-Should we expect that in our case, the energy of the conventional cell is about 4 times that of the primitive cell, if they are at the same minimum?

Also, for the conventional cell's run, in slurm output, there is:

CGA: 58 -0.464946395712E+03 -0.58732E-02 -0.58781E-02 3600 0.246E-01 0.380E-02
gam= 0.667 trial= 0.288 step= 0.275 mean= 0.288
gam= 0.000 g(H,U,f)= 0.109E-01 0.370E-02 0.172E-17 ort(H,U,f) =-0.246E-02 0.353E-02 0.678E-17
SDA: 59 -0.464950126123E+03 -0.37304E-02 -0.37371E-02 3600 0.146E-01 0.107E-02
gam= 0.000 trial= 0.288 step= 1.574 mean= 0.288
gam= 0.000 trial= 1.869 step= 1.869 mean= 0.454

gam= 0.000 g(H,U,f)= 0.369E-01 0.129E-01 0.229E-16 ort(H,U,f) =-0.148E-01-0.986E-03 0.558E-17
CGA: 60 -0.464950367313E+03 -0.24119E-03 -0.20402E-02 3600 0.498E-01-0.158E-01
gam= 0.000 trial= 0.524 step= 0.415 mean= 0.524
final diagonalization

-As you can see, is it normal such SDA step "59" and the following two lines for trial?

Many thanks in advance,
Ibrahim


Re: Band gap using conventional and primitive cells

Posted: Thu Oct 03, 2024 7:05 am
by martin.schlipf
IBRAHIM wrote: Wed Oct 02, 2024 12:48 pm

-Should we expect that in our case, the energy of the conventional cell is about 4 times that of the primitive cell, if they are at the same minimum?

Yes, at least for setups with similar convergence parameters. In particular you should use a coarser k-point mesh for the conventional cell than for the primitive one.

IBRAHIM wrote: Wed Oct 02, 2024 12:48 pm

Also, for the conventional cell's run, in slurm output, there is:

CGA: 58 -0.464946395712E+03 -0.58732E-02 -0.58781E-02 3600 0.246E-01 0.380E-02
gam= 0.667 trial= 0.288 step= 0.275 mean= 0.288
gam= 0.000 g(H,U,f)= 0.109E-01 0.370E-02 0.172E-17 ort(H,U,f) =-0.246E-02 0.353E-02 0.678E-17
SDA: 59 -0.464950126123E+03 -0.37304E-02 -0.37371E-02 3600 0.146E-01 0.107E-02
gam= 0.000 trial= 0.288 step= 1.574 mean= 0.288
gam= 0.000 trial= 1.869 step= 1.869 mean= 0.454

gam= 0.000 g(H,U,f)= 0.369E-01 0.129E-01 0.229E-16 ort(H,U,f) =-0.148E-01-0.986E-03 0.558E-17
CGA: 60 -0.464950367313E+03 -0.24119E-03 -0.20402E-02 3600 0.498E-01-0.158E-01
gam= 0.000 trial= 0.524 step= 0.415 mean= 0.524
final diagonalization

-As you can see, is it normal such SDA step "59" and the following two lines for trial?

The origin of this, is the following part in the VASP source code (rot.F):

Code: Select all

           WRITE(IO%IU0,10) GAMMA,BTRIAL,BOPT*BSTEP,AVERAG
   10 FORMAT(' gam=',F6.3,' trial=',F6.3,'  step=',F6.3,' mean=',F6.3)
   
! INTERATE_PREC requires at least 3 energy calculations ! and seeks the minimum from these 3 energies ! apply this if BOPT gets unreasonably large (indicating ! non-quadratic behaviour or some other trouble) IF (.NOT. ITERATE_PREC .AND. BOPT<5) THEN IFLAG=0 ELSE ! maximum step size is 5 times the trial step ! there we will have data points at 4, 8 and 12 times the original step size BOPT=MIN(BOPT,5._q) ENDIF

The WRITE statement prints the line you see in the output. Then there is a check whether the desired step is less than 5 times larger than the trial step. If that is the case, IFLAG is set to 0 indicating that we are done searching for the appropriate step size. However in your case the ratio is 1.574/0.288 = 5.465 so VASP will do some more work to determine the optimal step size. Then it enters the routine again leading to the second line in the output.


Re: Band gap using conventional and primitive cells

Posted: Thu Oct 03, 2024 7:22 am
by IBRAHIM

Thank you very much for the detailed explanation.

For ALGO=All, in my case, I suppose the first electronic step to be SDA and the subsequent steps to be CGA.
-So, concerning the SDA step "step 59", is it normal to have other SDA steps in addition to the first SDA step?

Many thanks in advance,
Ibrahim


Re: Band gap using conventional and primitive cells

Posted: Thu Oct 03, 2024 10:30 am
by martin.schlipf

VASP has a reset after 30 steps of successful CGA it will do a SDA step. To check whether a step is successful you can look at the gam output. In your case the last unsuccessful step was step 28

Code: Select all

CGA:  28    -0.460401252773E+03   -0.47742E-02   -0.29647E-02  3600   0.279E+00 0.180E+00
 gam= 0.000 trial= 0.330  step= 0.297 mean= 0.330
 gam= 1.645 g(H,U,f)=  0.536E-01 0.311E+00 0.940E-01 ort(H,U,f) = 0.767E-02-0.240E-02 0.136E-01

Hence after 30 more steps, the threshold is reached and in step 59 an SDA step is used.


Re: Band gap using conventional and primitive cells

Posted: Thu Oct 03, 2024 11:13 am
by IBRAHIM

Thank you very much.

-Should all the CGA steps be performed successfully?

-Could that unsuccessful CGA step affect the previously mentioned result of the conventional cell's run? You expected some transformation at step 27.

Many thanks in advance,
Ibrahim


Re: Band gap using conventional and primitive cells

Posted: Thu Oct 03, 2024 11:59 am
by martin.schlipf

Generally an unsuccessful CG step indicates that you are in a space where the assumption of a quadratic energy minimum is not a good one. This is often the case if your material is more complex such that multiple minima are allowed. Usually, VASP will do one or more SD steps and then proceed with CG in the new minima. As long as the calculation converges, it should be fine. Keep in mind that if multiple minima are possible you are not necessarily guaranteed to find the global one. Hence, you should try to start near the state that you want if possible.

Regarding the second question, I would rather assume the opposite. You enter a part of the space where the second solution is possible. Since the optimizer can then see two different minima the energy is not a simple parabola anymore. Then the optimizer fails when computing the step size assuming a parabolic behavior.


Re: Band gap using conventional and primitive cells

Posted: Fri Oct 04, 2024 7:17 am
by IBRAHIM

OK thanks, we will proceed with the results for the conventional cell. Additionally, we will analyze the conventional cell for only 25 iterations for further analysis.

Thank you very much for your detailed responses.

Ibrahim