QuantumMaterialsModelling / bands4vasp

bands4vasp -- post processing package for the analysis of unfolded eigenstates in VASP, and much more: band structures, 2D and 3D Fermi surfaces, Fermi vectors and spectral functions.
10 stars 9 forks source link

2D Fermi Surface Unfolding #5

Closed Gargee-123 closed 1 year ago

Gargee-123 commented 2 years ago

Dear bands4vasp Developers,

First of all, many thanks for the unfolding package. I have done the band unfolding for the all my systems. I need to do the 2D Fermi surface unfolding plot as shown in Figure 5 in the paper (https://pubs.acs.org/doi/10.1021/acs.jpcc.1c02318).

I have tried to do the 2D Fermi surface NbSe2 system (where I have done the band unfolding before) using the parameters SYMPOINT1 = 0.0 0.0 0.0 SYMPOINT2 = 0.5 0.0 0.0

However, I am not getting any 2D Fermi surface. I would also need to do 2D surface plot at other energy cuts (as shown in Figure 5b, c in the paper). Please let me know where I am making mistake.

Fermisurface_bloch

Best regards Gargee

MicheleReticcioli commented 2 years ago

Dear Gargee, we are happy to read that the band unfolding has worked for you. Regarding the Fermi Surface, I strongly recommend you to make yourself familiar with the overall procedure, by following the instruction in the Tutorial (Section 3). If the procedure works for you for the test case in the Tutorial, you can apply the same procedure for your NbSe2 system.

Gargee-123 commented 2 years ago

Dear Michele,

Thank you for your suggestion. I will try to do the example and then try my system. I have read that regarding the tag SYMPOINT1 and SYMPOINT2, both of them are set to 3d vectors.

From the above points, SYMPOINT1 is the center (Gamma). I did not understand completely how to define SYMPOINT2. I have read that by SYMPOINT1 and SYMPOINT2 we can provide the mirror axis of reflection.

Best regards Gargee

Gargee-123 commented 2 years ago

Dear Michele,

I have tried to run the example following the tutorial. I have the run b4vasp --pre-circle 1unfolding/, then I have got the error.

please enter the number of equidistance steps: 20

please enter the name of the folders: 1unfolding At line 27 of file getradlines.f90 (unit = 24, file = 'band4vasp_KPOINTScoordinates') Fortran runtime error: End of file

Error termination. Backtrace:

0 0x2b1dfdab5821 in list_formatted_read_scalar

at ../../../libgfortran/io/list_read.c:2245

1 0x4012ba in ???

2 0x4020fe in ???

3 0x2b1dfe47ab14 in ???

4 0x400c68 in ???

5 0xffffffffffffffff in ???

sed: can't read fermicircle4VASP.dat: No such file or directory prepared 11unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 21unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 31unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 41unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 51unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 61unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 71unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 81unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 91unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 101unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 111unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 121unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 131unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 141unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 151unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 161unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 171unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 181unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 191unfolding sed: can't read fermicircle4VASP.dat: No such file or directory prepared 201unfolding rm: cannot remove 'fermicircle4VASP.dat': No such file or directory

Looking for your helpful suggestions in this regard.

Thanks & Regards Gargee

MicheleReticcioli commented 2 years ago

Dear Gargee, could you upload your input files?

Gargee-123 commented 2 years ago

Dear Michele,

I have now used the inputs from the example. I am attaching the inputs.

EXAMPLE.zip

DavidDirnberger commented 2 years ago

Dear Gargee, I think there is a misunderstanding of the "--pre-..." functions, they are intended for setting up your data to do the unfolding calculation with VASP. I updated bands4vasp (v0.4) and now there are more warnings and information printed out, according to this issue. The problem you wrote before was because you tried to set up the data for a fermisurface calculation, but the data you used is already a calculated bandstructure. So you could just use "b4vasp %unfolding" which would optain images of the bandstructure and possible fermiroots.

What you want to do:

1) prepare a directory, where you put the INCAR POSCAR POTCAR WAVECAR CHGCAR files, which you already used for the unfolding of your NbSe2 system and either you have defined the transformation matrix M in the INCAR or you have additionally the POSCAR.prim file.

2) Prepare the KPOINTS file, in this directory, as you would use it for one line calculation in the surface, for example:

k-points for fermisurface 40 p line reciprocal

makepath

And in the line were you usually write the coordinates of your k-points, you put the flag #makepath and write below the coordinates for your sampling, which depends on the sampling method and is described in the documentation or in a shorter version just enter "b4vasp --info".

