diff --git a/src/parameters.F90 b/src/parameters.F90 index 0a28ecab2..abcdc2b42 100644 --- a/src/parameters.F90 +++ b/src/parameters.F90 @@ -831,7 +831,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. end if slwf_constrain = .false. diff --git a/src/wannier_lib.F90 b/src/wannier_lib.F90 index 7557431eb..126904b20 100644 --- a/src/wannier_lib.F90 +++ b/src/wannier_lib.F90 @@ -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 @@ -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()