TRIQS / FermiSee

WebApp for electronic structure visualization and phenomenology
http://fermisee.flatironinstitute.org/
GNU General Public License v3.0
5 stars 3 forks source link

Fermi-Surface cuts at kz!=0.0 #4

Open the-hampel opened 7 months ago

the-hampel commented 7 months ago

Hello, FermiSee is very easy to use, especially the feature for plotting Fermi surfaces, which is exactly what I need. However, I've encountered two issues during usage:

Firstly, it seems that the Fermi surface functionality only correctly plots the Fermi surface within the kz=0 plane. When I adjust the coordinates of high-symmetry points, the graphics change, but I cannot determine which plane's Fermi surface is being plotted.

The second issue relates to file uploads. Is there a size limit for uploading w90_hr files in FermiSee? The example provided with the svo_hr file and my own hr file, which is 1.2MB in size, work well and correctly plot the band structure. However, when I try to upload a file of approximately 2.4MB, it consistently fails.

Originally posted by @Chen-Ziyan in https://github.com/TRIQS/FermiSee/discussions/1#discussioncomment-8663841

the-hampel commented 7 months ago

Hi @Chen-Ziyan,

We just fixed the issue in this commit: https://github.com/TRIQS/FermiSee/commit/24bc84e46254bd5f26b75668d93852680ae91daa , if you now pull the latest unstable version and run docker-compose up --build it should show you in the Fermi Surface tab only 3 vectors to enter. These three vectors will span a surface which is plotted. To shift kz just change the corresponding component. Note, these are still relative coordinates.

We will try to push these changes live in the coming days. Let me know if you have further questions.

the-hampel commented 7 months ago

Hi @Chen-Ziyan, I pushed the changes now live to fermisee.flatironinstute.org. You can try it out. But let me emphasize again that running this locally on your laptop is probably a factor of 10 faster if you have a somewhat modern machine (last 5 years).

Best, Alex

the-hampel commented 6 months ago

Hi @Chen-Ziyan, I am a bit confused by your statement:

I've identified the reason for the incorrect Fermi surface slicing. In tab2_callbacks.py, line 53 fixes kz to 0, causing the line in TB_functions.py at line 106: path_FS = [(Y/(N_kxy-1)kyi +kzZ, X+Y/(N_kxy-1)kyi+kzZ)] to fail to move correctly along the z-axis.

Because this line is exactly what we fixed. If you look at the latest unstable version of FermiSee I cannot find the line you point to. This is what the definition of path_FS looks like right now: https://github.com/TRIQS/FermiSee/blob/24bc84e46254bd5f26b75668d93852680ae91daa/tools/TB_functions.py#L32

Here you can see we now explicitly use the kz information. Can you check that you pulled the latest unstable version? You should be on commit 54efe77103866b182fef5a1ff2d999cf1183cbf2 .

Regarding your other questions for 12 orbitals I will check. I run FermiSee in the past for 12 orbitals without any problems.

Chen-Ziyan commented 6 months ago

Thank you so much for providing the new version of the code. I really appreciate the new way of plotting Fermi surfaces. Previously, I could only obtain graphics for one-quarter of the Fermi surface, but now I can plot the entire Brillouin zone or even larger regions. The version on fermisee.flatironinstute.org that you provided runs smoothly, but when I downloaded it locally, it failed to run at the first step. Here's the error message: ea8e9bf7bad1875a327165957ac4e78 What could be the reason for this?

I also noticed that the new online version still cannot plot Fermi surfaces in certain specific cases. Please allow me to describe it in detail. Below is a DFT band structure of NdNiO2 that I worked on. When I select the kz=0 plane to slice the Fermi surface, I can perfectly obtain one Fermi surface each at the Γ and M points. Furthermore, the program correctly plots the Fermi surface continuously until kz=0.38 or so. However, when new Fermi surfaces emerge from the M point, the Fermi surface seems to stop updating its image. In other words, when there are two Fermi surfaces at the M point, the program seems to fail to run successfully. 17a015bf04f5fa017e800803266de57 I encountered this issue when trying to replicate the interesting work in PHYSICAL REVIEW X 10, 021061 (2020).

the-hampel commented 6 months ago

Hi @Chen-Ziyan , just a quick answer for your first question. Could it be that you are using triqs 3.1.x? Are you running in the docker image or in your own triqs installation? FermiSee needs right now triqs 3.2.x . The error you see is related to an API change of the k_space_path function from 3.1.x to 3.2.x . You can check your triqs version with: python -c "import triqs.version as v; v.show_version()"

We will check the other issue.

the-hampel commented 6 months ago

Hi @Chen-Ziyan ,

Your second problem should be now fixed as well. There was actually another bug which was introduced due to changes in numpy. This is now fixed on the unstable branch of FermiSee with this commit: https://github.com/TRIQS/FermiSee/commit/0ffbcc5fe00b73028327c2c53b7086717f23c4d6

If you run it locally this should be fixed. I will update the public version in the coming days. Thanks again for reporting this! Let me know if this solves your problem now.

I explicitly tested this for a 3 band model of NdNiO2 to reproduce the Fermi surface of the PRX paper you are referring to at kz=0.5: Screenshot_20240322_122604

Chen-Ziyan commented 6 months ago

Thank you very much, now FermiSee can run smoothly on my computer. There's one inconvenience though. When plotting band structures and Fermi surface slices, it's not very convenient because the upper and lower limits of the color bar cannot be adjusted freely. Every time I plot, I have to manually adjust the parameters in the code. Is it possible to set up a window for conveniently reading the plotting parameters?

Regarding the input for making the self-energy function. It seems that the example provided in FermiSee/doc/howto_prepare_self_energy.py is very simple. If there are multiple equivalent or inequivalent atoms in a unit cell, is there a better code for reading the self-energy from an h5 file?

the-hampel commented 6 months ago

Good to hear that this works now. Yes we can probably add such feature quite easily. I will see if I find some time to do this the coming weeks.

Let me also stress that the FermiSee functionality is based on the plot correlated bands module of solid_dmft: https://github.com/TRIQS/solid_dmft/blob/3.2.x/python/solid_dmft/postprocessing/plot_correlated_bands.py and tutorial here https://triqs.github.io/solid_dmft/tutorials/correlated_bandstructure/plot_correlated_bands.html . With these python functions you have a lot more flexibility when it comes to passing a self-energy for multiple sites and setting colorbars etc.

Chen-Ziyan commented 6 months ago

Great, the plot correlated bands module of solid_dmft can solve many of the previous issues and is also very convenient to use.

Thanks again for your help.