The Elk Code
modulr.f90
Go to the documentation of this file.
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 
6 module modulr
7 
8 !-----------------------------!
9 ! ultracell variables !
10 !-----------------------------!
11 ! ultracell lattice vectors stored column-wise
12 real(8) avecu(3,3)
13 ! ultracell reciprocal lattice vectors
14 real(8) bvecu(3,3)
15 ! ultracell volume and Brillouin zone volume
17 ! original number of k-points
18 integer nkpt0
19 ! κ-point grid sizes
20 integer ngridkpa(3)
21 ! integer grid intervals for the κ-points
22 integer intkpa(2,3)
23 ! number of κ-points
24 integer nkpa
25 ! R-vectors in Cartesian coordinates spanning the ultracell
26 real(8), allocatable :: vrcu(:,:)
27 
28 !------------------------------!
29 ! G+Q-vector variables !
30 !------------------------------!
31 ! small Q cut-off for non-zero Q-vectors
32 real(8) q0cut
33 ! G+Q-vectors in Cartesian coordinates
34 real(8), allocatable :: vgqc(:,:,:)
35 ! |G+Q| for all G+Q-vectors
36 real(8), allocatable :: gqc(:,:)
37 ! Coulomb Green's function in G+Q-space = 4π / |G+Q|²
38 real(8), allocatable :: gclgq(:,:)
39 ! spherical Bessel functions jₗ(|G+Q|Rₘₜ)
40 real(8), allocatable :: jlgqrmt(:,:,:,:)
41 ! spherical harmonics of the G+Q-vectors
42 complex(8), allocatable :: ylmgq(:,:,:)
43 ! structure factors for the G+Q-vectors
44 complex(8), allocatable :: sfacgq(:,:,:)
45 ! phase factor functions exp(iQ⋅r) in each muffin-tin
46 complex(8), allocatable :: expqmt(:,:,:)
47 
48 !---------------------------------------------------!
49 ! ultra long-range densities and potentials !
50 !---------------------------------------------------!
51 ! R-dependent density and magnetisation
52 real(8), allocatable, target :: rhmgr(:)
53 real(8), pointer, contiguous :: rhormt(:,:,:),rhorir(:,:)
54 real(8), pointer, contiguous :: magrmt(:,:,:,:),magrir(:,:,:)
55 ! muffin-tin charges each R-vector
56 real(8), allocatable :: chgmtru(:,:)
57 ! muffin-tin, interstitial and total moments for each R-vector
58 real(8), allocatable :: mommtru(:,:,:),momirru(:,:),momtotru(:,:)
59 ! Q-dependent density and magnetisation
60 complex(8), allocatable :: rhoqmt(:,:,:),rhoqir(:,:)
61 complex(8), allocatable :: magqmt(:,:,:,:),magqir(:,:,:)
62 ! trdvclr is .true. if the real-space external Coulomb potential should be read
63 ! in from file
64 logical trdvclr
65 ! Q-dependent external Coulomb potential (FFT ordering)
66 complex(8), allocatable :: vclq(:)
67 ! trdbfcr is .true. if the real-space external magnetic field in Cartesian
68 ! coordinates should be read in from file
69 logical trdbfcr
70 ! Q-dependent external magnetic field
71 complex(8), allocatable :: bfcq(:,:)
72 ! Q-dependent external muffin-tin magnetic fields
73 complex(8), allocatable :: bfcmtq(:,:,:)
74 ! global external magnetic field in Cartesian coordinates
75 real(8) bfieldcu(3)
76 ! electric field vector in Cartesian coordinates
77 real(8) efieldcu(3)
78 ! if tbdipu is .true. then the spin dipole-dipole interaction is included
79 logical tbdipu
80 ! Q-dependent magnetic dipole field
81 complex(8), allocatable :: bdipq(:,:)
82 ! Q-dependent Kohn-Sham potential and magnetic field
83 complex(8), allocatable, target :: vsbsq(:)
84 complex(8), pointer, contiguous :: vsqmt(:,:,:),vsqir(:,:)
85 complex(8), pointer, contiguous :: bsqmt(:,:,:,:),bsqir(:,:,:)
86 ! random amplitude used for initialising the long-range magnetic field
87 real(8) rndbfcu
88 ! if tplotq0 is .true. then the Q=0 term is included when generating plots
89 logical tplotq0
90 
91 !----------------------------------------------!
92 ! eigenvalue and eigenvector variables !
93 !----------------------------------------------!
94 ! number of ultra long-range states
95 integer nstulr
96 ! long-range eigenvalues
97 real(8), allocatable :: evalu(:,:)
98 ! long-range occupation numbers
99 real(8), allocatable :: occulr(:,:)
100 
101 end module
102 
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
Definition: modulr.f90:84
complex(8), dimension(:,:,:), allocatable sfacgq
Definition: modulr.f90:44
real(8), dimension(:,:,:,:), allocatable jlgqrmt
Definition: modulr.f90:40
complex(8), dimension(:,:), pointer, contiguous vsqir
Definition: modulr.f90:84
integer nstulr
Definition: modulr.f90:95
complex(8), dimension(:,:), allocatable bdipq
Definition: modulr.f90:81
real(8), dimension(3) efieldcu
Definition: modulr.f90:77
integer nkpt0
Definition: modulr.f90:18
integer, dimension(3) ngridkpa
Definition: modulr.f90:20
real(8) omegau
Definition: modulr.f90:16
real(8), dimension(3, 3) bvecu
Definition: modulr.f90:14
complex(8), dimension(:,:,:,:), allocatable magqmt
Definition: modulr.f90:61
complex(8), dimension(:,:,:), pointer, contiguous bsqir
Definition: modulr.f90:85
complex(8), dimension(:,:,:), allocatable magqir
Definition: modulr.f90:61
real(8), dimension(:,:), allocatable chgmtru
Definition: modulr.f90:56
real(8), dimension(:,:), allocatable momirru
Definition: modulr.f90:58
complex(8), dimension(:), allocatable vclq
Definition: modulr.f90:66
real(8), dimension(:,:,:,:), pointer, contiguous magrmt
Definition: modulr.f90:54
real(8), dimension(3) bfieldcu
Definition: modulr.f90:75
real(8), dimension(:,:), allocatable occulr
Definition: modulr.f90:99
real(8) q0cut
Definition: modulr.f90:32
real(8), dimension(:), allocatable, target rhmgr
Definition: modulr.f90:52
real(8), dimension(3, 3) avecu
Definition: modulr.f90:12
complex(8), dimension(:,:,:), allocatable ylmgq
Definition: modulr.f90:42
real(8), dimension(:,:,:), allocatable vgqc
Definition: modulr.f90:34
real(8), dimension(:,:,:), pointer, contiguous rhormt
Definition: modulr.f90:53
real(8), dimension(:,:), pointer, contiguous rhorir
Definition: modulr.f90:53
complex(8), dimension(:,:,:,:), pointer, contiguous bsqmt
Definition: modulr.f90:85
real(8), dimension(:,:), allocatable gqc
Definition: modulr.f90:36
real(8), dimension(:,:), allocatable vrcu
Definition: modulr.f90:26
complex(8), dimension(:,:,:), allocatable bfcmtq
Definition: modulr.f90:73
logical trdbfcr
Definition: modulr.f90:69
complex(8), dimension(:,:,:), allocatable rhoqmt
Definition: modulr.f90:60
real(8), dimension(:,:,:), pointer, contiguous magrir
Definition: modulr.f90:54
real(8), dimension(:,:,:), allocatable mommtru
Definition: modulr.f90:58
complex(8), dimension(:,:), allocatable bfcq
Definition: modulr.f90:71
real(8), dimension(:,:), allocatable gclgq
Definition: modulr.f90:38
real(8) omegabzu
Definition: modulr.f90:16
integer, dimension(2, 3) intkpa
Definition: modulr.f90:22
Definition: modulr.f90:6
integer nkpa
Definition: modulr.f90:24
complex(8), dimension(:), allocatable, target vsbsq
Definition: modulr.f90:83
real(8), dimension(:,:), allocatable evalu
Definition: modulr.f90:97
complex(8), dimension(:,:,:), allocatable expqmt
Definition: modulr.f90:46
logical trdvclr
Definition: modulr.f90:64
real(8), dimension(:,:), allocatable momtotru
Definition: modulr.f90:58
logical tplotq0
Definition: modulr.f90:89
logical tbdipu
Definition: modulr.f90:79
complex(8), dimension(:,:), allocatable rhoqir
Definition: modulr.f90:60
real(8) rndbfcu
Definition: modulr.f90:87