-
Notifications
You must be signed in to change notification settings - Fork 2
/
code_snippets.txt
186 lines (173 loc) · 6.34 KB
/
code_snippets.txt
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
! INTEGER :: mmu
! REAL(8), ALLOCATABLE :: Px2k(:,:), Pz2k(:,:) !(nk,nhex)
! REAL(8), ALLOCATABLE :: eps1kk(:), eps2kk(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: alpha(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: sigm1_intra(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: sigm1_inter(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: sigm2_intra(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: sigm2_inter(:) !(nhw_laser)
! REAL(8), ALLOCATABLE :: eps1Dr(:), eps2Dr(:)
! REAL(8), ALLOCATABLE :: sigm1Dr(:), sigm2Dr(:)
! REAL(8) :: diameter, tubeDiam
! INTEGER :: j, s, k1, k2,
! REAL(8) :: Efstart, Efend, dEf
! INTEGER :: NEf
! Write output for matrix elements square: x and z components
! ------------------------------------------------------------
! x polarization
! IF(INT(laser_theta) .NE. 0) THEN
! WRITE(*,*) '..x polarization'
!
! ALLOCATE(Px2k(nk,nhex))
!
! downward cutting line transitions from mu --> mu-1
! DO mu = 1, nhex
! DO k = 1, nk
! mmu = mu-1
! IF (mmu.LT.1) mmu = nhex
! Px2k(k,mu) = 3.81D0 * CDABS(cDipole(1,k,1,mu,2,mmu))**2
! ! 3.81 = (hbar^2 / (2 m_e)) (eV-A**2)
! END DO
! END DO
!
! OPEN(unit=22,file=TRIM(path)//'tube.Px2k_dn.'//outfile)
! DO k = 1, nk
! WRITE(22,1001) rka(k)/rka(nk),(Px2k(k,mu),mu=1,nhex)
! END DO
! CLOSE(unit=22)
! WRITE(*,*) 'Px2_dn(k) in tube.Px2k_dn.'//outfile
!
! upward cutting line transitions from mu --> mu+1
! DO mu = 1, nhex
! DO k = 1, nk
! mmu = mu+1
! IF (mmu > nhex) mmu=1
! Px2k(k,mu) = 3.81D0 * CDABS(cDipole(1,k,1,mu,2,mmu))**2
! END DO
! END DO
!
! OPEN(unit=22,file=TRIM(path)//'tube.Px2k_up.'//outfile)
! DO k = 1, nk
! WRITE(22,1001) rka(k)/rka(nk),(Px2k(k,mu),mu=1,nhex)
! END DO
! CLOSE(unit=22)
! WRITE(*,*) 'Px2_up(k) in tube.Px2k_up.'//outfile
!
! DEALLOCATE(Px2k)
!
! END IF
!
! z polarization
! WRITE(*,*) '..z polarization'
! ALLOCATE(Pz2k(nk,nhex))
!
! cutting line transitions from mu --> mu
! DO mu = 1, nhex
! DO k = 1, nk
! Pz2k(k,mu) = 3.81D0 * CDABS(cDipole(3,k,1,mu,2,mu))**2
! END DO
! END DO
!
! OPEN(unit=22,file=TRIM(path)//'tube.Pz2k.'//outfile)
! DO k = 1, nk
! WRITE(22,1001) rka(k)/rka(nk),(Pz2k(k,mu),mu=1,nhex)
! END DO
! CLOSE(unit=22)
! WRITE(*,*) 'Pz2(k) in tube.Pz2k.'//outfile
!
! DEALLOCATE(Pz2k)
! DRUDE dielectric permittivity part =======================================
! ALLOCATE(eps1Dr(nhw_laser))
! ALLOCATE(eps2Dr(nhw_laser))
! CALL DielPermittivityDr(n,m,nhex,nk,rka,Enk,Tempr,Efermi,epol,ebg,laser_fwhm,nhw_laser,hw_laser,eps1Dr,eps2Dr)
! DEALLOCATE(eps1Dr)
! DEALLOCATE(eps2Dr)
! DRUDE conductivity part ==================================================
! ALLOCATE(sigm1Dr(nhw_laser))
! ALLOCATE(sigm2Dr(nhw_laser))
! CALL DynConductivityDr(n,m,nhex,nk,rka,Enk,Tempr,Efermi,epol,laser_fwhm,nhw_laser,hw_laser,sigm1Dr,sigm2Dr)
! =========== KRAMERS-KRONIG ===============================================
! ALLOCATE(eps1kk(nhw_laser))
! ALLOCATE(eps2kk(nhw_laser))
! CALL DielPermittivityKrKr(nhw_laser,ebg,hw_laser,eps1,eps2,eps1kk,eps2kk) !Kramers-Kronig
! plot eps1(hw) (Kramers-Kronig) ****************
! OPEN(unit=22,file=TRIM(path)//'tube.eps1kk.'//outfile)
! DO ie = 1, nhw_laser
! WRITE(22,1001) hw_laser(ie),eps1kk(ie)
! ENDDO
! CLOSE(unit=22)
! WRITE(*,*) 'Kramers-Kronig real part of dielectric function in tube.eps1kk.'//outfile
!
! plot eps2(hw) (Kramers-Kronig) ***************
! OPEN(unit=22,file=TRIM(path)//'tube.eps2kk.'//outfile)
! DO ie = 1, nhw_laser
! WRITE(22,1001) hw_laser(ie),eps2kk(ie)
! ENDDO
! CLOSE(unit=22)
! WRITE(*,*) 'Kramers-Kronig imaginary part of dielectric function in tube.eps2kk.'//outfile
! DEALLOCATE(eps1kk)
! DEALLOCATE(eps2kk)
!! =======================================================================
!! ======================= absorption coefficient ========================
!! alpha
!! =======================================================================
! WRITE (*,*) '--------------------------------------------------------'
! ALLOCATE(alpha(nhw_laser))
! CALL imagDielAlpha(nhw_laser,hw_laser,eps2,refrac,alpha)
!
!! plot absorption alpha(hw) ********************
! OPEN(unit=22,file=TRIM(path)//'tube.alpha.'//outfile)
! DO ie = 1,nhw_laser
! WRITE(22,1001) hw_laser(ie),alpha(ie)
! ENDDO
! CLOSE(unit=22)
! WRITE(*,*) 'alpha(hw) in tube.alpha.'//outfile
! DEALLOCATE(alpha)
============= Intra- and interband contributions to conductivity ===============
! imaginary part of intraband conductivity
! =======================================================================
! WRITE (*,*) '--------------------------------------------------------'
! ALLOCATE(sigm1_intra(nhw_laser))
! ALLOCATE(sigm2_intra(nhw_laser))
! ALLOCATE(sigm1_inter(nhw_laser))
! ALLOCATE(sigm2_inter(nhw_laser))
! CALL DynConductivityIntra(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,laser_fwhm,nhw_laser,hw_laser,sigm1_intra,sigm2_intra)
!
! plot sigm2_intra(hw) *******************************
! OPEN(unit=22,file=TRIM(path)//'tube.sigm2_intra.'//outfile)
! DO ie = 1, nhw_laser
! WRITE(22,1001) hw_laser(ie), sigm2_intra(ie)/(e2/h)
! ENDDO
! CLOSE(unit=22)
! WRITE(*,*) 'imaginary part of intraband conductivity in tube.sigm2_intra.'//outfile
!
! imaginary part of interband conductivity
! =======================================================================
! CALL DynConductivityInter(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,laser_fwhm,nhw_laser,hw_laser,sigm1_inter,sigm2_inter)
!
! plot sigm2_inter(hw) *******************************
! OPEN(unit=22,file=TRIM(path)//'tube.sigm2_inter.'//outfile)
! DO ie = 1, nhw_laser
! WRITE(22,1001) hw_laser(ie), sigm2_inter(ie)/(e2/h)
! ENDDO
! CLOSE(unit=22)
! WRITE(*,*) 'imaginary part of interband conductivity in tube.sigm2_inter.'//outfile
! DEALLOCATE(sigm1_intra)
! DEALLOCATE(sigm2_intra)
! DEALLOCATE(sigm1_inter)
! DEALLOCATE(sigm2_inter)
! TEST cycle to find chyralities ==========================================
! OPEN(unit=22,file='tube.chyralities')
!DO m = 0,30
! DO n = m,30
!
! IF ( n == 0 ) CYCLE
! diameter = tubeDiam(n,m)/10 !nm
! IF ( diameter .ge. 0.5D0 .and. diameter .le. 2.D0 ) THEN
! WRITE(22,*) n,m
! END IF
!
! END DO
!END DO
!CLOSE(unit=22)
!WRITE(*,*) 'tube chyralities in tube.chyralities '