1
2! Copyright (C) 2017 T. Mueller, J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6module modulr
7
8!-----------------------------!
9!     ultracell variables     !
10!-----------------------------!
11! ultracell lattice vectors stored column-wise
12real(8) avecu(3,3)
13! ultracell reciprocal lattice vectors
14real(8) bvecu(3,3)
15! ultracell volume and Brillouin zone volume
16real(8) omegau,omegabzu
17! original number of k-points
18integer nkpt0
19! kappa-point grid sizes
20integer ngridkpa(3)
21! integer grid intervals for the kappa-points
22integer intkpa(2,3)
23! number of kappa-points
24integer nkpa
25! R-vectors in Cartesian coordinates spanning the ultracell
26real(8), allocatable :: vrcu(:,:)
27
28!------------------------------!
29!     G+Q-vector variables     !
30!------------------------------!
31! small Q cut-off for non-zero Q-vectors
32real(8) q0cut
33! G+Q-vectors in Cartesian coordinates
34real(8), allocatable :: vgqc(:,:,:)
35! |G+Q| for all G+Q-vectors
36real(8), allocatable :: gqc(:,:)
37! Coulomb Green's function in G+Q-space = 4 pi / |G+Q|^2
38real(8), allocatable :: gclgq(:,:)
39! spherical Bessel functions j_l(|G+Q|R_mt)
40real(8), allocatable :: jlgqrmt(:,:,:,:)
41! spherical harmonics of the G+Q-vectors
42complex(8), allocatable :: ylmgq(:,:,:)
43! structure factors for the G+Q-vectors
44complex(8), allocatable :: sfacgq(:,:,:)
45! phase factor functions exp(iQ.r) in each muffin-tin
46complex(8), allocatable :: expqmt(:,:,:)
47
48!---------------------------------------------------!
49!     ultra long-range densities and potentials     !
50!---------------------------------------------------!
51! trdvclr is .true. if the real-space external Coulomb potential should be read
52! in from file
53logical trdvclr
54! Q-dependent external Coulomb potential (FFT ordering)
55complex(8), allocatable :: vclq(:)
56! Q-dependent external magnetic field
57complex(8), allocatable :: bfcq(:,:)
58! Q-dependent external muffin-tin magnetic fields
59complex(8), allocatable :: bfcmtq(:,:,:)
60! electric field vector in Cartesian coordinates
61real(8) efielduc(3)
62! R-dependent density and magnetisation
63real(8), allocatable :: rhormt(:,:,:),rhorir(:,:)
64real(8), allocatable :: magrmt(:,:,:,:),magrir(:,:,:)
65! muffin-tin charges and moments for each R-vector
66real(8), allocatable :: chgmtru(:,:)
67real(8), allocatable :: mommtru(:,:,:)
68! Q-dependent density and magnetisation
69complex(8), allocatable :: rhoqmt(:,:,:),rhoqir(:,:)
70complex(8), allocatable :: magqmt(:,:,:,:),magqir(:,:,:)
71! Q-dependent Kohn-Sham potential and magnetic field
72complex(8), allocatable, target :: vsbsq(:)
73complex(8), pointer :: vsqmt(:,:,:),vsqir(:,:)
74complex(8), pointer :: bsqmt(:,:,:,:),bsqir(:,:,:)
75! random amplitude used for initialising the long-range magnetic field
76real(8) rndbfcu
77! if tplotq0 is .true. then the Q=0 term is included when generating plots
78logical tplotq0
79
80!----------------------------------------------!
81!     eigenvalue and eigenvector variables     !
82!----------------------------------------------!
83! number of ultra long-range states
84integer nstulr
85! long-range eigenvalues
86real(8), allocatable :: evalu(:,:)
87! long-range occupation numbers
88real(8), allocatable :: occulr(:,:)
89
90end module
91
92