[Wannier] Plotting projected-bands

Ivo Souza ivo_souza at ehu.es
Tue Oct 2 18:39:35 CEST 2012


Dear Jianpeng,

   What is currently done in wannier90 is simpler (but probably less 
general) than what you describe. This was all done by Jonathan Yates, but 
I will try to explain.

   Take a look at the routine plot.F90. Around line 496 you have a nested 
loop over bands and over k-points along the specified k-point path. Inside 
the loop the data is written in the format

x(k_1)  E_{n=1}(k_1)  w_{n=1}(k_1)
x(k_2)  E_{n=1}(k_2)  w_{n=1}(k_2)
x(k_3)  E_{n=1}(k_3)  w_{n=1}(k_3)
.
.
.

(blank line)

x(k_1)  E_{n=2}(k_1)  w_{n=2}(k_1)
x(k_2)  E_{n=2}(k_2)  w_{n=2}(k_2)
x(k_3)  E_{n=2}(k_3)  w_{n=2}(k_3)
.
.
.

with blank lines separating the data for different bands.

The first column is the coordinate along the k-point path; the second is 
the energy eigenvalue; the third is the weight of the chosen WFs on the 
eigenstate. If you run example 04, the output data file has the name 
copper_band.dat

Issuing from gnuplot the command

gnuplot> plot 'copper_band.dat' u 1:2

gives you a 2D plot of the energy bands.

The data in the 3rd column can be added using 'splot',

gnuplot> splot 'copper_band.dat' u 1:2:3

which produces a 3D plot in perspective. The x and y coordinates have the 
same meaning as before, and the z coordinate is the WF weight in the third 
column. With the mouse you can rotate the plot, and if you view it from 
above you recover the 2D band plot (or you can issue 'set view map' and 
re-issue the splot command).

The trick now is to use the data in the 3rd column not as a third 
coordinate in a 3D plot, but as a color code in a 2D plot, using "palette"

gnuplot> splot 'copper_band.dat' u 1:2:3 palette

The effect is to color the bands by the WF weight. This is basically what 
the gnuplot script 'copper_band_proj.gnu' generated at runtime does.

   Hope this helps,

   Ivo

On Sun, 30 Sep 2012, Jianpeng Liu wrote:

> Dear Wannier90 developers and users,
>
> I noticed that we can plot projected band-structure with Wannier90 by
> properly setting up the 'bands_plot_project' option, which is really nice.
> I am trying to do similar things, can anyone tell me how the projected
> plotting are coded? In-principle, we can scan over the k-axis and
> energy-axis(E-axis), and assign the pre-defined weights whenever the
> energy-variable at a particular k-point is equal to the band-energy at the
> same point, then make a contour plot of the weights over k and E. However,
> the above method needs a fine sampling of the k-axis and energy-axis, and
> it is  relatively expansive the number of bands is large. Is there any
> better approach, or powerful plotting tool? I would appreciate any
> comments, suggestions, or telling me which part of the source codes should
> I go to.
>
> best,
> Jianpeng Liu
> Ph.D. candidate,
> Department of Physics and Astronomy,
> Rutgers University
>
> _______________________________________________
> Wannier mailing list
> Wannier at quantum-espresso.org
> http://www.democritos.it/mailman/listinfo/wannier
>



More information about the Wannier mailing list