Page 1 of 1

Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Wed Jul 10, 2024 3:30 pm
by hideo.ando
I am new to VASP and this is my first post. I performed an electronic minimization of a metallic porous carbon with ISPIN = 2.

Here are several lines taken from OSZICAR, indicating that the job exited the loop at the 42th step. My question is why the last line includes d E =-.371869E-01, which is different from -0.15173E-04 at the 42th step. I thought that the 42th step was the very last one, so that any dE different from -0.15173E-04 cannot be defined.

Code: Select all

       N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1     0.708839255644E+04    0.70884E+04   -0.30067E+05 11520   0.141E+03
DAV:   2    -0.400524759397E+03   -0.74889E+04   -0.71332E+04 15952   0.311E+02
...
DAV:  41    -0.165787278097E+04    0.67818E-03   -0.31609E-05  6856   0.345E-03    0.212E-02
DAV:  42    -0.165787279614E+04   -0.15173E-04   -0.34222E-06  6800   0.161E-03
   1 F= -.16578728E+04 E0= -.16578604E+04  d E =-.371869E-01  mag=    -0.0006
In addition, the final mag= -0.0006 in OSZICAR is different from the magnetization in the 42th step info in OUTCAR as follows:

Code: Select all

 number of electron     721.0000079 magnetization      -0.0003431
 augmentation part       17.1925616 magnetization       0.0000460
I understand that the sum of the local magnetic moments in OUTCAR is not equal to the "mag=" value in OSZICAR (after reading some previous posts).

My point is I cannot find any details corresponding to the very last line of OSZICAR in OUTCAR. Was an additional calculation, not explicitly printed in OUTCAR, performed after the 42th step? Or do I miss anything critical?

Thank you very much in advance.

Re: Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Thu Jul 11, 2024 7:37 am
by alexey.tal
Dear hideo.ando,

Could you please provide all relevant input and output files for your calculation according to the forum guidelines.

Re: Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Thu Jul 11, 2024 10:31 pm
by hideo.ando
Dear alexey.tal,

Thank you very much for your reply. Attached are the input/output files of out test calculation of Fcc Ni. All the input files were taken from

https://www.vasp.at/wiki/index.php/Fcc_Ni#POSCAR

Although it is not our specific target system, we can see the same issues.

In OSZICAR, d E is neither zero, nor -0.44760E-05.

Code: Select all

       N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1    -0.355243797268E+00   -0.35524E+00   -0.34338E+03  2916   0.630E+02
DAV:   2    -0.646163908602E+01   -0.61064E+01   -0.59012E+01  3168   0.570E+01
...
DAV:  10    -0.546381518704E+01    0.55807E-03   -0.73801E-04  2472   0.156E-01    0.422E-02
DAV:  11    -0.546381966300E+01   -0.44760E-05   -0.81835E-06  1392   0.235E-02
   1 F= -.54638197E+01 E0= -.54629591E+01  d E =-.258164E-02  mag=     0.5731
In addition, mag is 0.5731, which is not the same as the magnetization in OUTCAR, 0.5750032:

Code: Select all

--------------------------------------- Iteration      1(  11)  ---------------------------------------
    POTLOK:  cpu time      0.0017: real time      0.0017
    SETDIJ:  cpu time      0.0035: real time      0.0035
     EDDAV:  cpu time      0.0489: real time      0.0489
       DOS:  cpu time      0.0008: real time      0.0008
    --------------------------------------------
      LOOP:  cpu time      0.0548: real time      0.0548

 eigenvalue-minimisations  :  1392
 total energy-change (2. order) :-0.4475965E-05  (-0.8183482E-06)
 number of electron       9.9999908 magnetization       0.5750032
 augmentation part        6.1646978 magnetization       0.5567214

 Free energy of the ion-electron system (eV)
  ---------------------------------------------------
  alpha Z        PSCENC =        46.37681830
  Ewald energy   TEWEN  =      -935.14218197
  -Hartree energ DENC   =      -225.97371311
  -exchange      EXHF   =         0.00000000
  -V(xc)+E(xc)   XCENC  =        30.67478343
  PAW double counting   =      1132.84817068    -1201.29580495
  entropy T*S    EENTRO =        -0.00258164
  eigenvalues    EBANDS =        69.41461493
  atomic energy  EATOM  =      1077.63607467
  Solvation  Ediel_sol  =         0.00000000
  ---------------------------------------------------
  free energy    TOTEN  =        -5.46381966 eV

  energy without entropy =       -5.46123802  energy(sigma->0) =       -5.46295912

Re: Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Fri Jul 12, 2024 5:36 pm
by alexey.tal
In OSZICAR, d E is neither zero, nor -0.44760E-05.
In the last line VASP prints the total free energy F, the energy for σ->0 E0 and dE is the entropy multiplied by σ (see OSZICAR). If you use smaller SIMGA the dE should also decrease proportionally.

In addition, mag is 0.5731, which is not the same as the magnetization in OUTCAR, 0.5750032:
After the SCF iterations are converged, VASP recalculates the charge density from the wave functions, hence the density might slightly differ from the last iteration. If you use a more stringent convergence criterion (EDIFF=1E-9) the difference should decrease.

Re: Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Fri Jul 12, 2024 9:20 pm
by hideo.ando
Dear alexey.tal,

Thank you very much for your prompt reply.
In the last line VASP prints the total free energy F, the energy for σ->0 E0 and dE is the entropy multiplied by σ (see OSZICAR).
I got it. In OSZICAR, the definitions of "dE" of every iteration step (free energy difference) and "d E" in the last line (T*S) are different. Thus, "d E =-.258164E-02" in the last line of OSZICAR is the same as "entropy T*S EENTRO = -0.00258164" in OUTCAR.
After the SCF iterations are converged, VASP recalculates the charge density from the wave functions, hence the density might slightly differ from the last iteration.
So, the "mag= 0.5731" in OSZICAR (not "magnetization 0.5750032" in OUTCAR) is the very last one, obtained in the recalculation you mentioned?

Re: Energy and magnetization inconsistencies in OUTCAR and OSZICAR

Posted: Mon Jul 15, 2024 8:22 am
by alexey.tal
So, the "mag= 0.5731" in OSZICAR (not "magnetization 0.5750032" in OUTCAR) is the very last one, obtained in the recalculation you mentioned?
Yes, exactly.