Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification needed for SAWF in Wannier library mode. #342

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/parameters.F90
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ subroutine param_read()
if (slwf_num .gt. num_wann .or. slwf_num .lt. 1) then
call io_error('Error: slwf_num must be an integer between 1 and num_wann')
end if
if (slwf_num .lt. num_wann) selective_loc = .true.
if (slwf_num .lt. num_wann + 1) selective_loc = .true.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sponce24 can you explain this change? I think selective_loc is meant to be set if only some of the WFs are selectively localised? @VVitale maybe can also comment

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sponce24 @giovannipizzi and @hjunlee, apologies for the very late reply. As I mentioned in #287, you should not be able to arbitrarly fix "all" centers of the Wannier functions and expect this to work for an isolate manifold with number of bands = number of WFs, since the vectorial sum of the centers is a gauge invariant quantity (modulo a lattice vector). Whether this is possible for entangled bands, I am not really sure...

end if

slwf_constrain = .false.
Expand Down
3 changes: 3 additions & 0 deletions src/wannier_lib.F90
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ subroutine wannier_run(seed__name, mp_grid_loc, num_kpts_loc, &
use w90_transport
use w90_comms, only: my_node_id, num_nodes, &
comms_array_split, comms_scatterv
use w90_sitesym, only: sitesym_read

implicit none

Expand Down Expand Up @@ -359,6 +360,8 @@ subroutine wannier_run(seed__name, mp_grid_loc, num_kpts_loc, &
!~ ! Check Mmn(k,b) is symmetric in m and n for gamma_only case
!~ if (gamma_only) call overlap_check_m_symmetry()

! We need to read the .dmn file for later use in overlap_project
if (lsitesymmetry) call sitesym_read()
if (disentanglement) then
have_disentangled = .false.
call dis_main()
Expand Down