1! Copyright (C) 2006-2008 Dmitry Korotin - dmitry@korotin.name
2! This file is distributed under the terms of the
3! GNU General Public License. See the file `License'
4! in the root directory of the present distribution,
5! or http://www.gnu.org/copyleft/gpl.txt .
6!
7!--------------------------------------------------------------------------
8!
9
10MODULE wannier_new
11  !
12  ! ... Variables to construct and store wannier functions
13  !
14  USE kinds,      ONLY : DP
15  !
16  SAVE
17  !
18  INTEGER, PARAMETER :: ningx = 10 ! max number of trial wavefunction ingredients
19
20  LOGICAL :: &
21     use_wannier,              &! if .TRUE. wannier functions are constructed
22     rkmesh,                   &! if .TRUE. regular k-mesh without symmetry is used !now used in input_parameters_mod
23     plot_wannier,             &! if .TRUE. wannier number plot_wan_num is plotted
24     use_energy_int,           &! if .TRUE. uses energy interval for wannier generation, not band numbers
25        print_wannier_coeff           ! if .TRUE. computes and prints coefficients of wannier decomp. on atomic functions
26  INTEGER :: &
27     nwan,                     &! number of wannier functions
28     plot_wan_num,             &! number of wannier for plotting
29     plot_wan_spin              ! spin of wannier for plotting
30  REAL(kind=DP), allocatable ::  &
31     wan_pot(:,:),             &! constrained potential
32     wannier_energy(:,:),      &! energy of each wannier (of each spin)
33     wannier_occ(:,:,:)         ! occupation matrix of wannier functions(of each spin)
34  COMPLEX(kind=DP), allocatable :: &
35     pp(:,:),                  &! <phi|S|psi> projections
36     coef(:,:,:)                ! coefficients of wannier decomp. on atomic functions
37
38  TYPE ingredient
39         INTEGER :: l = 0, &           ! l value for atomic wfc
40                    m = 0, &           ! m value for atomic wfc
41                    iatomwfc = 0       ! number of corresponding atomic orbital
42         REAL :: c = 0.d0              ! coefficient
43  END TYPE ingredient
44
45  TYPE wannier_data
46          INTEGER :: iatom = 0,              &
47                     ning = 0
48          REAL ::        bands_from = 0.d0, &
49                         bands_to = 0.d0
50          TYPE (ingredient) :: ing(ningx)
51  END TYPE wannier_data
52
53  TYPE (wannier_data), allocatable :: wan_in(:,:)
54END MODULE wannier_new
55