-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQE6.3_patch_eps_eigocc.patch
161 lines (158 loc) · 5.5 KB
/
QE6.3_patch_eps_eigocc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
--- origin-qe/epsilon.f90 2020-06-19 18:50:41.000000000 +0800
+++ epsilon.f90.mod 2020-06-19 23:48:56.000000000 +0800
@@ -148,6 +148,8 @@
USE io_global, ONLY : stdout, ionode, ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
+ USE iotk_module
+ USE xml_io_base
USE io_files, ONLY : tmp_dir, prefix
USE constants, ONLY : RYTOEV
USE ener, ONLY : ef
@@ -388,6 +390,12 @@
!
! main kpt loop
!
+ OPEN(1,FILE='TDMATRIX.dat')
+ OPEN(2,FILE='Eig_Occ.dat')
+
+601 FORMAT(' ',I6,1X,I6,1X,I6,1X, 3(E25.15,1x,E25.15,3x) )
+602 FORMAT(' ',I6,1X,I6,2X,E25.15,1x,E25.15 )
+
kpt_loop: &
DO ik = 1, nks
!
@@ -400,6 +408,17 @@
!
dipole(:,:,:)= tpiba2 * REAL( dipole_aux(:,:,:) * conjg(dipole_aux(:,:,:)), DP )
+ DO iband2 = nbndmin,nbndmax
+ DO iband1 = nbndmin,nbndmax
+ write (1,601) ik, iband1, iband2, sqrt(tpiba2)*dipole_aux(:,iband1,iband2)
+! write (1,601) ik, iband1, iband2, sqrt(dipole(:,iband1,iband2))
+ ENDDO
+ ENDDO
+ Do iband1 = nbndmin,nbndmax
+ write (2,602) ik, iband1, et(iband1,ik),focc(iband1,ik)
+ ENDDO
+
+
!
! Calculation of real and immaginary parts
! of the macroscopic dielettric function from dipole
@@ -413,6 +432,7 @@
IF ( focc(iband2,ik) < full_occ) THEN
DO iband1 = nbndmin,nbndmax
!
+! write (1,601) ik, iband1, iband2, sqrt(tpiba2)*dipole_aux(:,iband1,iband2)
IF (iband1==iband2) CYCLE
IF ( focc(iband1,ik) >= 0.5d-4*full_occ ) THEN
IF (abs(focc(iband2,ik)-focc(iband1,ik))< 1.0d-3*full_occ) CYCLE
@@ -465,6 +485,8 @@
ENDIF
!
ENDDO kpt_loop
+ close(1)
+ close(2)
!
! recover over kpt parallelization (inter_pool)
@@ -906,6 +928,9 @@
ALLOCATE(epstot( 3,3, nw),STAT=ierr )
IF (ierr/=0) CALL errore('epsilon','allocating epstot', abs(ierr))
+
+ OPEN(3,FILE='Eig_Occ.dat')
+603 FORMAT(' ',I6,1X,I6,2X,E25.15,1x,E25.15 )
!
! initialize response functions
!
@@ -927,6 +952,13 @@
dipoletot(it1,it2,:,:) = tpiba2 * dipole_aux(it1,:,:) * conjg( dipole_aux(it2,:,:) )
ENDDO
ENDDO
+
+ Do iband1 = nbndmin,nbndmax
+ write (3,603) ik, iband1, et(iband1,ik),focc(iband1,ik)
+ ENDDO
+
+
+
!
! Calculation of real and immaginary parts
! of the macroscopic dielettric function from dipole
@@ -1031,15 +1063,15 @@
!
DO iw =1, nw
!
- WRITE(41,"(4f15.6)") wgrid(iw), REAL(epstot(1,1, iw)), aimag(epstot(1,1, iw))
- WRITE(42,"(4f15.6)") wgrid(iw), REAL(epstot(1,2, iw)), aimag(epstot(1,2, iw))
- WRITE(43,"(4f15.6)") wgrid(iw), REAL(epstot(1,3, iw)), aimag(epstot(1,3, iw))
- WRITE(44,"(4f15.6)") wgrid(iw), REAL(epstot(2,1, iw)), aimag(epstot(2,1, iw))
- WRITE(45,"(4f15.6)") wgrid(iw), REAL(epstot(2,2, iw)), aimag(epstot(2,2, iw))
- WRITE(46,"(4f15.6)") wgrid(iw), REAL(epstot(2,3, iw)), aimag(epstot(2,3, iw))
- WRITE(47,"(4f15.6)") wgrid(iw), REAL(epstot(3,1, iw)), aimag(epstot(3,1, iw))
- WRITE(48,"(4f15.6)") wgrid(iw), REAL(epstot(3,2, iw)), aimag(epstot(3,2, iw))
- WRITE(49,"(4f15.6)") wgrid(iw), REAL(epstot(3,3, iw)), aimag(epstot(3,3, iw))
+ WRITE(41,"(4f25.6)") wgrid(iw), REAL(epstot(1,1, iw)), aimag(epstot(1,1, iw))
+ WRITE(42,"(4f25.6)") wgrid(iw), REAL(epstot(1,2, iw)), aimag(epstot(1,2, iw))
+ WRITE(43,"(4f25.6)") wgrid(iw), REAL(epstot(1,3, iw)), aimag(epstot(1,3, iw))
+ WRITE(44,"(4f25.6)") wgrid(iw), REAL(epstot(2,1, iw)), aimag(epstot(2,1, iw))
+ WRITE(45,"(4f25.6)") wgrid(iw), REAL(epstot(2,2, iw)), aimag(epstot(2,2, iw))
+ WRITE(46,"(4f25.6)") wgrid(iw), REAL(epstot(2,3, iw)), aimag(epstot(2,3, iw))
+ WRITE(47,"(4f25.6)") wgrid(iw), REAL(epstot(3,1, iw)), aimag(epstot(3,1, iw))
+ WRITE(48,"(4f25.6)") wgrid(iw), REAL(epstot(3,2, iw)), aimag(epstot(3,2, iw))
+ WRITE(49,"(4f25.6)") wgrid(iw), REAL(epstot(3,3, iw)), aimag(epstot(3,3, iw))
!
ENDDO
!
@@ -1049,7 +1081,7 @@
CLOSE(42)
!
ENDIF
-
+ CLOSE(3)
!
! local cleaning
!
@@ -1100,11 +1132,11 @@
npw = ngk(ik)
!
DO iband2 = nbndmin,nbndmax
- IF ( focc(iband2,ik) < full_occ) THEN
+ ! IF ( focc(iband2,ik) < full_occ) THEN
DO iband1 = nbndmin,nbndmax
!
IF ( iband1==iband2 ) CYCLE
- IF ( focc(iband1,ik) >= 0.5e-4*full_occ ) THEN
+ ! IF ( focc(iband1,ik) >= 0.5e-4*full_occ ) THEN
!
DO ig=1,npw
!
@@ -1119,17 +1151,17 @@
( g(:,igk_k(ig,ik)) ) * caux
!
ENDDO
- ENDIF
+ ! ENDIF
!
ENDDO
- ENDIF
+ ! ENDIF
ENDDO
!
! The diagonal terms are taken into account only if the system is treated like a metal, not
! in the intraband therm. Because of this we can recalculate the diagonal component of the dipole
! tensor directly as we need it for the intraband term, without interference with interband one.
!
- IF (metalcalc) THEN
+ ! IF (metalcalc) THEN
!
DO iband1 = nbndmin,nbndmax
DO ig=1,npw
@@ -1147,7 +1179,7 @@
ENDDO
ENDDO
!
- ENDIF
+ ! ENDIF
!
! recover over G parallelization (intra_bgrp)
!