Implementation of plotting Wannier functions without writing and reading UNK files

Dear all:

This commit includes the implementation to plot Wannier functions without writing and reading files including real-space wavefunction data (UNK files). Since Wannier90 (W90) is interfaced to several DFT codes, it imports real-space wavefunction data (UNK files) when plotting Wannier functions. However, EPW doesn't need such approach.

With this implementation, EPW can write directly the cube files including real-space Wannier functions without the intermediate step of writing and reading UNK files (the previous approach in EPW). This implementation also can solve the issue reported in the EPW forum (http://epw.phpbbhosts.co.uk/viewtopic.php?f=6&t=1266).

To be specific, keeping in mind the following two things:

  1. in general, the number of Wannier functions to plot is smaller than that of bands within the outer window
  2. the number of (soft) FFT grids is much larger than the number of plane waves necessary to describe wave functions

,I first construct the unitary-transformed wave functions from distributed wave functions for each Wannier function in reciprocal space and then perform the inverse FFT for them. These (k-resolved) partial sums are finally summed using mpi_reduce on I/O node to write out cube files.

Rather than implementing all functionalities in W90 for plotting Wannier functions, I implemented the essential ones; that is, the supported output format is just a cube format and the Wannier plot mode of molecule is not implemented. Also in case of spinor Wannier functions, only their norm is plotted. (It is straightforward to add the excluded functionalities)

In addition,

  1. due to the difference in parsing between EPW and W90, we should enclose the list of Wannier functions to plot with single quotation marks as below:

wannier_plot_list = '1, 3-5, 7', not wannier_plot_list = 1, 3-5, 7 as in W90.

  1. we need to explicitly provide three positive integers for wannier_plot_supercell as below (in default, wannier_plot_supercell = 5 5 5):

wannier_plot_supercell = 7 7 7

  1. Among input keywords for plotting Wannier functions in W90, only the following ones are use and they should be passed to EPW (not to W90 through the keyword of wdata).
  • wannier_plot (logical, in default .false.)
  • wannier_plot_list (integer lists, in default entire Wannier functions)
  • wannier_plot_supercell (three integers, in default 5 5 5)
  • wannier_plot_scale (real, in default 1.0)
  • wannier_plot_radius (real, in default 3.5 Ang.)
  • reduce_unk (logical, in default .false.)

Lastly, I fixed minor bugs and removed meaningless parts in EPW and W90.

Sincerely,

Hyungjun Lee

Edited by Hyungjun Lee

Merge request reports

Loading