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

get_reconstructed_band_structure method outdated #543

Closed
utf opened this issue Jan 12, 2017 · 2 comments · Fixed by #992
Closed

get_reconstructed_band_structure method outdated #543

utf opened this issue Jan 12, 2017 · 2 comments · Fixed by #992

Comments

@utf
Copy link
Member

utf commented Jan 12, 2017

System

  • Pymatgen version: master/stable
  • Python version: 2.7

Summary

  • The get get_reconstructed_band_structure method in pymatgen/electronic_structure/bandstructure.py contains references to bs._bands and bs._kpoints. These are obselete as the BandStructure class now uses the bs.bands and bs.kpoints attributes.
@shyuep shyuep closed this as completed in a7d900d Jan 12, 2017
@utf
Copy link
Member Author

utf commented Jan 12, 2017

@shyuep Unfortunately, this fix doesn't work as BandStructure.bands are numpy arrays.

As such, the line eigenvals[Spin.up][i].append(e) errors with:
AttributeError: 'numpy.ndarray' object has no attribute 'append'

This is also the case I think for BandStructure.projections.

I'm not sure of the cleanest way to get around this.

@shyuep
Copy link
Member

shyuep commented Jan 12, 2017

I think @hautierg, the original author of that method, should fix this and also include unittests for the method so that future refactorings will ensure it works.

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 a pull request may close this issue.

2 participants