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

Bugfix: Store band structure efermi in CalculationOutput #66

Merged
merged 4 commits into from
Jan 31, 2022
Merged

Bugfix: Store band structure efermi in CalculationOutput #66

merged 4 commits into from
Jan 31, 2022

Conversation

Andrew-S-Rosen
Copy link
Member

@Andrew-S-Rosen Andrew-S-Rosen commented Jan 30, 2022

This PR stores the efermi from the vasprun.xml band structure in CalculationOutput. Currently, it is always left at None because it wasn't assigned in electronic_output. Small bugfix.

Example:

from atomate2.vasp.schemas.calculation import CalculationOutput
from pymatgen.io.vasp.outputs import Vasprun, Outcar

# run this in, e.g. one of the test double-relax runs
c = CalculationOutput.from_vasp_outputs(Vasprun('vasprun.xml.gz'),Outcar('OUTCAR.gz'))

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2022

Codecov Report

Merging #66 (5d9ef7c) into main (fe5d8a6) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   70.39%   70.38%   -0.02%     
==========================================
  Files          45       45              
  Lines        3804     3809       +5     
  Branches      576      576              
==========================================
+ Hits         2678     2681       +3     
- Misses        979      981       +2     
  Partials      147      147              
Impacted Files Coverage Δ
src/atomate2/vasp/schemas/calculation.py 83.73% <ø> (ø)
src/atomate2/utils/path.py 88.23% <0.00%> (-11.77%) ⬇️
src/atomate2/vasp/flows/core.py 93.91% <0.00%> (+0.27%) ⬆️

@Andrew-S-Rosen
Copy link
Member Author

Andrew-S-Rosen commented Jan 31, 2022

On a side-note, in this failed test (where I checked the test_doc.efermi against vasprun.efermi instead of vasprun.get_band_structure(efermi='smart') by accident), the efermi from vasprun.efermi is 6.23352981 eV but from vasprun.get_band_structure(efermi='smart') is 5.9249 eV. Pretty big difference! Is this normal, @utf?

@Andrew-S-Rosen Andrew-S-Rosen changed the title Store efermi in CalculationOutput Bugfix: Store band structure efermi in CalculationOutput Jan 31, 2022
@utf
Copy link
Member

utf commented Jan 31, 2022

Pretty big difference! Is this normal, @utf?

Yes, this is because there's a bug that affects the Fermi level position for VASP 6.1+ with tetrahedron smearing. It is on the VASP wiki here: https://www.vasp.at/forum/viewtopic.php?f=4&t=18201

Thanks for this fix!

@utf utf merged commit b7e9ae3 into materialsproject:main Jan 31, 2022
@Andrew-S-Rosen Andrew-S-Rosen deleted the rosen-efermi branch January 31, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants