sisl
sisl copied to clipboard
An eigenstate iterator may be interesting(?)
In general, an eigenstate iterator may be interesting(?)
Then the code could be generalized and the only thing to change between reading from different sources would be the generator.
EigenstateIterator(provider=wfsx.yield_eigenstate(), wrap=calc_PDOS)
And if you wanted to do the same with the hamiltonian/BZ you just change the provider:
EigenstateIterator(provider=bz.apply.iter.eigenstate(), wrap=calc_PDOS)
In the future, for any other code that has a file with eigenstate outputs, it would be trivial to implement the calculation of PDOS.
In the raw case it seems pretty stupid but you would have iterators ready to calculate the PDOS, the bands, etc... (e.g. parallelization could be built-in) I don't know exactly how it should work or if it would really be useful, but just dropping the idea here :sweat_smile:
Originally posted by @pfebrer in https://github.com/zerothi/sisl/issues/388#issuecomment-948504775