3) Now you can use the "--pre-..." function for the sampling method you chose, for example: b4vasp --pre-circle 'name of your prepared directory' and you will get a structure of folders (e.g. 1circle 2circle ...). Now you can start the calculation with VASP for every folder.

4) Once this is done you can use the "--fermi" function of bands4vasp, for example: b4vasp --fermi %circle And you get the 2D fermisurface. The plot from Figure 5 in the paper (https://pubs.acs.org/doi/10.1021/acs.jpcc.1c02318) is the spectral function (SPECFUN in INPAR) of the fermisurface, which you should set to TRUE in the INPAR file before you start the postprocessing. There are a lot of parameters which you can use to optimise your results. You find all the information about these parameters in the bands4vasp_documentation, there is a more detailed example of how to optimise the fermisurface in the bands4vasp_tutorial and of course you can always ask here.

Gargee-123 commented 2 years ago

Dear David,

Thank you very much for the detailed explanation. Yes, I misunderstood the "--pre-..." functions which is used to set up for VASP calculation where I thought that it is used for postprocessing of the data that I already have after band unfolding calculation.

Yes, I have done the band unfolding using b4vasp %unfolding for the example and I also did band unfolding similar way for my systems.

Yes, I want to do the Fermi surface calculation.

  1. Yes, I understand this point which is same way I did for the band unfolding calculation.
  2. Yes, I also made the same KPOINTS file as you mentioned.
  3. Now, I understand the step 3, that after using the "--pre-..." function, it will create folders and then I need to run VASP calculation for each one.
  4. Next , I can use "--fermi" function b4vasp --fermi %circle for plotting the Fermi Surface.

Yes, I understand that the plot in Figure 5 is spectral function. Yes, I have made the SPECFUN in INPAR TRUE and tried to plot the Fermi surface, but I tried that with the band unfolding calculation without VASP calculation for the Fermi surface. Yes, I have read about the TAGS from the bands4vasp_documentation.

I will now try to use the --pre function and run VASP calculation and then plot the Fermi Surface. Thank you again.

Best regards Gargee

Gargee-123 commented 2 years ago

Dear David,

I am trying to do Fermi Surface unfolding for NbSe2 supercell for which I have done the band unfolding calculation. I have used --pre-circle sampling to generate the Gamma centered K paths. The KPOINTS file that I have used to generate these inputs are given below:

k-gen 30 p line rec

makepath

0.000000 0.000000 0.000000 ! Center 0.500000 0.000000 0.000000 ! Start 0.000000 0.500000 0.000000 ! End

After finishing these jobs I checked the Fermi surface and spectral function plots which is attached here.

Fermisurface_bloch

Fermisurface_bloch spec

I have also generated inputs for corner centered using the KPOINTS as follows: (these jobs has not finished yet)

k-gen 30 p line rec

makepath

0.500000 0.500000 0.000000 ! Corner-Center 0.500000 0.000000 0.000000 ! Start 0.000000 0.500000 0.000000 ! End

I am also attaching the Fermi Surface of NbSe2 unit cell here.

FS_NbSe2_unit

I am wondering whether the KPOINTS that I used to generated Gamma centered radial sampling is correct or should I use the KPOINTS as below:

k-gen 30 p line rec

makepath

0.000000 0.000000 0.000000 ! Center 0.500000 0.000000 0.000000 ! Start 0.333333 0.333333 0.000000 ! End

Best regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

the KPOINTS you used look correct, but you have to keep in mind that the radial sampling you have done is in a quarter circle within a radius of 0.5 in the reciprocal space. So check if that sampling with a radius of 0.5 contains also the borders of your Brillion zone, that you obtain as well the hole pockets there.

It looks like you activated the SYMPOINT1 at coordinates (0.5,0,0). I recommend to deactivate the SYMPOINT1 and redo the calculation with the option -rs: b4vasp --fermi -rs

Now the Fermi surface plots show only the calculated fermiroots with VASP. In your case it would be a quarter of the gamma plane. If that looks correct, you can set the SYMPOINT1 at the gamma point (0,0,0) and start bands4vasp again: b4vasp --fermi -rs

Now you should see the Fermi surface you expected. (I am really not sure if the radius of 0.5 is enough to obtain the whole Gamma plane)

So first deactivate all SYMPOINTS in you INPAR, redo the calculation with bands4vasp and if everything look correct set SYMPOINT1 to (0,0,0). If you are missing the borders of the gamma plane you should increase the radius of your sampling, for a radius 1 it would look like that:

k-gen 30 p line rec

makepath

0.000000 0.000000 0.000000 ! Center 1.000000 0.000000 0.000000 ! Start 0.000000 1.000000 0.000000 ! End

Let me know, if this solved the problem.

Best regards,

David

Gargee-123 commented 2 years ago

Dear David,

Thank you for your reply and explanation. Yes, I have tried the other ways that you have mentioned:

I need to give the points such a way it covers quarter of a circle, therefore I used

k-gen 30 p line rec

makepath

0.500000 0.500000 0.000000 ! Corner-Center 0.500000 0.000000 0.000000 ! Start 0.000000 0.500000 0.000000 ! End

I have also tried the other way that I have mentioned at last in my previous message, but as I expected it turned out wrong. I am attaching here my results with all the inputs that I have tried. In the slide 1, I can see the similarity of the Unfolded Fermi Surface with unit cell Fermi Surface. This time I used SYMPOINT1 as 0.0 0.0 0.0.

As you mentioned, I also thought that some parts of the FS are missing, so I did the sampling with the path you mentioned and I only have done Gamma centered radial sampling (Slide 2).

I could not match it with the unit cell FS. (Although I have not run the jobs for corner centered radial sampling). So, I think I should run without SYMPOINT1.

Fermi Surface Unfolding NbSe2.pdf

Best regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

you are right, it looks like something is missing. This can have various issues (e.g. energy interval is to small, the band processing is wrong, ...) In such a case it is usefull to take a look at the bandstructure of a single line. Please type:

b4vasp 1circle

and post the EBSbloch EBSbloch.fine and the EBSorbit_ALL (if present)

Another thing you can do is to higher SIGMA and lower SPECDELTA in INPAR, to get at least the whole spectral function of the Fermi surface. I did a test, to show you the difference. The values of course depending on the system.

specfun

Gargee-123 commented 2 years ago

Dear David,

I have checked the FS unfolding and spectral function with the option you mentioned. My results are attached in the pdf.

The First slide contains the result that I have previously shown (both Gamma centered and corner centered radially sampled, with SYMPOINT1 = 0.0 0.0 0.0) . The Second slide contains the results with only Gamma centered radially sampled, with SYMPOINT1 = 0.0 0.0 0.0 with increased starting and ending point.

In the third slide, I have increased the energy interval from 2.0 eV to 3.0 eV. The SYMPOINT1 is not given, so I can only see the results for one quarter. SIGMA = 0.03 and SPECDELTA = 0.001 were set in INPAR.

In the fourth slide, the energy interval is given as 3.0 eV and SIGMA = 0.3 and SPECDELTA = 0.00001 were set in INPAR. The SYMPOINT1 is not given. In this case, from the plot of spectral function, I can see that it swaps from M point to M' point (as mentioned in the unit cell FS). As it is hexagonal system, as I have given only increased range of M to M' , the one quarter is not fully covered. I think I need to start from the point K' and should end at the point M' so that the full quarter is covered. Let me know if I am correct.

Fermi Surface Unfolding NbSe2-2.pdf

Best regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

yes that's indeed the case. For the radial sampling you set the centre to gamma, the start point to K' and the end point to M' and the calculation should be fine. Because the length of the position vector K' is larger than the length of the position vector M' the length of the sampled lines shrinks from the length of vector K' to M' as it is indicated with the orange line. You could normalize M' and multiply it with the length of K' to get the sample as it is shown with the green line.

kpoints_NbSe2

But that's up to you. Best regards,

David

Gargee-123 commented 2 years ago

Dear David,

Thank you for the explanation. Yes, it is correct regarding the length of the position vector that you explained. I can try to do that also. But , I already submitted jobs with K' and M' as start and end and here I am attaching my results considering K' to M' as a quarter.

Fermi Surface Unfolding NbSe2-3.pdf

I have two questions:

  1. The spectral function looks correct, but in the Fermi surface plot at the K' region, the weights are not very clear. Is it because I needed to take more division while generating the Circle ? (I have used 30 Circles. ) Or can I make these lines more prominent by changing parameters in INPAR file ?

  2. In the spectral function plot looks many dotted plots. The spectral function plot in the paper looks very smooth. Should I need to use more jobs to make the spectral function plot smooth ?

  3. How can I make plot of Isosurface for other energy cuts ? Should I specify EFERMI in the INPAR file for visualizing other energy cuts ? (If I consider Fermi = 0, and want to see the energy cuts at E = -0.3 eV, I need to check the EFERMI and accordingly change the value adding -0.3 eV and set it to EFERMI) . Is it correct ?

I would like to add one update in the results. When I see only one quarter spectral function plot, it does not look like that it is the same radius centered at Gamma. Why it is looking like this ?

Fermi Surface Unfolding NbSe2-3.pdf

Best regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

it looks like that you already got the whole Fermi surface in the Brillouin zone so you don't have to lengthen the position vector M'. To your questions:

  1. Yes you can make these lines more prominent by changing parameters in INPAR. The Fermi surface plot is derived from the (effective) bandstructure, where these bands crosses the Fermi energy. The algorithm tries to identify each band and if it crosses Fermi level it calculates the position in k-space. For the unfolding method, the bands can't identify anymore with the bandindex and the bands are vanishing as well. This is the reason why an adjustment of some parameters is needed to identify the bands correctly. In your case I would go like this: Take a closer look at the effective band structure of K' region, where you started the sampling (e.g. '1radial') "b4vasp 1radial" now compare the EBSbloch and the EBSbloch.processed plots. You want to see two Fermi roots (red framed points) in the EBSbloch.processed plot. If you see that the Bloch character is changing a lot, increase the DBLOCH value. If the energy states of the system have a high energy difference, increase EGAP. If to many energy states are missing in the 'processed' plot, decrease the BLOCH_THRESHOLD. You can find an example of the way to do this in the bands4vasp_tutorial in section 3 Fermisurface and a description of the parameters (General control parameters) for identifying the bands in the bands4vasp_documentation section 3.3 INPAR

  2. I don't think that you need more jobs. Set "SLIMSPEC=.FALSE." in your INPAR and bands4vasp smoothens the spectral function plot. It could be that you have to play a little bit with the paramerters SIGMA and SPECDELTA to get the result you want to.

  3. If you want to obtain the Fermi surface at different planes in the Brillouin zone, as we did in the paper https://pubs.acs.org/doi/10.1021/acs.jpcc.1c02318 in figure 5, you keep the Fermi energy of your system, change the "height" for you sampling and do the same steps as you did before. In your case it should be very easy, because you only have to increase the b3 coordinate

k-gen 30 p line rec

makepath

0.000000 0.000000 0.100000 ! Corner-Center 0.666666 -0.333333 0.100000 ! Start 0.000000 0.500000 0.100000 ! End

This comes without guarantee, do your own check of the reciprocal lattice and the Brillouin zone of your system. In general you define different planes in the Brillouin zone and do the Fermi surface calculation for every plane. Sometimes it is easier to give the coordinates in cartesian representation, which you can do, if you change the 'rec' into 'cartestian' at the 5th line in the KPOINTS file. But if you really want to have the Fermi surfaces for different energy cuts you would in fact just change the EFERMI in INPAR, but you have to put always a '.' like this 'EFERMI=0.0'. And in this case you only need to run the post processing with bands4vasp again and don't redo the whole calculation again. But I think in this case you can not call it anymore Fermi surface. The Fermi energy for your current calculation is printed in the terminal.

I don't exactly get what you mean with your updated question. If you put "SYMPOINT1=0.0 0.0 0.0" bands4vasp copies the data (x,y) with (-x,y), (x,-y),(-x,-y) and all their properties. Did you meant that?

Cheers,

David

Gargee-123 commented 2 years ago

Dear David,

Thank you very much. Yes, I got the Fermi surface, but, I need to do the Fermi surface in extended range covering all the hexagon which are surrounding to one main hexagon (as shown in the slide number 6). Therefore, I think I need to follow the procedure that you mentioned earlier.

  1. I have plotted only starting point 'b4vasp 1Circle ' and just saw the EBSBloch and EBSBloch.processed (slide number 5). I will check the INPAR parameters as you mentioned.
  2. I have used "SLIMSPEC=.FALSE." and showed the plot in slide number 2. Yes, it shows an interpolated plot.
  3. From your explanation I understand that I want to see Isosurface at other energy cuts, so as you mentioned I need to change 'EFERMI=XX' in the INPAR. Yes, it can not be called Fermi Surface.
  4. Regarding my updated question: Yes, I understand what you explains about SYMPOINT1=0.0 0.0 0.0. What I meant that in the first quarter, it should look like a part of circle centered at a same point (Gamma). But from the plot It does not look like that. I have indicated two blue arcs in slide number 4. I think that is because of the different length in the two direction I gave. If I give two points such that the radius is same, I think it would solve the problem.
  5. I have another question that, if I want to do surface sampling by 'b4vasp --pre-surface' I need to specify three points after #makepath in the KPOINTS file. I have attached a figure points those three points. Is it correct ?

Fermi Surface Unfolding NbSe2-4.pdf

Surface sampling

Thank you very much again.

Regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

  1. In the processed plot from the gamma - K' line there are 2 roots, this should also appear in the Fermi surface plot. Did you changed the parameters in INPAR allready? Than you can redo the '--fermi' calculation. This brings me also to your 4th question, the Fermi surface plots are calculated from the roots where the band crosses Fermi level, so if you adjust the parameters to get all points you should see the exact shape of the Fermi surface. The spectral function uses a smearing (delta function) of the energy states to derive the Fermi surface. If the length of the paths of your calculation varies, but the number of k-points (in KPOINTS file) stays the same, the density of the points on the Fermi surface changes, which could cause this patterns as you mentioned. But nevertheless the shapes of the electron/pocket holes have a hexagonal alike shape.
  2. If you try to higher SIGMA and lower SPECDELTA I think you could get an even better looking result.
  3. Ok perfect. By the way the energy values are all with respect to the Fermi energy (E-E_Fermi), so keep that in mind when you do the energy cuts.
  4. see 1
  5. That is a good point, when you want to do the extended calculation, the density of your points in the outer regions will be much lower. For that case it is more suitable to do the '--pre-surface' sampling. Your sketch is correct and in this case the calculation lines are setup from P1 to P2 and it will setup N equidistant lines parallel to P1P2 until it reaches P3.

You are welcome. Best, David

Gargee-123 commented 2 years ago

Dear David,

  1. Yes, I had tried changing the INPAR parameters and I got better results. I have changed DBLOCH values and I can see the weights in the plots near the K region (slide number 5, 6 and 7). The DBLOCH was changed from 0.2, 0.3 and 0.6. I also increased the EGAP from 0.2 to 0.3, 0.4 and 0.5 and now I can see the complete pattern in the K region (slide number 7, 8, 9, 10). I also tried playing with BLOCH_THRESHOLD, but for my case I did not see much difference as the states were present in the processed plot. Yes, you are correct that if the length of the radius changes but the number of points remains the same, it can create the pattern that I mentioned. Also, surface sampling is a better option in this case also.
  2. I have checked with some higher SIGMA and lower SPECDELTA, but I will play with those parameters to see much better results.
  3. Yes, I need to find the Fermi Energy as printed, and then I need to add with it to shift it accordingly. But for now, at first I think I only need Fermi Surface.
  4. Thank you for your confirmation of the start and end point. I also have another question regarding the surface sampling. When I am giving the start and end values, it is only considering the first quarter of the rectangle (as shown in the second figure , slide number 11) ?
  5. I have done the the Fermi surface for extended region for NbSe2 system with 90 jobs and the result is given in slide number 12. I will have other FS results soon (for other systems and composite systems).

Fermi Surface Unfolding NbSe2-5.pdf

Best regards Gargee

DavidDirnberger commented 2 years ago

Dear Gargee,

it is nice to see, that you get what you wanted. About your rectangular sampling question: With the 3 points you defining the actual rectangular where the sampling is happening. If you want just a quarter you have to put these coordinates of the quartered rectangle in the KPOINTS and later one you can set the SYMPOINT in INPAR. Needles to say is that the use of SYMPOINTs is only appliable for systems with that type of symmetry, unless you want a physical meaningful result.

Thank you for sharing your experience with bands4vasp and the results with us. It helps us to developing this tool and customizing it, to make it more easier and efficient to work with. Cheers,

David

Gargee-123 commented 2 years ago

Dear David,

Thank you for explaining about the rectangle sampling. I thank you for the bands4vasp tool which is very useful for Band and Fermi Surface Unfolding.

Best regards Gargee

Eryk616 commented 2 years ago

Dear David,

Hello there! I finally create a account and continue the question about the folder selecting. The folder number is still limited to 30 while using 'b4vasp --fermi folder%'. I have no idea. But I found there is one line in you code in 'filecheck.sh', which says 'if [ $ndiropt -gt 30 ];then ndiropt=30;fi'. I thought this could be the reason. But after some attempts the limit still remain. Could you help me with this? Thank you in advance.

Best regards, Jingyu

Gargee-123 commented 2 years ago

Dear Jingyu,

Yes, it is true that they select 30 folders from where it is asked to enter the folder for Fermi energy. However, it is better to specify the Fermi Energy in the INPAR file from the self-consistent run rather than choosing Fermi energy from the band calculations.

Best regards Gargee