The Elk Code
 
Loading...
Searching...
No Matches
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
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
17! original number of k-points
18integer nkpt0
19! κ-point grid sizes
20integer ngridkpa(3)
21! integer grid intervals for the κ-points
22integer intkpa(2,3)
23! number of κ-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! R-dependent density and magnetisation
52real(8), allocatable :: rhormt(:,:,:),rhorir(:,:)
53real(8), allocatable :: magrmt(:,:,:,:),magrir(:,:,:)
54! muffin-tin charges each R-vector
55real(8), allocatable :: chgmtru(:,:)
56! muffin-tin, interstitial and total moments for each R-vector
57real(8), allocatable :: mommtru(:,:,:),momirru(:,:),momtotru(:,:)
58! Q-dependent density and magnetisation
59complex(8), allocatable :: rhoqmt(:,:,:),rhoqir(:,:)
60complex(8), allocatable :: magqmt(:,:,:,:),magqir(:,:,:)
61! trdvclr is .true. if the real-space external Coulomb potential should be read
62! in from file
63logical trdvclr
64! Q-dependent external Coulomb potential (FFT ordering)
65complex(8), allocatable :: vclq(:)
66! trdbfcr is .true. if the real-space external magnetic field in Cartesian
67! coordinates should be read in from file
68logical trdbfcr
69! Q-dependent external magnetic field
70complex(8), allocatable :: bfcq(:,:)
71! Q-dependent external muffin-tin magnetic fields
72complex(8), allocatable :: bfcmtq(:,:,:)
73! global external magnetic field in Cartesian coordinates
74real(8) bfieldcu(3)
75! electric field vector in Cartesian coordinates
76real(8) efieldcu(3)
77! if tbdipu is .true. then the spin dipole-dipole interaction is included
78logical tbdipu
79! Q-dependent magnetic dipole field
80complex(8), allocatable :: bdipq(:,:)
81! Q-dependent Kohn-Sham potential and magnetic field
82complex(8), allocatable, target :: vsbsq(:)
83complex(8), pointer, contiguous :: vsqmt(:,:,:),vsqir(:,:)
84complex(8), pointer, contiguous :: bsqmt(:,:,:,:),bsqir(:,:,:)
85! random amplitude used for initialising the long-range magnetic field
86real(8) rndbfcu
87! if tplotq0 is .true. then the Q=0 term is included when generating plots
88logical tplotq0
89
90!----------------------------------------------!
91! eigenvalue and eigenvector variables !
92!----------------------------------------------!
93! number of ultra long-range states
94integer nstulr
95! long-range eigenvalues
96real(8), allocatable :: evalu(:,:)
97! long-range occupation numbers
98real(8), allocatable :: occulr(:,:)
99
100end module
101
complex(8), dimension(:), allocatable vclq
Definition modulr.f90:65
complex(8), dimension(:,:,:), allocatable expqmt
Definition modulr.f90:46
logical tbdipu
Definition modulr.f90:78
complex(8), dimension(:,:,:,:), pointer, contiguous bsqmt
Definition modulr.f90:84
complex(8), dimension(:,:), allocatable bfcq
Definition modulr.f90:70
integer nstulr
Definition modulr.f90:94
real(8), dimension(:,:,:), allocatable rhormt
Definition modulr.f90:52
real(8) q0cut
Definition modulr.f90:32
real(8), dimension(:,:,:,:), allocatable magrmt
Definition modulr.f90:53
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
Definition modulr.f90:83
integer nkpa
Definition modulr.f90:24
real(8) omegau
Definition modulr.f90:16
real(8), dimension(:,:), allocatable evalu
Definition modulr.f90:96
real(8), dimension(:,:), allocatable vrcu
Definition modulr.f90:26
complex(8), dimension(:,:,:), allocatable magqir
Definition modulr.f90:60
real(8), dimension(:,:), allocatable occulr
Definition modulr.f90:98
complex(8), dimension(:,:,:), allocatable rhoqmt
Definition modulr.f90:59
real(8), dimension(3) bfieldcu
Definition modulr.f90:74
real(8), dimension(3, 3) bvecu
Definition modulr.f90:14
integer, dimension(3) ngridkpa
Definition modulr.f90:20
real(8), dimension(:,:), allocatable chgmtru
Definition modulr.f90:55
real(8), dimension(:,:), allocatable momirru
Definition modulr.f90:57
logical trdbfcr
Definition modulr.f90:68
complex(8), dimension(:), allocatable, target vsbsq
Definition modulr.f90:82
real(8) rndbfcu
Definition modulr.f90:86
real(8), dimension(3, 3) avecu
Definition modulr.f90:12
real(8), dimension(:,:,:,:), allocatable jlgqrmt
Definition modulr.f90:40
real(8), dimension(:,:), allocatable gqc
Definition modulr.f90:36
complex(8), dimension(:,:,:), pointer, contiguous bsqir
Definition modulr.f90:84
complex(8), dimension(:,:), allocatable bdipq
Definition modulr.f90:80
real(8), dimension(:,:,:), allocatable magrir
Definition modulr.f90:53
real(8), dimension(:,:), allocatable momtotru
Definition modulr.f90:57
complex(8), dimension(:,:), pointer, contiguous vsqir
Definition modulr.f90:83
real(8), dimension(:,:), allocatable rhorir
Definition modulr.f90:52
real(8), dimension(:,:,:), allocatable vgqc
Definition modulr.f90:34
real(8), dimension(:,:,:), allocatable mommtru
Definition modulr.f90:57
integer, dimension(2, 3) intkpa
Definition modulr.f90:22
logical trdvclr
Definition modulr.f90:63
complex(8), dimension(:,:,:,:), allocatable magqmt
Definition modulr.f90:60
complex(8), dimension(:,:,:), allocatable ylmgq
Definition modulr.f90:42
complex(8), dimension(:,:,:), allocatable sfacgq
Definition modulr.f90:44
real(8), dimension(:,:), allocatable gclgq
Definition modulr.f90:38
complex(8), dimension(:,:), allocatable rhoqir
Definition modulr.f90:59
real(8) omegabzu
Definition modulr.f90:16
real(8), dimension(3) efieldcu
Definition modulr.f90:76
integer nkpt0
Definition modulr.f90:18
complex(8), dimension(:,:,:), allocatable bfcmtq
Definition modulr.f90:72
logical tplotq0
Definition modulr.f90:88