transfer_analysis.f90

Go to the documentation of this file.
00001 !
00002 !(default parameters) 
00003 !
00004 !delt=0.01d0          !Greens function delt in eV
00005 !dmna=0.001d0         !Ttrhdrn parameter dmna in eV
00006 !dmnr=0.001d0         !Ttrhdrn parameter dmnr in eV
00007 !delw=2.0d0*delt      !Grid width in eV [dos]
00008 !delw=10.0d0*delt     !Grid width in eV [hist]
00009 !ecut=0.0d0           !Energy cutoff for transfer integral in eV
00010 !rcut=100.0d0         !Distance cutoff for transfer integral in AA
00011 !diff=0.01d0          !Match threshold for two transfer integral in eV 
00012 !elnm=0.0d0           !Total number of electrons in unitcell
00013 !kgrd='nkb1 nkb2 nkb3'!k grid 
00014 !
00015 PROGRAM main 
00016   use m_rd_dat_zvo 
00017   use m_rd_transdef  
00018   use m_truncation 
00019   use m_dos, only: calculate_dos 
00020   use m_eigenstate, only: calculate_eigenstate
00021   use m_hist, only: calculate_hist 
00022   use m_band, only: calculate_banddisp 
00023   use m_frmsf, only: wrt_frmsf 
00024   include "config.h" 
00025   !
00026   !read zvo files in dir-model 
00027   !
00028   call rd_dat_mkkpts 
00029   call rd_dat_hr 
00030   call rd_dat_geom 
00031   call rd_dat_bandkpts 
00032   call rd_dat_ef 
00033   !
00034   !read input from command line 
00035   !
00036   ncount=iargc() 
00037   allocate(real_arg(ncount)); real_arg=0.0d0 
00038   do i=1,ncount-4 
00039    call getarg(i,arg) 
00040    read(arg,*) real_arg(i)  
00041   enddo 
00042   !dos
00043   call getarg(ncount-3,arg)
00044   read(arg,*) dos 
00045   !bnd
00046   call getarg(ncount-2,arg)
00047   read(arg,*) bnd
00048   !frm 
00049   call getarg(ncount-1,arg)
00050   read(arg,*) frm 
00051   !his 
00052   call getarg(ncount-0,arg)
00053   read(arg,*) his 
00054   !
00055   !write(6,*) ncount
00056   !write(6,*) real_arg(1)
00057   !write(6,*) real_arg(2)
00058   !write(6,*) real_arg(3)
00059   !write(6,*) real_arg(4)
00060   !write(6,*) real_arg(5)
00061   !write(6,*) real_arg(6)
00062   !write(6,*) real_arg(7)
00063   !write(6,*) real_arg(8)
00064   !
00065   delt=real_arg(1)
00066   elnm=real_arg(2)  
00067   ecut=real_arg(3)  
00068   rcut=real_arg(4)  
00069   diff=real_arg(5)  
00070   !
00071   kgd(1)=nint(real_arg(6)); kgd(2)=nint(real_arg(7)); kgd(3)=nint(real_arg(8)) 
00072   !
00073   delt=delt/au !au <- eV
00074   electron_number=elnm 
00075   threshold_e=ecut/au !au <- eV
00076   threshold_r=rcut !AA 
00077   diff_transfers=diff/au !au <- eV  
00078   !
00079   write(6,*) 
00080   write(6,'(a50)')'##### TRANSFER ANALYSIS #####'
00081   write(6,*) 
00082   write(6,'(a50,x,f10.5)')'Greens function delt (eV):',delt*au
00083   write(6,'(a50,x,f10.5)')'Grid spacing delw (eV) [dos]:',2.0d0*delt*au
00084   write(6,'(a50,x,f10.5)')'Grid spacing delw (eV) [hist]:',10.0d0*delt*au
00085   write(6,'(a50,x,f10.5)')'Electron numbers in unit cell:',electron_number  
00086   write(6,'(a50,x,f10.5)')'Energy cutoff for transfer (eV):',threshold_e*au
00087   write(6,'(a50,x,f10.5)')'Distance cutoff for transfer (AA):',threshold_r 
00088   write(6,'(a50,x,f10.5)')'Match threshold for transfers (eV):',diff_transfers*au
00089   write(6,'(a50,x,f10.5)')'FermiEnergy in band calculation (eV):',FermiEnergy_bandcalc*au  
00090   if(kgd(1)==0.and.kgd(2)==0.and.kgd(3)==0)then 
00091       write(6,'(a50,x,3i10 )')'k grid:',nkb1,nkb2,nkb3  
00092   else
00093       write(6,'(a50,x,3i10 )')'k grid:',kgd 
00094   endif  
00095   write(6,*) 
00096   !
00097   !truncate H(R) on threshold 
00098   !
00099   call truncation(NWF,Na1,Na2,Na3,threshold_e,threshold_r,diff_transfers,a1(1),a2(1),a3(1),wcenter_lat(1,1),HR(1,1,-Na1,-Na2,-Na3))
00100   !
00101   if(dos)then 
00102     !
00103     !set kvec
00104     !
00105     if(kgd(1)==0.and.kgd(2)==0.and.kgd(3)==0)then 
00106         kgd(1)=nkb1; kgd(2)=nkb2; kgd(3)=nkb3 
00107     endif 
00108     ncalck=PRODUCT(kgd(1:3))
00109     allocate(kvec(3,ncalck)); kvec=0.0d0 
00110     call set_kgrid(kgd(1),kvec(1,1)) 
00111     write(6,*) 
00112     write(6,'(a7)')'kvec:' 
00113     do i=1,ncalck
00114      write(6,'(3f15.10)') kvec(:,i) 
00115     enddo 
00116     !
00117     !make EKS
00118     !
00119     allocate(EKS(NWF,ncalck)); EKS=0.0d0; allocate(VKS(NWF,NWF,ncalck)); VKS=0.0d0 
00120     flg_weight=0 !Flg whether calculate weighted transfers (0:not calc, 1:calc)
00121     call calculate_eigenstate(NWF,ncalck,Na1,Na2,Na3,nkb1,nkb2,nkb3,flg_weight,a1(1),a2(1),a3(1),kvec(1,1),HR(1,1,-Na1,-Na2,-Na3),EKS(1,1),VKS(1,1,1)) 
00122     !
00123     !make DOS 
00124     !
00125     delw=2.0d0*delt !Grid spacing delw [dos] 
00126     call calculate_dos(NWF,ncalck,kgd(1),kgd(2),kgd(3),electron_number,threshold_e,delt,delw,b1(1),b2(1),b3(1),kvec(1,1),EKS(1,1),VKS(1,1,1))
00127     deallocate(EKS,VKS) 
00128     deallocate(kvec) 
00129     !
00130     write(6,'(a50)')'##### FINISH TRANSFER ANALYSIS (DOS) #####'
00131   endif!dos 
00132   !
00133   if(bnd)then 
00134     !
00135     !set F(R) 
00136     !
00137     if(kgd(1)==0.and.kgd(2)==0.and.kgd(3)==0)then 
00138         kgd(1)=nkb1; kgd(2)=nkb2; kgd(3)=nkb3 
00139     endif 
00140     La1=kgd(1)/2; La2=kgd(2)/2; La3=kgd(3)/2 
00141     allocate(FR(NWF,NWF,-La1:La1,-La2:La2,-La3:La3)); FR(:,:,:,:,:)=0.0d0  
00142     call set_FR(NWF,nkb1,nkb2,nkb3,kgd(1),kgd(2),kgd(3),Na1,Na2,Na3,La1,La2,La3,HR(1,1,-Na1,-Na2,-Na3),FR(1,1,-La1,-La2,-La3)) 
00143     !
00144     !make EKS
00145     !
00146     allocate(EKS(NWF,NSK_BAND_DISP)); EKS=0.0d0; allocate(VKS(NWF,NWF,NSK_BAND_DISP)); VKS=0.0d0 
00147     flg_weight=0 !Flg whether calculate weighted transfers (0:not calc, 1:calc)
00148     call calculate_eigenstate(NWF,NSK_BAND_DISP,La1,La2,La3,kgd(1),kgd(2),kgd(3),flg_weight,a1(1),a2(1),a3(1),SK_BAND_DISP(1,1),FR(1,1,-La1,-La2,-La3),EKS(1,1),VKS(1,1,1)) 
00149     !
00150     !calc band disp
00151     !
00152     call calculate_banddisp(NWF,NSK_BAND_DISP,Ndiv,N_sym_points,threshold_e,b1(1),b2(1),b3(1),SK_BAND_DISP(1,1),EKS(1,1)) 
00153     deallocate(EKS,VKS) 
00154     !
00155     write(6,'(a50)')'##### FINISH TRANSFER ANALYSIS (BND) #####'
00156   endif!bnd 
00157   !
00158   if(frm)then
00159     !
00160     !wrt fermi surface 
00161     !
00162     call wrt_frmsf(NWF,kgd(1),Na1,Na2,Na3,nkb1,nkb2,nkb3,a1(1),a2(1),a3(1),b1(1),b2(1),b3(1),FermiEnergy_bandcalc,HR(1,1,-Na1,-Na2,-Na3)) 
00163     !
00164     write(6,'(a50)')'##### FINISH TRANSFER ANALYSIS (FRM) #####'
00165   endif!frm 
00166   !
00167   if(his)then
00168     write(6,*) 
00169     write(6,'(a50)')'##### TRANSFER ANALYSIS (trans.def) #####'
00170     write(6,*) 
00171     !
00172     !read trans.def 
00173     !
00174     call rd_transdef  
00175     !
00176     !calc histgram
00177     ! 
00178     delw=10.0d0*delt !Grid spacing delw [hist] 
00179     call calculate_hist(Ndim_TR,delw,TR(1,1)) 
00180     !
00181     write(6,'(a50)')'##### FINISH TRANSFER ANALYSIS (HIS) #####'
00182   endif!his
00183   !
00184   stop
00185 end     

Generated on 17 Nov 2020 for respack by  doxygen 1.6.1