band-unfolding / banduppy

Python version ofthe BandUP code
GNU General Public License v3.0
21 stars 9 forks source link

Questions related to the unfolding using bandu #7

Closed NikaRybin closed 3 years ago

NikaRybin commented 3 years ago

Dear @stepan-tsirkin and @paulovcmedeiros,

I have recently decided to use banduppy (I use it with QE 6.4), but firstly test it with different set ups. I have a couple of question, regarding the output and postprocessing steps. Would be very nice, if you can help me to clarify them. I should note that I am quite new to qe and currently use aims (used vasp also before), so the problem can also come from the lack of experience/understanding of qe.

  1. I took undisturbed Si unit cell and made a 3x3x3 supercell out of it. I made a couple of runs with different number of kpoints along G-X path. For some reason, after I did postprocessing using bandupPy, I got different number of energies for high symmetry points( Gamma and X for example) and other points along the path. Moreover, the number of states is different than "nbnd" provided to qe. I assume that this is related to the symmetry, but its not clear for me how it works. In contrast, I don't see such behavior when do calculations with the same Si supercell, but after rattling it (distort the structure slightly). I can send you my input/output (in principle identical to the one presented in the tutorial). Is that needed? Is there a way to print all states for each particular kpoint?
  2. This is probably the question to @stepan-tsirkin. The sense of the variable "break_thresh" used in the unfolding step is not clear to me. I went to the source of irrep (https://github.com/stepan-tsirkin/irrep/blob/master/irrep/bandstructure.py), but its still not clear how this threshold influence the unfolding and whether I should test it for each specific run. It is used to merge identical kpoints, isn't it?
  3. Is there a way to sample uniformly the whole BZ of the supercell and then unfold it back to the unit cell? In principle, I can sample it uniformly using lots of paths, but may be you know or can suggest some better option?

Sincerely, Nikita

NikaRybin commented 3 years ago

Just a small clarification from my side related to the first question mentioned above. I guess the stuff which is unclear to me happens in lines 116-120 of banduppy(https://github.com/band-unfolding/banduppy/blob/master/banduppy/unfolding_path.py) " for ik,kpl in enumerate(self.kpline): if ik in unfolded_found: for band in unfolded_found[ik] : result.append([kpl,]+list(band)) self.result=np.array(result) " So for some reason some kpoints have different number of bands, although in QE output the number of bands for each kpoint is identical. I attached my input/output just in case. bu_in_out.tar.gz

stepan-tsirkin commented 3 years ago

Hi @NickRybin ,

In the unfolded banstructure there is no actual concept of "band", there is unfolded k-resolved density of states.

For convenience it is written as position of the delta peaks and their weights, so that the density plot may be drawn with any convenient smearing. However, from two degenerate states only one peak is written, with summed weight. And if the weight of a peak is too small, nothing is written.

stepan-tsirkin commented 3 years ago

The sense of break_thresh, is if your ynfolding path and s not continuous (e.g. G-X|Y-Z), then on a plot there should be no segment (without points) between the points X and Y. This parameter determines what to treatas discontinuity. If your path iscontinuous, set degen_thresh to a large value.

It is not affecting the unfoldig, only the way the data is plotted.

stepan-tsirkin commented 3 years ago

There is currently no direct way to sample the whole BZ (except the one that you suggested), but it should be easy to implement. I will have a look when I have time

NikaRybin commented 3 years ago

Stepan, thanks for such fast respond and nice clarifications. I will need to spend a bit more time to find out how unfolding is implemented (in process). The point about the break_threshold is completely clear. Regarding my third question about the BZ sampling, I have an extra question: is it possible to utilize the infrastructure of QE by using routine which is used for DOS calculations and then do unfolding of the sampled SCBZ to UCBZ? In principle, in irrep/kpoint.py I see function "unfold", which seems to be suitable for such "trick". I am not sure yet how qe performs dos calculations and whether its straightforward to merry unfolding with dos routine, what do you think about that? Does it make any sense to think in that direction?

stepan-tsirkin commented 3 years ago

is it possible to utilize the infrastructure of QE by using routine which is used for DOS calculations and then do unfolding of the sampled SCBZ to UCBZ?

I am not sure I understand how you want to utilize that

In principle, in irrep/kpoint.py I see function "unfold", which seems to be suitable for such "trick".

Yes, essentially that routine really performs the core operation, all the rest is just a wrap.

I started implementation in this : branch The idea is to define a common class UnfoldingSet, which can be initialized with any set of kpointsPBZ, and will not have a plot method. And the UnfoldingPath will be a child of that.

I did not run the code, most probably it will fail, but there needs to be some work done to debug. You may have a look and if you manage to debug yourself, you are welcome to make a PR to that branch.

@alpinnovianus , I remember you were interested in that functionality too.

stepan-tsirkin commented 3 years ago

Hi @NickRybin @alpinnovianus

The following PR #8 implements the usage of arbitrary sets of points using the Unfolding instead of UnfoldingPath

This way you may get the result as a set of data (ik,Energy,Weight), and then process/plot the data in any form you like. This is briefly illustrated in the updated tutorial.

Could you try this new functionality and give some feedback, before I merge into the master branch.

NikaRybin commented 3 years ago

Hi @stepan-tsirkin, Sure, will test tomorrow! Thanks! UPDATE: yes, it seems to work. I will play around with it more and will write a more detailed feedback.