00001 subroutine wrt_optical_property(ngrd,grd,func)
00002 implicit none
00003 integer,intent(in)::ngrd
00004 complex(8),intent(in)::grd(ngrd)
00005 complex(8),intent(in)::func(ngrd,3)
00006 integer::ix,ie
00007 real(8)::x,y,r
00008 complex(8)::zsqrt
00009 complex(8)::z
00010 integer::file_num
00011 character(99)::filename
00012 real(8),parameter::au=27.21151D0
00013 real(8),parameter::pi=dacos(-1.0d0)
00014 real(8),parameter::tpi=2.0d0*pi
00015 real(8),parameter::unit_for_optical_conductivity=11.12650d0/2.41004d0
00016 real(8),parameter::unit_for_optical_conductivity_secinv=41.341379d0
00017 integer,parameter::file_num_eels=9000
00018 integer,parameter::file_num_optical=9100
00019 integer,parameter::file_num_reflectivity=9200
00020 integer,parameter::file_num_macroscopic_epsilon=9300
00021
00022
00023
00024 do ix=1,3
00025 file_num=file_num_eels+ix
00026
00027
00028 if(ix==1)write(filename,"('dat.eels-x')")
00029 if(ix==2)write(filename,"('dat.eels-y')")
00030 if(ix==3)write(filename,"('dat.eels-z')")
00031 OPEN(file_num,FILE=filename)
00032 REWIND(file_num)
00033 write(file_num,'(a)')'#EELS'
00034 write(file_num,'(a)')'#1:omega[eV], 2:-Im(eps-1)'
00035 do ie=1,ngrd
00036 x=dble(func(ie,ix))
00037 y=imag(func(ie,ix))
00038
00039 write(file_num,'(2f15.8)') dble(grd(ie))*au,-y
00040 enddo
00041 enddo
00042
00043
00044
00045 do ix=1,3
00046 file_num=file_num_optical+ix
00047
00048
00049 if(ix==1)write(filename,"('dat.optical_conductivity-x')")
00050 if(ix==2)write(filename,"('dat.optical_conductivity-y')")
00051 if(ix==3)write(filename,"('dat.optical_conductivity-z')")
00052 OPEN(file_num,FILE=filename)
00053 REWIND(file_num)
00054 write(file_num,'(a)')'#Optical conductivity (sgm)'
00055 write(file_num,'(a)')'#1:omega[eV], 2:Re(sgm)[10^6/Ohm/m], 3:Im(sgm)[10^6/Ohm/m], 4: Re(sgm)[10^15/s], 5: Im(sgm)[10^15/s]'
00056 do ie=1,ngrd
00057
00058
00059
00060
00061
00062
00063 z=func(ie,ix)
00064
00065
00066
00067 write(file_num,'(f15.8,4f22.8)') dble(grd(ie))*au,&
00068 dble(grd(ie))/(2.0d0*tpi)*dble(1.0d0/z)*unit_for_optical_conductivity,&
00069 dble(grd(ie))/(2.0d0*tpi)*imag(1.0d0/z)*unit_for_optical_conductivity,&
00070
00071
00072
00073 dble(grd(ie))/(2.0d0*tpi)*dble(1.0d0/z)*unit_for_optical_conductivity_secinv,&
00074 dble(grd(ie))/(2.0d0*tpi)*imag(1.0d0/z)*unit_for_optical_conductivity_secinv
00075
00076 enddo
00077 enddo
00078
00079
00080
00081 do ix=1,3
00082 file_num=file_num_reflectivity+ix
00083
00084
00085 if(ix==1)write(filename,"('dat.reflectivity-x')")
00086 if(ix==2)write(filename,"('dat.reflectivity-y')")
00087 if(ix==3)write(filename,"('dat.reflectivity-z')")
00088 OPEN(file_num,FILE=filename)
00089 REWIND(file_num)
00090 write(file_num,'(a)')'#Reflectivity'
00091 write(file_num,'(a)')'#1:omega[eV], 2:Reflectivity'
00092 do ie=1,ngrd
00093 zsqrt=func(ie,ix)**0.5d0
00094 r=(abs((1.0d0-zsqrt)/(1.0d0+zsqrt)))**2
00095 write(file_num,'(2f15.8)') dble(grd(ie))*au,r
00096 enddo
00097 enddo
00098
00099
00100
00101 do ix=1,3
00102 file_num=file_num_macroscopic_epsilon+ix
00103
00104
00105 if(ix==1)write(filename,"('dat.macroscopic_epsilon-x')")
00106 if(ix==2)write(filename,"('dat.macroscopic_epsilon-y')")
00107 if(ix==3)write(filename,"('dat.macroscopic_epsilon-z')")
00108 OPEN(file_num,FILE=filename)
00109 REWIND(file_num)
00110 write(file_num,'(a)')'#Macroscopic dielectric function'
00111 write(file_num,'(a)')'#1:omega[eV], 2:Re(1/eps-1), 3:Im(1/eps-1)'
00112 do ie=1,ngrd
00113
00114
00115
00116
00117
00118
00119 z=func(ie,ix)
00120 write(file_num,'(f15.8,2f22.8)') dble(grd(ie))*au,dble(1.0d0/z),imag(1.0d0/z)
00121
00122 enddo
00123 enddo
00124
00125 return
00126 end