fermisurfaces / IFermi

Fermi surface generation, analysis and visualisation.
https://fermisurfaces.github.io/IFermi/
MIT License
87 stars 33 forks source link

bottlenecks in isosurface calculation? #86

Closed mdforti closed 2 years ago

mdforti commented 3 years ago

as a follow up to yesterday question, I am trying to smooth a surface by increasing interpolation factor.

I am working with not so high number of kpoints, the interpolatied mesh has about 500k kpoints. However, the step of generating the fermi surface takes too long sometimes crashing the execution. I can see that the bottleneck is somewhere in the _calculate_band_isosruface method but cant tell exactly where, with only one cpu going to 100%. I guess the suspect for this must be the marching_cube method but I dont see a way to make it behave better. For larger kpoints also this line gives problems, but I guess this is not so easy to evercome.

The reason for me on digging into this is that with old Xcrysden very good renders of the same isosurface can be acheved in almos no time. the disadvantage in that case is that I can not come with a solution to automate the generation of the surfaces and is too much mouse click dependent.

Once again, thank you so much for the support.

utf commented 3 years ago

Did trimming the mesh help?

Would you be willing to send me the vasprun.xml file so I can have a look?

mdforti commented 3 years ago

thanks you for the follow up. trimming the mesh did actually help, weather using a very narrow energy range or cherry piking the bands I want to plot, and I got it working with interpolation factors up to 60 (~500k kpoints). how should I share the vasprun ?

utf commented 3 years ago

Ok, thats great! You should be able to use a reasonable energy range, say 1.5 eV, without too much trouble. That should be sufficient for almost all cases. Furthermore, if you are running IFermi programatically, you should know the Fermi level in advance and therefore it should be possible to set the energy range dynamically for optimal behaviour.

A couple of points:

You should be able to attached the vasprun on GitHub. See the screenshot below.

Screenshot 2021-08-18 at 11 22 17
mdforti commented 3 years ago

yes, you are right in your assumptions. the fermi surfaces I am interested in are actually a small volume of the BZ as I am interested in the VBM location. I tried less kpoints but i searched convergence of the effective masses. Actually the energy range I had to use is much lower than that, about 0.1eV, so only two or three bands come into the range. I understand about the marching cubes. yes, I noticed this fermi energy issue but I assumed thats my fault in setting the calculation correctly. basically I had to readjust the energy reference because there was a small difference between the efermi informed by vasp and the E_VBM, so the mu level needs to be adjusted accordingly.