-
Notifications
You must be signed in to change notification settings - Fork 2
/
libswntOpt.f90
executable file
·1971 lines (1638 loc) · 66.2 KB
/
libswntOpt.f90
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!*******************************************************************************
!*******************************************************************************
! Project : libswntOpt.f90
!===============================================================================
! Purpose :
! Optical properties of a SWNT, i.e. Opt. Matrix Elements and Opt. Absorption
!-------------------------------------------------------------------------------
! Authors :
! - ART Nugraha (nugraha@flex.phys.tohoku.ac.jp)
! - Daria Satco (dasha.shatco@gmail.com)
! Latest Vers. : 2018.09.30
!-------------------------------------------------------------------------------
! Reference(s) :
! [1] Physical Properties of Carbon Nanotubes
! R. Saito, G. Dresselhaus, M. S. Dresselhaus (ICP, 1998)
! [2] J.-W, Jiang et al, PRB, 73, 235434 (2006)
! [3] J. Jiang et al, PRB, 71, 205420 (2005).
! [4] A. Gruneis, PhD thesis, Tohoku University (2004).
! [5] Lin, M. F., and Kenneth W-K. Shung., PRB, 50, 17744 (1994).
! [6] Sasaki, Ken-ichi, and Yasuhiro Tokura, Physical Review Applied 9.3 034018 (2018).
!-------------------------------------------------------------------------------
! Contents :
! - SUBROUTINE polVector(theta,epol)
! - SUBROUTINE imagDielAlpha(ne,hw,eps2,refrac,alpha)
! - SUBROUTINE tbDipoleMX(n,m,n1,mu1,n2,mu2,rk,cDipole)
! - SUBROUTINE tbDipolZ(n,m,n1,mu1,n2,mu2,rk,zDipole)
! - SUBROUTINE tbDipolZ2(n,m,n1,mu1,n2,mu2,rk,zDipole)
! - SUBROUTINE tbDipolXY(n,m,n1,mu1,n2,mu2,rk,xDipole,yDipole)
! - SUBROUTINE atomDipolZ(n,m,iiatom,jj1,jj2,iatom,j1,j2,zdipole)
! - SUBROUTINE atomDipoleMX(n,m,iiatom,jj1,jj2,iatom,j1,j2,dipole)
! - FUNCTION gx (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
! - FUNCTION gy (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
! - FUNCTION gz (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!! Daria Satco added (autumn 2018) !!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! - SUBROUTINE DielPermittivity(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,ebg,fwhm,ne,hw,eps1,eps2)
! - SUBROUTINE DielPermittivityKrKr(ne,ebg,hw,eps1in,eps2in,eps1out,eps2out)
! - SUBROUTINE EELS(ne,eps1,eps2,eelspec)
! - SUBROUTINE Absorption(ne,eps1,eps2,sigm1,sigm2,absorpt)
! - SUBROUTINE DynConductivity(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,fwhm,ne,hw,sigm1,sigm2)
! - SUBROUTINE DynConductivityInter(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,fwhm,ne,hw,sigm1,sigm2)
! - SUBROUTINE DynConductivityIntra(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,fwhm,ne,hw,sigm1,sigm2)
! - SUBROUTINE Func_test(nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,fwhm,ne,hw,difFermiDist,matrElementSq,diracAvgFunc)
! - SUBROUTINE tbDipolXYOrt(n,m,n1,mu1,n2,mu2,rk,xDipole,yDipole)
! - SUBROUTINE FermiDistributionArray(nhex,nk,Enk,Tempr,Efermi,fnk)
!*******************************************************************************
!*******************************************************************************
SUBROUTINE polVector(theta,epol)
!===============================================================================
! unit polarization vector (dimensionless)
!-------------------------------------------------------------------------------
! Input :
! theta angle between tube axis and electric field (degree)
! Output :
! epol(3) complex unit electric polarization vector (dimensionless)
!-------------------------------------------------------------------------------
IMPLICIT NONE
! input variable
REAL(8), INTENT(in) :: theta
! output variable
REAL(8),INTENT(out) :: epol(3)
! working variable
REAL(8) :: angle
! linear polarization vector
IF (theta == 0.) THEN
epol(1) = 0.D0
epol(2) = 0.D0
epol(3) = 1.D0
ELSE IF (theta == 90.) THEN
epol(1) = 1.D0
epol(2) = 0.D0
epol(3) = 0.D0
ELSE
angle = DBLE(theta) / 57.29577951308233D0
epol(1) = DSIN(angle)
epol(2) = 0.D0
epol(3) = DCOS(angle)
END IF
RETURN
END SUBROUTINE polVector
!*******************************************************************************
!*******************************************************************************
SUBROUTINE imagDielAlpha(ne,hw,eps2,refrac,alpha)
!===============================================================================
! Calculate absorption coefficient (1/cm) from imaginary dielectric function
!-------------------------------------------------------------------------------
! Input :
! ne number of probe photon energies
! hw(ne) array of probe photon energies (eV)
! eps2(ne) imaginary part of dielectric function (none)
! refrac refractive index (dimensionless)
! Output :
! alpha(ne) absorption coefficient (1/cm)
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: ne
REAL(8), INTENT(in) :: hw(ne), eps2(ne)
REAL(8), INTENT(in) :: refrac
! output variable
REAL(8), INTENT(out) :: alpha(ne)
! working variable and parameter
REAL(8), PARAMETER :: hbarc = 1.97D-5 !(eV cm)
INTEGER :: ie
DO ie = 1, ne
alpha(ie) = eps2(ie)*hw(ie) / (refrac*hbarc)
END DO
END SUBROUTINE imagDielAlpha
!*******************************************************************************
!*******************************************************************************
SUBROUTINE DielPermittivity(n,m,nhex,nk,rka,Enk,cDipole,Tempr,Efermi,epol,ebg,fwhm,ne,hw,eps1Part,eps2Part,eps1,eps2)
!===============================================================================
! Compute the real and imaginary parts of the dielectric function as a function
! of probe photon energy
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! nhex number of hexagons
! nk number of k points
! rka array of k points (1/A)
! Enk array of energies (eV)
! cDipole array of complex matrix elements (1/A)
! Tempr lattice temperature (deg K)
! Efermi Fermi level
! epol(3) complex unit electric polarization vector (none)
! ebg background permittivity (dimensionless)
! fwhm fwhm probe linewidth (eV)
! ne number of probe photon energies
! hw(ne) array of probe photon energies (eV)
! Output :
! eps1(ne) real part of dielectric function (none)
! eps2(ne) imaginary part of dielectric function (none)
! eps1Part(2,nhex,2,nhex,ne) real part of dielectric function contribution from particular transition
! eps2Part(2,nhex,2,nhex,ne) imaginary part of dielectric function contribution from particular transition
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: n, m
INTEGER, INTENT(in) :: nhex
INTEGER, INTENT(in) :: nk
REAL(8), INTENT(in) :: rka(nk)
REAL(8), INTENT(in) :: Enk(2,nhex,nk)
COMPLEX(8), INTENT(in) :: cDipole(3,nk,2,nhex,2,-1:1)
REAL(8), INTENT(in) :: Tempr
REAL(8), INTENT(in) :: Efermi
REAL(8), INTENT(in) :: epol(3)
REAL(8), INTENT(in) :: ebg
REAL(8), INTENT(in) :: fwhm
INTEGER, INTENT(in) :: ne
REAL(8), INTENT(in) :: hw(ne)
! output variable
REAL(8), INTENT(out) :: eps1(ne), eps2(ne)
REAL(8), INTENT(out) :: eps1Part(2,nhex,2,nhex,ne), eps2Part(2,nhex,2,nhex,ne)
! working variables and parameter
REAL(8), SAVE :: pre
REAL(8) :: eps0(ne)
REAL(8) :: reint(ne), imagint(ne)
REAL(8) :: fnk(2,nhex,nk)
REAL(8), ALLOCATABLE :: ress(:), imss(:) !(ne)
REAL(8), PARAMETER :: pi = 3.14159265358979D0
REAL(8), PARAMETER :: e2 = 14.4 !(eV-A) e2 = e^2
REAL(8), PARAMETER :: hbarm = 7.62 !(eV-A**2) hbarm = h^2 / m
REAL(8), PARAMETER :: ptol = 1.D-15
INTEGER :: ie
INTEGER :: n1, mu1, n2, mu2
! for calling some functions
REAL(8) :: diameter, tubeDiam, area
!background dielectric constant (dimensionless)
eps0(:) = ebg
! dielectric function prefactor (eV**3 Angstroms**3)
! --------------------------------------------------
! see for the prefactor expression paper:
! Sanders, G. D., et al.
! "Resonant coherent phonon spectroscopy of single-walled carbon nanotubes."
! Physical Review B 79.20 (2009): 205434.
diameter = tubeDiam(n,m) !(Angstroms)
area = pi*(diameter/2.D0)**2 !(Angstroms**2)
pre = 8.D0*pi*e2*hbarm**2/area !(eV**3 Angstroms**3)
! calculate Fremi distributions
CALL FermiDistributionArray(nhex,nk,Enk,Tempr,Efermi,fnk)
! sum over n1, mu1, n2, mu2 and k
IF (ALLOCATED(ress) .EQV. .TRUE.) DEALLOCATE(ress)
IF (ALLOCATED(imss) .EQV. .TRUE.) DEALLOCATE(imss)
ALLOCATE(ress(ne))
ALLOCATE(imss(ne))
ress = 0.D0
imss = 0.D0
DO n1 = 1, 2 ! 1 <-> valence, 2 <-> conduction
DO mu1 = 1, nhex
DO n2 = 1, 2
DO mu2 = 1, nhex
IF (n1 == n2 .AND. mu1 == mu2) CYCLE
CALL RealImagPartIntegral(n1,mu1,n2,mu2,nhex,nk,rka,Enk,fnk,cDipole,epol,fwhm,ne,hw,reint,imagint)
! accumulate dielectric function vs photon energy
DO ie = 1, ne
IF (hw(ie) .le. ptol) THEN
eps1Part(n1,mu1,n2,mu2,ie) = imagint(ie)/1.D-3
eps2Part(n1,mu1,n2,mu2,ie) = reint(ie)/1.D-3
ELSE
eps1Part(n1,mu1,n2,mu2,ie) = imagint(ie)/hw(ie) ! (1/Angstroms**3 1/eV**3)
eps2Part(n1,mu1,n2,mu2,ie) = reint(ie)/hw(ie) ! (1/Angstroms**3 1/eV**3)
END IF
ress(ie) = ress(ie) + eps1Part(n1,mu1,n2,mu2,ie)
imss(ie) = imss(ie) + eps2Part(n1,mu1,n2,mu2,ie)
END DO
END DO
END DO
END DO
END DO
! real and imaginary part of dielectric function (dimensionless)
eps1 = eps0 + pre*ress
eps2 = pre*imss
! contributions to dielectric funtion
eps1Part = pre*eps1Part
eps2Part = pre*eps2Part
DEALLOCATE(ress)
DEALLOCATE(imss)
END SUBROUTINE DielPermittivity
!*******************************************************************************
!*******************************************************************************
SUBROUTINE tbDipoleMX(n,m,n1,mu1,n2,mu2,rk,cDipole)
!===============================================================================
! optical dipole matrix element (1/Angstrom) for (n,m) carbon nanotube
! D = < n1,mu1,rk | gradient | n2,mu2,rk > (1/Angstroms)
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! n1 bra vector electronic state (n=1,2)
! mu1 bra vector electronic state manifold (0...NHexagon-1)
!
! n2 ket vector electronic state (n=1,2)
! mu2 ket vector electronic state manifold (0...NHexagon-1)
!
! rk electronic state k (1/A) (-pi/T < k < pi/T)
! Output :
! cDipole(3) complex dipole matrix element (1/Angstroms)
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: n, m, n1, mu1, n2, mu2
REAL(8), INTENT(in) :: rk
! output variable
COMPLEX(8),INTENT(out) :: cDipole(3)
! working variables
INTEGER :: mmu1, mmu2
REAL(8) :: rkk
COMPLEX(8) :: xDipole, yDipole, zDipole
cDipole = 0.D0
CALL reducedCutLine(n,m,mu1,mmu1)
CALL reducedCutLine(n,m,mu2,mmu2)
rkk = rk
CALL tbDipolXY(n,m,n1,mmu1,n2,mmu2,rkk,xDipole,yDipole)
CALL tbDipolZ (n,m,n1,mmu1,n2,mmu2,rkk,zDipole)
cDipole(1) = xDipole
cDipole(2) = yDipole
cDipole(3) = zDipole
RETURN
END SUBROUTINE tbDipoleMX
!*******************************************************************************
!*******************************************************************************
SUBROUTINE tbDipolZ(n,m,n1,mu1,n2,mu2,rk,zDipole)
!===============================================================================
! this subroutine calls tbDipolZ2
! z component of optical dipole matrix element for (n,m) carbon nanotube
! Dz = < n1,mu1,rk | d/dz | n2,mu2,rk > (1/Angstroms)
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! n1 bra vector electronic state (n=1,2)
! mu1 bra vector electronic state manifold (0...NHexagon-1)
!
! n2 ket vector electronic state (n=1,2)
! mu2 ket vector electronic state manifold (0...NHexagon-1)
!
! rk electronic state k (1/A) (-pi/T < k < pi/T)
! Output :
! zDipole complex dipole matrix element (1/Angstroms)
!===============================================================================
IMPLICIT NONE
REAL(8), PARAMETER :: rktol = .001D0
! input variables
INTEGER, INTENT(in) :: n, m, n1, mu1, n2, mu2
REAL(8), INTENT(in) :: rk
! output variable
COMPLEX(8),INTENT(out) :: zDipole
! working variable
REAL(8) :: rd, rd1, rd2
COMPLEX(8) :: zD1, zD2
! selection rule
IF (mu1 /= mu2) THEN
zDipole = 0.D0
RETURN
END IF
! calculate z component of dipole vector (1/Angstroms)
CALL tbDipolZ2(n,m,n1,mu1,n2,mu2,rk,zDipole)
! fix sign convention relative to neighboring points in k space
CALL tbDipolZ2(n,m,n1,mu1,n2,mu2,rk-rktol,zD1)
CALL tbDipolZ2(n,m,n1,mu1,n2,mu2,rk+rktol,zD2)
rd = REAL(zDipole)
rd1 = REAL(zD1)
rd2 = REAL(zD2)
IF (rd < 0.D0 .AND. rd1 > 0.D0 .AND. rd2 > 0.D0) THEN
zDipole = -zDipole
END IF
IF (rd > 0.D0 .AND. rd1 < 0.D0 .AND. rd2 < 0.D0) THEN
zDipole = -zDipole
END IF
! return zdipole, imaginary part is zero
zDipole = CMPLX(REAL(zDipole), 0.D0)
END SUBROUTINE tbDipolZ
!*******************************************************************************
!*******************************************************************************
SUBROUTINE tbDipolZ2(n,m,n1,mu1,n2,mu2,rk,zDipole)
!===============================================================================
! this is the kernel of tbDipolZ subroutine
! z component of optical dipole matrix element for (n,m) carbon nanotube
! Dz = < n1,mu1,rk | d/dz | n2,mu2,rk > (1/Angstroms)
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! n1 bra vector electronic state (n=1,2)
! mu1 bra vector electronic state manifold (0...NHexagon-1)
!
! n2 ket vector electronic state (n=1,2)
! mu2 ket vector electronic state manifold (0...NHexagon-1)
!
! rk electronic state k (1/A) (-pi/T < k < pi/T)
! Output :
! zDipole complex dipole matrix element (1/Angstroms)
!===============================================================================
IMPLICIT NONE
REAL(8), PARAMETER :: rktol = .0005D0
! input variables
INTEGER, INTENT(in) :: n, m, n1, mu1, n2, mu2
REAL(8), INTENT(in) :: rk
! output variable
COMPLEX(8),INTENT(out) :: zDipole
! working variables
INTEGER, SAVE, DIMENSION(0:4) :: nvecs = (/ 1, 3, 6, 3, 6 /)
COMPLEX(8), SAVE :: ci = (0.D0,1.D0)
REAL(8) :: Ek(2) ! energy band
COMPLEX(8) :: Zk(2,2) ! wf. coeff.
INTEGER :: ier, iatom, jatom, nn, ivec, j1, j2, NNatom
REAL(8) :: rkk, phi, dipole
COMPLEX(8) :: c1, c2
! check input for errors
ier = 0
IF (n1 /= 1 .AND. n1 /= 2) THEN
ier = 1
WRITE (*,*) 'tbDipolZ2 err: invalid n1:', n1
END IF
IF (n2 /= 1 .AND. n2 /= 2) THEN
ier = 1
WRITE (*,*) 'tbDipolZ2 err: invalid n2:', n2
END IF
IF (ier /= 0) STOP
! selection rule
IF (mu1 /= mu2) THEN
zDipole = 0.D0
RETURN
END IF
! electronic pi orbitals (mu1,k)
rkk = rk
IF (ABS(rkk) < rktol) rkk = rktol
CALL etbTubeBand(n,m,mu1,rkk,Ek,Zk)
! compute z component of dipole vector (1/Angstroms)
zDipole = 0.D0
DO iatom = 1, 2
DO nn = 1, 4
DO ivec = 1, nvecs(nn)
CALL NNj1j2(iatom,ivec,nn, j1,j2)
CALL phaseFactor(n,m,j1,j2,rk,mu1,phi)
jatom = NNatom(iatom,nn)
CALL atomDipolZ(n,m,iatom,0,0,jatom,j1,j2,dipole)
c1 = CONJG( Zk(iatom,n1) )
c2 = Zk(jatom,n2) * CDEXP(ci*phi)
zDipole = zDipole + c1*c2*dipole
END DO
END DO
END DO
RETURN
END SUBROUTINE tbDipolZ2
!*******************************************************************************
!*******************************************************************************
SUBROUTINE tbDipolXY(n,m,n1,mu1,n2,mu2,rk,xDipole,yDipole)
!===============================================================================
! xy component of optical dipole matrix element for (n,m) carbon tube
! Dx = < n1,mu1,rk | d/dx | n2,mu2,rk > (1/Angstroms)
! Dy = < n1,mu1,rk | d/dy | n2,mu2,rk > (1/Angstroms)
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! n1 bra vector electronic state (n=1,2)
! mu1 bra vector electronic state manifold (0...NHexagon-1)
!
! n2 ket vector electronic state (n=1,2)
! mu2 ket vector electronic state manifold (0...NHexagon-1)
!
! rk electronic state k (1/A) (-pi/T < k < pi/T)
! Output :
! xDipole x component of dipole matrix element (1/Angstroms)
! yDipole y component of dipole matrix element (1/Angstroms)
!===============================================================================
IMPLICIT NONE
REAL(8), PARAMETER :: rktol = .0005D0
! input variables
INTEGER, INTENT(in) :: n, m, n1, mu1, n2, mu2
REAL(8), INTENT(in) :: rk
! output variables
COMPLEX(8),INTENT(out) :: xDipole, yDipole
! working variables
INTEGER, SAVE, DIMENSION(0:4) :: nvecs = (/ 1, 3, 6, 3, 6 /)
COMPLEX(8), SAVE :: ci = (0.D0,1.D0)
REAL(8), DIMENSION(2) :: Ek1, Ek2 !(2)
COMPLEX(8), DIMENSION(2,2) :: Zk1, Zk2 !(2,2)
COMPLEX(8) :: c1, c2
REAL(8) :: dipole(3)
INTEGER :: nhex, nHexagon, ier, isel, iflip
INTEGER :: mmu1,mmu2,nn1,nn2
INTEGER :: iatom, jatom, nn, ivec, j1, j2, NNatom
REAL(8) :: rkk,phi
! check input for errors
nhex=nHexagon(n,m)
ier=0
IF (n1 /= 1 .AND. n1 /= 2) THEN
ier = 1
WRITE (*,*) 'tbDipolXY err: invalid n1:', n1
END IF
IF (mu1 < 1 .OR. mu1 > nhex) THEN
ier = 1
WRITE (*,*) 'tbDipolXY err: invalid mu1:', mu1
END IF
IF (n2 /= 1 .AND. n2 /= 2) THEN
ier = 1
WRITE (*,*) 'tbDipolXY err: invalid n2:', n2
END IF
IF(mu2 < 1 .OR. mu2 > nhex) THEN
ier = 1
WRITE(*,*) 'tbDipolXY err: invalid mu2:', mu2
END IF
IF (ier /= 0) STOP
! initialize xDipole and yDipole
xDipole = 0.D0
yDipole = 0.D0
! selection rule
! Define states (nn1,mmu1) and (nn2,mmu2) so that mmu2 = mmu1+1
isel = 0
iflip = 0
IF (mu2 == mu1+1) THEN
isel = 1
mmu1 = mu1
mmu2 = mu2
nn1 = n1
nn2 = n2
END IF
IF (mu2 == mu1-1) THEN
isel = 1
iflip = 1 ! exchange bra and ket vectors
mmu1 = mu2
mmu2 = mu1
nn1 = n2
nn2 = n1
END IF
IF (mu1 == nhex .AND. mu2 == 1) THEN
isel = 1
mmu1 = mu1
mmu2 = mu2
nn1 = n1
nn2 = n2
END IF
IF (mu1 == 1 .AND. mu2 == nhex) THEN
isel = 1
iflip = 1 ! exchange bra and ket vectors
mmu1 = mu2
mmu2 = mu1
nn1 = n2
nn2 = n1
END IF
IF (isel /= 1) RETURN
! mmu2 = mmu1+1 case
! electronic pi orbitals (mu1,k) and (mu2,k)
rkk = rk
IF (ABS(rkk) < rktol) rkk = rktol
CALL etbTubeBand(n,m,mmu1,rkk,Ek1,Zk1)
CALL etbTubeBand(n,m,mmu2,rkk,Ek2,Zk2)
! compute x and y components of dipole vector (1/Angstroms)
DO iatom = 1, 2
DO nn = 1, 4
DO ivec = 1, nvecs(nn)
CALL NNj1j2(iatom,ivec,nn,j1,j2)
CALL phaseFactor(n,m,j1,j2,-rkk,-mmu1,phi)
jatom = NNatom(iatom,nn)
CALL atomDipoleMX(n,m,jatom,j1,j2,iatom,0,0,dipole)
c1 = CONJG( Zk1(jatom,nn1) )
c2 = Zk2(iatom,nn2)*CDEXP(ci*phi)
xDipole = xDipole+c1*c2*(dipole(1)-ci*dipole(2))
END DO
END DO
END DO
xDipole = xDipole/2.D0
yDipole = ci*xDipole
! use symmetry relation to reverse the exchange bra and ket vectors
IF (iflip == 1) THEN
xDipole = -CONJG(xDipole)
yDipole = -CONJG(yDipole)
END IF
RETURN
END SUBROUTINE tbDipolXY
!*******************************************************************************
!*******************************************************************************
SUBROUTINE atomDipolZ(n,m,iiatom,jj1,jj2,iatom,j1,j2,zdipole)
!===============================================================================
! z component of dipole vector <r'J'| d/dz |r J> (1/Angstroms)
! between two pi orbitals centered at R_{r'J'} and R_{rJ} on the
! surface of an (n,m) carbon nanotube.
!
! References:
! J. Jiang et al, PRB, 71, 205420 (2005).
! A. Gruneis, PhD thesis, Tohoku University (2004).
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! iiatom first atom in the unit cell (1=A,2=B)
! jj1,jj2 center of first two atom unit cell in a1 a2 basis
! iatom second atom in the unit cell (1=A,2=B)
! j1,j2 center of second two atom unit cell in a1 a2 basis
! output
! zdipole z component of atomic dipole vector (1/Angstroms)
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: n, m, iiatom, jj1, jj2, iatom, j1, j2
! output variable
REAL(8), INTENT(out) :: zdipole
! gaussian expansion parameters for carbon 2p_{pi} orbitals
! Reference: J. Jiang, PRB, 71, 205420 (2005)
REAL(8), DIMENSION(4) :: Im = (/ .050, .413 , 1.061, 1.046 /)
REAL(8), DIMENSION(4) :: a = (/ .1067, .6078, 29.586, 3.338 /)
REAL(8) :: R1(3), R2(3)
INTEGER :: ier, m1, m2
REAL(8) :: R1x, R1y, R1z, R2x, R2y, R2z
REAL(8) :: ss, pre, a1, a2, gz
! check input for errors
ier = 0
IF (iiatom < 1 .OR. iiatom > 2) THEN
ier = 1
WRITE (*,*) 'atomDipolZ err: invalid iiatom:', iiatom
END IF
IF (iatom < 1 .OR. iatom > 2) THEN
ier = 1
WRITE (*,*) 'atomDipolZ err: invalid iatom:', iatom
END IF
IF (ier.NE.0) STOP
! xyz coordinates of first and second atoms (Angstroms)
CALL rxyzJ1J2Vec(n,m, iiatom,jj1,jj2, R1)
CALL rxyzJ1J2Vec(n,m, iatom, j1, j2, R2)
! convert xyz coordinates from Angstroms to Bohr radii
R1 = R1/.5292D0
R2 = R2/.5292D0
R1x = R1(1)
R1y = R1(2)
R1z = R1(3)
R2x = R2(1)
R2y = R2(2)
R2z = R2(3)
! z component of atomic diple vector (1/Bohr radii)
ss = 0.D0
DO m1 = 1,4
DO m2 = 1,4
pre = Im(m1)*Im(m2)
a1 = a(m1)
a2 = a(m2)
ss = ss + pre*gz(R1x,R1y,R1z,R2x,R2y,R2z,a1,a2)
END DO
END DO
zdipole = ss
! convert dipole vector from (1/Bohr radii) to (1/Angstroms)
zdipole = zdipole/.5292D0
END SUBROUTINE atomDipolZ
!*******************************************************************************
!*******************************************************************************
SUBROUTINE atomDipoleMX(n,m,iiatom,jj1,jj2,iatom,j1,j2,dipole)
!===============================================================================
! compute the dipole vector <r'J'| gradient |r J> (1/Angstroms)
! between two pi orbitals centered at R_{r'J'} and R_{rJ} on the
! surface of an (n,m) carbon nanotube.
!
! References:
! J. Jiang et al, PRB, 71, 205420 (2005).
! A. Gruneis, PhD thesis, Tohoku University (2004).
!-------------------------------------------------------------------------------
! Input :
! n,m chiral vector coordinates in (a1,a2)
! iiatom first atom in the unit cell (1=A,2=B)
! jj1,jj2 center of first two atom unit cell in (a1,a2)
! iatom second atom in the unit cell (1=A,2=B)
! j1,j2 center of second two atom unit cell in (a1,a2)
! Output
! dipole(3) atomic dipole vector (1/Angstroms)
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: n, m
INTEGER, INTENT(in) :: iiatom, jj1, jj2, iatom, j1, j2
! output variable
REAL(8), INTENT(out) :: dipole(3)
! gaussian expansion parameters for carbon 2p_{pi} orbitals
! Reference: J. Jiang, PRB, 71, 205420 (2005).
REAL(8), DIMENSION(4) :: Im = (/ .050, .413 , 1.061, 1.046 /)
REAL(8), DIMENSION(4) :: a = (/ .1067, .6078, 29.586, 3.338 /)
REAL(8) :: R1(3), R2(3), ss(3)
INTEGER :: ier, m1, m2
REAL(8) :: gx,gy,gz
REAL(8) :: R1x, R1y, R1z, R2x, R2y, R2z
REAL(8) :: pre,a1,a2
! check input for errors
ier = 0
IF (iiatom.LT.1 .OR. iiatom.GT.2) THEN
ier = 1
WRITE (*,*) 'atomic dipole err: invalid iiatom:', iiatom
END IF
IF (iatom < 1 .OR. iatom > 2) THEN
ier = 1
WRITE (*,*) 'atomic dipole err: invalid iiatom:', iatom
END IF
IF(ier.NE.0) STOP
! xyz coordinates of first and second atoms (Angstroms)
CALL rxyzJ1J2Vec(n,m,iiatom,jj1,jj2, R1)
CALL rxyzJ1J2Vec(n,m, iatom, j1, j2, R2)
! convert xyz coordinates from Angstroms to Bohr radii
R1 = R1/.5292D0
R2 = R2/.5292D0
R1x = R1(1)
R1y = R1(2)
R1z = R1(3)
R2x = R2(1)
R2y = R2(2)
R2z = R2(3)
! atomic diple vector (1/Bohr radii)
ss = 0.D0
DO m1 = 1, 4
DO m2 = 1, 4
pre = Im(m1) * Im(m2)
a1 = a(m1)
a2 = a(m2)
ss(1) = ss(1) + pre*gx(R1x,R1y,R1z,R2x,R2y,R2z,a1,a2)
ss(2) = ss(2) + pre*gy(R1x,R1y,R1z,R2x,R2y,R2z,a1,a2)
ss(3) = ss(3) + pre*gz(R1x,R1y,R1z,R2x,R2y,R2z,a1,a2)
END DO
END DO
dipole = ss
! convert dipole vector from (1/Bohr radii) to (1/Angstroms)
dipole = dipole/.5292D0
END SUBROUTINE atomDipoleMX
!*******************************************************************************
!*******************************************************************************
! Gaussian orbital expansion
!-------------------------------------------------------------------------------
REAL(8) FUNCTION gx (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
!-------------------------------------------------------------------------------
IMPLICIT REAL(8) (c,t)
! maple 11 file: Gvector.mw
t1 = ((cg13) * (cg7))
t5 = ((cg5) * (cg1))
t8 = (cg1 ** 2)
t9 = ((cg11) * (t8))
t10 = (cg7 ** 2)
t11 = ((cg13) * (t10))
t12 = ((t11) * (cg))
t15 = (cg5 ** 2)
t16 = ((cg13) * (t15))
t17 = ((t16) * (cg))
t20 = (cg ** 2)
t22 = ((cg11) * (t20) * (cg))
t25 = (t20 ** 2)
t27 = ((cg13) * (cg5))
t30 = ((cg11) * (cg))
t31 = (t15 ** 2)
t38 = ((t15) * (cg5))
t39 = ((cg13) * (t38))
t42 = ((cg11) * (t20))
t45 = ((cg1) * (cg7))
t53 = ((cg11) * (cg1))
t55 = ((t10) * (cg7) * (cg13))
t60 = ((cg11) * (t8) * (cg1))
t67 = -2 * t1 * cg * cg1 + 2 * t1 * t5 - 4 * t9 * t12 - 4 * t9 *&
& t17 - 6 * t22 * t16 + 2 * cg11 * t25 * t27 - 2 * t30 * t31 * cg13&
& + 2 * cg11 * cg7 * t5 + 2 * t9 * t39 + 6 * t42 * t39 - 2 * t30 * &
&t45 - 2 * t22 * t11 - 2 * t30 * t16 * t10 + 2 * t53 * t55 * cg - 2&
& * t60 * t1 * cg5 + 2 * t60 * t1 * cg
t68 = cg5 * cg11
t69 = t68 * t20
t74 = t27 * t20
t77 = cg * t15 * cg11
t79 = t11 * cg5
t85 = t1 * cg1
t102 = -3 * t69 + cg * t10 * cg11 + 3 * t17 + t12 - 3 * t74 + 3 &
&* t77 + 4 * t9 * t79 - 2 * t53 * t1 * t38 - 6 * t69 * t85 + 2 * t9&
& * t74 - t68 * t8 - cg5 * t8 * cg13 - 2 * t53 * t55 * cg5 + 4 * t4&
&2 * t79 + 6 * t77 * t85 + 2 * t22 * t85
t105 = 1.772453851
t109 = cg11 + cg13
t110 = t109 ** 2
t111 = t110 ** 2
t112 = SQRT((t109))
t116 = SQRT((t20 + t8))
t120 = SQRT((t15 + t10))
t124 = (cg3 ** 2)
t125 = (cg9 ** 2)
t134 = EXP(((2 * cg3 * cg9 - t124 - t20 - t15 - t10 - t125 +&
& 2 * t45 - t8 + 2 * cg * cg5) * cg13 * cg11 / t109))
gx = (t67 + t102) * (cg11) * (cg13) * t105 * 0.31415&
&92654E1 / t112 / (t111) / t116 / t120 * t134
RETURN
END FUNCTION gx
!-------------------------------------------------------------------------------
REAL(8) FUNCTION gy (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
!-------------------------------------------------------------------------------
IMPLICIT REAL(8) (c,t)
! maple 11 file: Gvector.mw
t1 = (cg1 ** 2)
t3 = ((cg11) * (t1) * (cg1))
t4 = (cg5 ** 2)
t5 = ((cg13) * (t4))
t8 = (t1 ** 2)
t10 = ((cg13) * (cg7))
t13 = (cg7 ** 2)
t14 = ((t13) * (cg13))
t17 = ((cg13) * (cg5))
t18 = ((cg7) * cg)
t21 = ((cg13) * cg)
t25 = ((cg11) * (cg1))
t26 = (t13 ** 2)
t30 = (cg * (cg5))
t39 = (cg ** 2)
t40 = ((cg11) * (t39))
t41 = ((t13) * (cg7))
t42 = ((cg13) * (t41))
t46 = ((cg11) * (t39) * cg)
t50 = ((t14) * (cg1))
t53 = ((cg11) * cg)
t55 = ((t4) * (cg5) * (cg13))
t59 = ((t53) * (cg5))
t60 = ((t10) * (t1))
t65 = ((t5) * (cg1))
t68 = -2 * t3 * t5 + 2 * cg11 * t8 * t10 - 6 * t3 * t14 + 2 * t17&
& * t18 - 2 * t21 * cg5 * cg1 - 2 * t25 * t26 * cg13 - 2 * t25 * t30&
& - 2 * t25 * t14 * t4 + 2 * cg11 * cg5 * t18 + 2 * t40 * t42 + 2 &
& * t46 * t17 * cg1 - 4 * t40 * t50 - 2 * t53 * t55 * cg7 - 6 * t59 &
& * t60 + 6 * t59 * t50 - 4 * t40 * t65
t81 = cg11 * t1
t86 = t5 * cg7
t101 = 2 * t3 * t21 * cg5 + 2 * t53 * t55 * cg1 - 3 * t60 - cg11&
& * cg7 * t39 + t65 + 3 * t25 * t13 + 3 * t50 - 3 * t81 * cg7 - t10&
& * t39 + t25 * t4 + 4 * t40 * t86 + 4 * t81 * t86 - 2 * t53 * t17 &
& * t41 + 2 * t40 * t60 + 6 * t81 * t42 - 2 * t46 * t17 * cg7
t104 = 1.772453851
t108 = cg11 + cg13
t109 = t108 ** 2
t110 = t109 ** 2
t111 = SQRT((t108))
t115 = SQRT((t4 + t13))
t119 = SQRT((t39 + t1))
t123 = (cg3 ** 2)
t124 = (cg9 ** 2)
t133 = EXP(((2 * cg3 * cg9 - t123 - t39 - t4 - t13 - t124 + &
&2 * cg1 * cg7 - t1 + 2 * t30) * cg13 * cg11 / t108))
gy = (t68 + t101) * (cg11) * (cg13) * t104 * 0.3141592654E1 &
& / t111 / (t110) / t115 / t119 * t133
RETURN
END FUNCTION gy
!-------------------------------------------------------------------------------
REAL(8) FUNCTION gz (cg, cg1, cg3, cg5, cg7, cg9, cg11, cg13)
!-------------------------------------------------------------------------------
IMPLICIT REAL(8) (c,t)
! maple 11 file: Gvector.mw
t1 = ((cg13) * (cg11))
t2 = (cg5 ** 2)
t9 = (cg7 ** 2)
t14 = (cg ** 2)
t25 = (cg1 ** 2)
t37 = ((cg) * (cg5))
t43 = ((cg1) * (cg7))
t63 = 2 * t1 * cg * t2 * cg5 - cg5 * cg11 * cg + 2 * t1 * cg1 * &
&t9 * cg7 - 2 * t1 * t14 * t9 - 4 * t1 * t14 * t2 + 2 * t1 * t14 * &
&cg1 * cg7 - 2 * t1 * t25 * t2 - 4 * t1 * cg * cg5 * cg1 * cg7 - 4 &
&* t1 * t25 * t9 + 2 * t1 * t37 * t9 - cg11 * cg1 * cg7 + 2 * t1 * &
&t43 * t2 + 2 * t1 * t25 * cg1 * cg7 + 2 * t1 * t25 * cg * cg5 + 2 &
&* t1 * t14 * cg * cg5 - cg1 * cg13 * cg7 - cg * cg13 * cg5
t68 = 1.772453851
t70 = cg11 + cg13
t71 = t70 ** 2
t72 = t71 ** 2
t73 = SQRT((t70))
t78 = SQRT((t14 + t25))
t81 = SQRT((t2 + t9))
t86 = (cg3 ** 2)
t87 = (cg9 ** 2)
t95 = EXP(((2 * cg3 * cg9 - t86 - t14 - t2 - t9 - t87 + 2 * &
&t43 - t25 + 2 * t37) * cg13 * cg11 / t70))
gz = (t63) * (cg13) * (cg11) * (cg3 - cg9) * t68&
& * 0.3141592654E1 / t73 / (t72) / t78 / t81 * t95
RETURN
END FUNCTION gz
!*******************************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Additional subroutines written be Daria Satco (2018)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!*******************************************************************************
SUBROUTINE DielPermittivityKrKr(ne,ebg,hw,eps1in,eps2in,eps1out,eps2out)
!===============================================================================
! Compute the real and imaginary parts of the dielectric function as a function
! of probe photon energy
! according to Kramers-Kronig relations for dielectric function
!-------------------------------------------------------------------------------
! Input :
! ne number of probe photon energies
! ebg background dielectric permittivity
! hw(ne) array of probe photon energies (eV)
! eps1in(ne) real part of dielectric function (none)
! eps2in(ne) imaginary part of dielectric function (none)
! Output :
! eps1out(ne) real part of dielectric function (none)
! eps2out(ne) imaginary part of dielectric function (none)
!===============================================================================
IMPLICIT NONE
! input variables
INTEGER, INTENT(in) :: ne
REAL(8), INTENT(in) :: ebg
REAL(8), INTENT(in) :: hw(ne)
REAL(8), INTENT(in) :: eps1in(ne), eps2in(ne)
! output variable
REAL(8), INTENT(out) :: eps1out(ne), eps2out(ne)
! working variables and parameters
REAL(8), PARAMETER :: pi = 3.14159265358979D0
REAL(8), ALLOCATABLE :: ss1(:), ss2(:)
REAL(8) :: eps0(ne)
INTEGER :: ie, ii
REAL(8) :: dw
! begin subroutine
! background dielectric constant (dimensionless)
eps0(:) = ebg
IF (ALLOCATED(ss1) .EQV. .TRUE.) DEALLOCATE(ss1)
IF (ALLOCATED(ss2) .EQV. .TRUE.) DEALLOCATE(ss2)
ALLOCATE(ss1(ne))
ALLOCATE(ss2(ne))
ss1 = 0.D0
ss2 = 0.D0
! step of integration