1
2! Copyright (C) 2008 F. Bultmark, F. Cricchio and L. Nordstrom.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6module moddftu
7use modmain
8
9!-----------------------------------------------------------!
10!     muffin-tin density and potential matrix variables     !
11!-----------------------------------------------------------!
12! maximum angular momentum for muffin-tin density matrix
13integer, parameter :: lmaxdm=3
14integer, parameter :: lmmaxdm=(lmaxdm+1)**2
15! density matrix in each muffin-tin
16complex(8), allocatable :: dmatmt(:,:,:,:,:)
17! potential matrix in each muffin-tin
18complex(8), allocatable :: vmatmt(:,:,:,:,:)
19! tvmatmt is .true. if the potential matrices are calculated
20logical tvmatmt
21! tvmmt is .true. if the potential matrix for that l and atom is non-zero
22logical, allocatable :: tvmmt(:,:)
23
24!-------------------------!
25!     DFT+U variables     !
26!-------------------------!
27! type of DFT+U to use (0 = none)
28integer dftu
29! input type for DFT+U calculation (1:5)
30integer inpdftu
31! maximum number of DFT+U entries
32integer, parameter :: maxdftu=40
33! number of DFT+U entries
34integer ndftu
35! species and angular momentum for each entry
36integer idftu(2,maxdftu)
37! U and J values for each entry
38real(8) ujdu(2,maxdftu)
39! interpolation constant alpha for each atom and entry [PRB 67, 153106 (2003)]
40real(8), allocatable :: alphadu(:,:)
41! readadu is .true. if alphadu is to be read from file
42logical readadu
43! DFT+U energy for each atom and entry
44real(8), allocatable :: engyadu(:,:)
45! energy from the DFT+U correction
46real(8) engydu
47! Slater parameters
48real(8) fdu(0:2*lmaxdm,maxdftu)
49! Racah parameters
50real(8) edu(0:lmaxdm,maxdftu)
51! screening length of Yukawa potential to calculate Slater integrals
52real(8) lambdadu(maxdftu)
53! energies to calculate radial functions for Slater integrals
54real(8), allocatable :: fdue(:,:)
55! radial functions to calculate Slater integrals
56real(8), allocatable :: fdufr(:,:,:)
57! fixed value of U for which screening length has to be determined
58real(8) udufix(maxdftu)
59! initial values of screening length if U is fixed
60real(8) lambdadu0(maxdftu)
61
62!---------------------------------!
63!     tensor moment variables     !
64!---------------------------------!
65! tmwrite is .true. if tensor moments are written out at every s.c. loop
66logical tmwrite
67! fixed tensor moment type
68!  0      : none
69!  2 (-2) : fixed 2-index tensor moment (or just lowering the symmetry)
70!  3 (-3) : fixed 3-index tensor moment (or just lowering the symmetry)
71integer ftmtype
72! number of fixed tensor moment entries
73integer ntmfix
74! tensor moment indices for each entry: is, ia, l, n and k, p, x, y for the
75! 2-index tensor or k, p, r, t for the 3-index tensor
76integer, allocatable :: itmfix(:,:)
77! tensor component
78complex(8), allocatable :: tmfix(:)
79! spatial and spin rotation matrices of tensor
80real(8), allocatable :: rtmfix(:,:,:,:)
81! density matrices corresponding to the fixed tensor moments
82complex(8), allocatable :: dmftm(:,:,:,:,:)
83! fixed tensor moment potential matrix
84complex(8), allocatable :: vmftm(:,:,:,:,:)
85! fixed tensor moment step size
86real(8) tauftm
87! number of self-consistent loops after which FTM field is updated
88integer ftmstep
89
90end module
91
92