1!
2! Copyright (C) 2003 PWSCF group
3! This file is distributed under the terms of the
4! GNU General Public License. See the file `License'
5! in the root directory of the present distribution,
6! or http://www.gnu.org/copyleft/gpl.txt .
7!
8#include "f_defs.h"
9!
10module wannier
11   USE kinds, only : DP
12   !integer, allocatable :: nnb(:)       ! #b  (ik)
13   integer              :: nnb          ! #b
14   integer, allocatable :: kpb(:,:)     ! k+b (ik,ib)
15   integer, allocatable :: g_kpb(:,:,:) ! G_k+b (ipol,ik,ib)
16   integer, allocatable :: ig_(:,:)     ! G_k+b (ipol,ik,ib)
17   integer, allocatable :: lw(:,:), mw(:,:) ! l and m of wannier (16,n_wannier)
18   integer, allocatable :: num_sph(:)   ! num. func. in lin. comb., (n_wannier)
19   logical, allocatable :: excluded_band(:)
20   integer  :: iun_nnkp, iun_mmn, iun_amn, iun_band, iun_spn,iun_plot, nnbx, nexband
21   integer  :: n_wannier !number of WF
22   integer  :: n_proj    !number of projection (=#WF unless spinors then =#WF/2)
23   complex(DP), allocatable :: gf(:,:)  ! guding_function(npwx,n_wannier)
24   integer               :: ispinw, ikstart, ikstop, iknum
25   character(LEN=15)     :: wan_mode    ! running mode
26   logical               :: logwann, wvfn_formatted, write_unk, &
27                            write_amn, write_mmn, reduce_unk,write_spn
28   ! input data from nnkp file
29   real(DP), allocatable :: center_w(:,:)     ! center_w(3,n_wannier)
30   integer, allocatable  :: l_w(:), mr_w(:) ! l and mr of wannier (n_wannier) as from table 3.1,3.2 of spec.
31   integer, allocatable  :: r_w(:)      ! index of radial function (n_wannier) as from table 3.3 of spec.
32   real(DP), allocatable :: xaxis(:,:),zaxis(:,:) ! xaxis and zaxis(3,n_wannier)
33   real(DP), allocatable :: alpha_w(:)  ! alpha_w(n_wannier) ( called zona in wannier spec)
34   !
35   real(DP), allocatable :: csph(:,:)    ! expansion coefficients of gf on QE ylm function (16,n_wannier)
36   CHARACTER(len=256) :: seedname  = 'wannier'  ! prepended to file names in wannier90
37   ! For implementation of wannier_lib
38   integer               :: mp_grid(3)            ! dimensions of MP k-point grid
39   real(DP)              :: rlatt(3,3),glatt(3,3) ! real and recip lattices (Cartesian co-ords, units of Angstrom)
40   real(DP), allocatable :: kpt_latt(:,:)  ! k-points in crystal co-ords. kpt_latt(3,iknum)
41   real(DP), allocatable :: atcart(:,:)    ! atom centres in Cartesian co-ords and Angstrom units. atcart(3,nat)
42   integer               :: num_bands      ! number of bands left after exclusions
43   character(len=3), allocatable :: atsym(:) ! atomic symbols. atsym(nat)
44   integer               :: num_nnmax=12
45   complex(DP), allocatable :: m_mat(:,:,:,:), a_mat(:,:,:)
46   complex(DP), allocatable :: u_mat(:,:,:), u_mat_opt(:,:,:)
47   logical, allocatable     :: lwindow(:,:)
48   real(DP), allocatable    :: wann_centers(:,:),wann_spreads(:)
49   real(DP)                 :: spreads(3)
50   real(DP), allocatable    :: eigval(:,:)
51end module wannier
52!
53
54
55