Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Free Energy Calculation with D3 Correction in pyiron HDF5 Files #1193

Open
yuyuanjingxuan opened this issue Oct 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@yuyuanjingxuan
Copy link

Summary

The free energy calculated by VASP and stored in a pyiron HDF5 file is not consistent when the D3 (VDW) correction is enabled.

pyiron Version and Platform

  • Python Version: 3.10.8
  • pyiron Version: 0.5.0

Expected Behavior

The job['output/generic/dft/scf_energy_free'] should provide all free energy values, including those that consider the D3 correction when IVDW=11 is added to the INCAR file.

Actual Behavior

The job['output/generic/dft/scf_energy_free'] currently provides the following values:

[ ...,
  -3542.71855343,
  -3542.7185545,
  -3542.71855383
]

However, when searching for all occurrences of "TOTEN" in the OUTCAR file, I found the following values:

... 
free energy    TOTEN  =     -3542.71855450 eV
free energy    TOTEN  =     -3542.71855383 eV
free  energy   TOTEN  =     -3645.65385697 eV

It appears that the last "free energy" value is not included in job['output/generic/dft/scf_energy_free']. This energy corresponds to the calculation with the D3 correction.

Steps to Reproduce

To reproduce the issue, follow these steps:

  1. Set up a VASP calculation with D3 correction by adding IVDW=11 to the INCAR file.
  2. Calculate the free energy using VASP.
  3. Store the results in a pyiron HDF5 file.
  4. Access job['output/generic/dft/scf_energy_free'] to compare the values.

Further Information, Files, and Links

There is an additional space between the last "free energy."

@yuyuanjingxuan yuyuanjingxuan added the bug Something isn't working label Oct 23, 2023
@pmrv
Copy link
Contributor

pmrv commented Nov 29, 2023

It seems a similar bug is present in Vasp5.4.4 but has been fixed in Vasp6.

https://www.vasp.at/forum/viewtopic.php?p=21765&hilit=vasprun+energy#p21765

Can you test with vasp6?

@yuyuanjingxuan
Copy link
Author

Conducted a test using an H2 molecule in a cubic box with VASP 6.4.0 and set IVDW=11. The obtained results in job['output/generic/dft/scf_energy_free'] are as follows:

[...,
 -6.73179963, 
 -6.73181333, 
 -6.7318166
]

The "free energy" values in the OUTCAR file are:

free energy    TOTEN  =        -6.73181333 eV
free energy    TOTEN  =        -6.73181660 eV                                                                                                       
free  energy   TOTEN  =        -6.73181772 eV

It appears that the last value from the OUTCAR file is not included in the hd5f file of the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants