Page 1 of 1

Output Precision in OUTCAR/OSZICAR

Posted: Thu May 04, 2023 8:17 pm
by graham_pritchard
Is there a INCAR tag I can use to get the full precision of the total energy and other output quantities instead of the standard 8 digits after the decimal in VASP 6?

Re: Output Precision in OUTCAR/OSZICAR

Posted: Fri May 05, 2023 9:26 am
by merzuk.kaltak
Dear graham_pritchard,

unfortunately there is no precision tag. You would have to change the source code.
Depending on the chosen algorithm, there are several files to edit. For instance following lines in electron.F
can be changed to print more than 8 significant digits (this starts at line 890 in vasp-6.4.1):

Code: Select all

7240  FORMAT(/ &
              ' Free energy of the ion-electron system (eV)'/ &
     &        '  ---------------------------------------------------'/ &
     &        '  alpha Z        PSCENC = ',F18.8/ &
     &        '  Ewald energy   TEWEN  = ',F18.8/ &
     &        '  -Hartree energ DENC   = ',F18.8/ &
     &        '  -exchange      EXHF   = ',F18.8/ &
     &        '  -V(xc)+E(xc)   XCENC  = ',F18.8/ &
     &        '  PAW double counting   = ',2F18.8/ &
     &        '  entropy T*S    EENTRO = ',F18.8/ &
     &        '  eigenvalues    EBANDS = ',F18.8/ &
     &        '  atomic energy  EATOM  = ',F18.8/ &
     &        '  Solvation  Ediel_sol  = ',F18.8/ &
     &        '  ---------------------------------------------------'/ &
     &        '  free energy    TOTEN  = ',F18.8,' eV'// &
     &        '  energy without entropy =',F18.8, &
     &        '  energy(sigma->0) =',F18.8)
...
You would have to change the part F18.8 to your needs. For instance F25.10 would print 10 digits beyond the comma.
Bear in mind though, vasp does calculations in double precision with 10 significant digits.
Rounding errors from floating point operations become significant beyond the 9th digit.