easyunfold icon indicating copy to clipboard operation
easyunfold copied to clipboard

Potential Future Enhancement: Expediting `PROCAR` Parsing

Open kavanase opened this issue 9 months ago • 0 comments

Currently the loops in PROCAR parsing and spectral_function_from_weight_sets run over all bands/kpoints in the calculation. In many cases, the bands extend over a very large energy range (e.g. in the Cs$_2$Sn/TiX$_6$ alloys from the docs example, the range is -37 to +8 eV), whereas we usually only want to plot within a much smaller energy range (e.g. -5 to +5 eV). Given that the PROCARs are parsed each time when doing a projected band structure plot, and this is the most time-consuming part of the projected plotting, it could significantly speed up this step by only parsing bands with energies within the emin - emax range.

I implemented a (conceptually) similar masking approach in PyTASER recently (https://github.com/WMD-group/PyTASER/pull/46/commits/4b8ac4d906000fb5889e1c9d29ba4887d7acbc28) which gave a massive boost in efficiency. Worth considering!

kavanase avatar Sep 24 '23 13:09 kavanase