Incorrect energy value in vasprun.xml

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Locked
Message
Author
ehermes
Newbie
Newbie
Posts: 11
Joined: Tue May 14, 2013 5:45 pm
License Nr.: 5-1579

Incorrect energy value in vasprun.xml

#1 Post by ehermes » Thu Jul 02, 2015 9:27 pm

Hello,

I am writing a script to parse vasprun.xml using Python, and I have noticed a discrepancy in the values that are reported for the energy between those printed in the SCF loops and those printed at the end of each ionic step. As far as I can tell, the energy values that are printed in the SCF loops (calculation/scstep/energy) are consistent with the values that are printed to the OUTCAR. However, the values that are printed at end of each ionic step (calculation/energy) appear to be mislabeled.

Specifically, the three values that are printed are "e_fr_energy", "e_wo_entrop", and "e_0_energy". While the free energy (e_fr_energy) has the same value as that printed in the energy section of the final SCF iteration, "e_wo_entropy" instead contains a value that matches "e_0_energy" from the last SCF cycle, and "e_0_energy" contains a value that matches "eentropy" from the last SCF cycle.

This makes parsing the vasprun.xml somewhat troublesome. I wish to extract the E0 energy, I could currently use the "e_wo_entropy" from "calculation/energy" since that contains the value that I want, however should this bug ever be fixed my code will start returning the wrong value. If I instead read "e_0_energy" from the final "calculation/scstep/energy" entry, then I will not get the classical (i.e. VDW) corrections in my energy. Therefore, I must first calculate the difference between E0 and F from the final "calculation/scstep/energy" (e_0_energy - e_fr_energy), and then apply that correction to F printed in "calculation/energy".

I believe the fix is to be made in main.F. Specifically XML_ENERGY is called (around lines 3132 and 3280, not sure of the exact positioning as I have modified main.F in other places) with the arguments "TOTEN,TOTEN-EENTROPY/(2+NORDER),EENTROPY" where it should instead be called with "TOTEN,TOTEN-EENTROPY,TOTEN-EENTROPY/(2+NORDER)".

Thank you,
Eric Hermes

deyan_mihaylov1
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2019 4:04 pm

Re: Incorrect energy value in vasprun.xml

#2 Post by deyan_mihaylov1 » Tue Jan 14, 2020 9:07 pm

Yes. I am seeing the same thing (as of 5.4.4).

martin.schlipf
Global Moderator
Global Moderator
Posts: 542
Joined: Fri Nov 08, 2019 7:18 am

Re: Incorrect energy value in vasprun.xml

#3 Post by martin.schlipf » Mon Jan 27, 2020 11:12 am

Thank you for reporting this to us. This will be fixed in Vasp.6.

Martin Schlipf
VASP developer


Locked