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 
46 !---------------------------------------------------!
47 ! ultra long-range densities and potentials !
48 !---------------------------------------------------!
49 ! R-dependent density and magnetisation
50 real(8), allocatable, target :: rhmgr(:)
51 real(8), pointer, contiguous :: rhormt(:,:,:),rhorir(:,:)
52 real(8), pointer, contiguous :: magrmt(:,:,:,:),magrir(:,:,:)
53 ! muffin-tin charges each R-vector
54 real(8), allocatable :: chgmtru(:,:)
55 ! muffin-tin, interstitial and total moments for each R-vector
56 real(8), allocatable :: mommtru(:,:,:),momirru(:,:),momtotru(:,:)
57 ! Q-dependent density and magnetisation
58 complex(8), allocatable :: rhoqmt(:,:,:),rhoqir(:,:)
59 complex(8), allocatable :: magqmt(:,:,:,:),magqir(:,:,:)
60 ! trdvclr is .true. if the real-space external Coulomb potential should be read
61 ! in from file
62 logical trdvclr
63 ! Q-dependent external Coulomb potential (FFT ordering)
64 complex(8), allocatable :: vclq(:)
65 ! trdbfcr is .true. if the real-space external magnetic field in Cartesian
66 ! coordinates should be read in from file
67 logical trdbfcr
68 ! Q-dependent external magnetic field
69 complex(8), allocatable :: bfcq(:,:)
70 ! Q-dependent external muffin-tin magnetic fields
71 complex(8), allocatable :: bfcmtq(:,:,:)
72 ! global external magnetic field in Cartesian coordinates
73 real(8) bfieldcu(3)
74 ! electric field vector in Cartesian coordinates
75 real(8) efieldcu(3)
76 ! if tbdipu is .true. then the spin dipole-dipole interaction is included
77 logical tbdipu
78 ! Q-dependent magnetic dipole field
79 complex(8), allocatable :: bdipq(:,:)
80 ! Q-dependent Kohn-Sham potential and magnetic field
81 complex(8), allocatable, target :: vsbsq(:)
82 complex(8), pointer, contiguous :: vsqmt(:,:,:),vsqir(:,:)
83 complex(8), pointer, contiguous :: bsqmt(:,:,:,:),bsqir(:,:,:)
84 ! random amplitude used for initialising the long-range magnetic field
85 real(8) rndbfcu
86 ! if tplotq0 is .true. then the Q=0 term is included when generating plots
87 logical tplotq0
88 
89 !----------------------------------------------!
90 ! eigenvalue and eigenvector variables !
91 !----------------------------------------------!
92 ! number of ultra long-range states
93 integer nstulr
94 ! long-range eigenvalues
95 real(8), allocatable :: evalu(:,:)
96 ! long-range occupation numbers
97 real(8), allocatable :: occulr(:,:)
98 
99 end module
100 
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
Definition: modulr.f90:82
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:82
integer nstulr
Definition: modulr.f90:93
complex(8), dimension(:,:), allocatable bdipq
Definition: modulr.f90:79
real(8), dimension(3) efieldcu
Definition: modulr.f90:75
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:59
complex(8), dimension(:,:,:), pointer, contiguous bsqir
Definition: modulr.f90:83
complex(8), dimension(:,:,:), allocatable magqir
Definition: modulr.f90:59
real(8), dimension(:,:), allocatable chgmtru
Definition: modulr.f90:54
real(8), dimension(:,:), allocatable momirru
Definition: modulr.f90:56
complex(8), dimension(:), allocatable vclq
Definition: modulr.f90:64
real(8), dimension(:,:,:,:), pointer, contiguous magrmt
Definition: modulr.f90:52
real(8), dimension(3) bfieldcu
Definition: modulr.f90:73
real(8), dimension(:,:), allocatable occulr
Definition: modulr.f90:97
real(8) q0cut
Definition: modulr.f90:32
real(8), dimension(:), allocatable, target rhmgr
Definition: modulr.f90:50
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:51
real(8), dimension(:,:), pointer, contiguous rhorir
Definition: modulr.f90:51
complex(8), dimension(:,:,:,:), pointer, contiguous bsqmt
Definition: modulr.f90:83
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:71
logical trdbfcr
Definition: modulr.f90:67
complex(8), dimension(:,:,:), allocatable rhoqmt
Definition: modulr.f90:58
real(8), dimension(:,:,:), pointer, contiguous magrir
Definition: modulr.f90:52
real(8), dimension(:,:,:), allocatable mommtru
Definition: modulr.f90:56
complex(8), dimension(:,:), allocatable bfcq
Definition: modulr.f90:69
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:81
real(8), dimension(:,:), allocatable evalu
Definition: modulr.f90:95
logical trdvclr
Definition: modulr.f90:62
real(8), dimension(:,:), allocatable momtotru
Definition: modulr.f90:56
logical tplotq0
Definition: modulr.f90:87
logical tbdipu
Definition: modulr.f90:77
complex(8), dimension(:,:), allocatable rhoqir
Definition: modulr.f90:58
real(8) rndbfcu
Definition: modulr.f90:85