wannier90
wannier90 copied to clipboard
Some of the Python scripts generated by wannier90 for Berry curvature and Fermi-lines plotting are not working
Hi developers, Scripts.zip
During calculations wannier90 generate python script which can be used to plot the data. However, i have observed that some of the python scripts for plotting the Berry curvature and Fermi-lines are not working properly, For instance, scripts such as "wannier90-kslice-curv_x.py", "wannier90-kslice-curv_y.py", "wannier90-kslice-curv_z.py", "wannier90-kslice-curv_x-fermi_lines.py", "wannier90-kslice-curv_y-fermi_lines.py" and "wannier90-kslice-curv_z-fermi_lines.py" are not working. For example, by running the script "wannier90-kslice-curv_z.py" it gives an error like that:
File "wannier90-kslice-curv_z.py", line 45, in
I think this error is due to the fact the script use old matplotlib which is not compatible with the new one in python3. You may read the discussion here: https://www.reddit.com/r/Python/comments/87lbao/matplotlib_griddata_deprecation_help/
Some of these python scripts are attached to this email, please find the enclosed attachment. Let me make a request to the developer to modify these scripts so that it can work successfully. As I am very poor in python and that's why unable to modify it. Your efforts would be highly appreciated in this regard. Thank You Regds Abid Quaid-i-Azam university, Islamabad
@ivosouza0 @stepan-tsirkin were you the authors of these scripts? If so, can you give a look and update the scripts?
I'll have a look!
Hi,
I have the same issue as follows:
AttributeError: module 'matplotlib.mlab' has no attribute 'griddata'
Could you please tell us the solution or share the correct python code?
Cheers
Hello.
You must use matplotlib-2.1.2.
Att
See! https://github.com/matplotlib/natgrid/blob/master/README For interpolate nn
And execute python -mpip install git+https://github.com/matplotlib/natgrid.git
See! https://github.com/matplotlib/natgrid/blob/master/README For interpolate nn
hi, I want to know how to install natgrid. Can you tell me in detail?
From a message in the mailing list:
I encountered a similar issue a while back and was able to tackle it by commenting out the line "valint = ml.griddata(points_x,points_y, val_log, xint,yint)" and replacing it with "valint = interpolate.griddata((points_x,points_y), val_log, (grid_x, grid_y), method='nearest') # or 'cubic' or 'nearest', as requiredS". Hope it helps.
We should test and fix it.