wannier-developers / wannier90

Official repository of the Wannier90 code
http://www.wannier.org
GNU General Public License v2.0
234 stars 138 forks source link

Implementation of Stengel-Spaldin Functional in Wannierization #498

Open sjhong6230 opened 5 months ago

sjhong6230 commented 5 months ago

The main differences for this pull request are shown below.

Since the functional sums over k-points before b-vector summation, I needed to order the b-vector information before Wannierization. This sorting is implemented in the kmesh_sort subroutine in kmesh.f90, and only used for wannier90.x (not postw90.x).

The main changes are in wannierise.f90 file. wann_phases, wann_omega, and wann_domega subroutines are changed. guiding_centres=T case is also considered.

Documentations, tests, and tutorials are added by slightly modifying the silicon tutorial. Also, test data are modified for restart and bvec tests.

Since this is my first pull request in Wannier90, there might be many errors and mistakes. Please feel free to comment.

[1] https://journals.aps.org/prb/abstract/10.1103/PhysRevB.73.075121

sjhong6230 commented 5 months ago

Results of personal local tests

sjhong6230 commented 5 months ago

TODO after this PR is merged.

sjhong6230 commented 5 months ago

Note: The default value of use_ss_functional is false.