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

Vasprun.eigenvalue_band_properties() for metals #344

Closed
computron opened this issue Apr 20, 2016 · 4 comments
Closed

Vasprun.eigenvalue_band_properties() for metals #344

computron opened this issue Apr 20, 2016 · 4 comments

Comments

@computron
Copy link
Member

System

  • Pymatgen version: Latest master
  • Python version: 2.7
  • OS version: Mac

Summary

  • The algorithm used to get CBM, VBM, and band gap is similar but different in Vasprun.eigenvalue_band_properties() and Bandstructure.get_band_gap()
  • The former can sometimes give non-zero gaps for metals, e.g. 0.0003 eV for Al
  • The latter first checks for metallic behavior and overrides the gap to be exactly 0 in these instances. So Al gives exactly zero gap. Otherwise the algorithm looks very similar.
  • The algorithm itself contains a fair amount of duplication between these methods. It is not clear that both are needed and IMO the Bandstructure version is superior.

Example code

(Can provide upon request)

Suggested solution (if any)

  • The Vasprun.eigenvalue_band_properties() is reimplemented to simply get the band structure object, and then call Bandstructure.get_band_gap() and return values from there. Then the code duplication is removed and the values will be consistent. There might be a small performance hit.

Files (if any)

(Can provide upon request)

@shyuep
Copy link
Member

shyuep commented Apr 21, 2016

Before I do this, I would like to understand why there is a difference between the bandstructure version vs the get_eigenvalue properties version. I need to be convinced that the bandstructure is the correct one.

@computron
Copy link
Member Author

@hautierg - do you know the difference and the reason for the two? The biggest difference I noticed is that the band structure one explicitly tests for is_metal() and overrides the data in that case.

@hautierg
Copy link
Contributor

hautierg commented Apr 21, 2016

I will not make any judgement on the “best” method… but just clarify what I believe they exactly do:

-the band structure looks at fermi level and see if the fermi level crosses any bands if yes, it’s a metal and bg=0. we do not use any occupation values. Band structure objects do not have occupations.

-in the case of the eigenvalue one here we use the occupations computed by vasp (so it will technically depend on the type of smearing used etc…). The tolerance on occupation is 10^-8.

Please note that the band structure one has been designed assuming you have a decent k-point sampling. I am not hundred percent sure how it will do if you a loose k-point grid...

Does it make sense?

@shyuep
Copy link
Member

shyuep commented Aug 8, 2023

Seems like this issue has been defunct for 7 years. Closing....

@shyuep shyuep closed this as completed Aug 8, 2023
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

No branches or pull requests

3 participants