Skip to content

Commit

Permalink
delete some not used section
Browse files Browse the repository at this point in the history
  • Loading branch information
xh125 committed Sep 27, 2021
1 parent 6c7933e commit b2f9b5f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
23 changes: 11 additions & 12 deletions src_complex/dynamics.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module dynamics
use kinds,only : dp,dpc
use constants,only : cone,czero
use parameters,only : temp
use epwcom,only : kqmap_sub
use parameters,only: temp
use epwcom,only : kqmap_sub

implicit none

Expand All @@ -27,12 +27,11 @@ subroutine set_gamma(nmodes,nq,gamma,ld_fric,wf,ld_gamma)

end subroutine

subroutine get_dEa_dQ(nmodes,nq,nband,nk,P_nk,gmnvkq,lit_gmnvkq,isurface,dEa_dQ)
subroutine get_dEa_dQ(nmodes,nq,nband,nk,P_nk,gmnvkq,isurface,dEa_dQ)
use elph2,only : iminusq_sub
implicit none
integer,intent(in) :: nmodes,nq,nband,nk
integer,intent(in) :: isurface
real(kind=dp),intent(in) :: lit_gmnvkq
complex(kind=dpc),intent(in) :: P_nk(nband,nk,nband*nk)
complex(kind=dpc),intent(in) :: gmnvkq(nband,nband,nmodes,nk,nq)
complex(kind=dpc),intent(out) :: dEa_dQ(nmodes,nq)
Expand Down Expand Up @@ -138,7 +137,7 @@ subroutine rk4_nuclei(nmodes,nq,dEa_dQ,ld_gamma,wf,xx,vv,tt)
! ref : 1 J. Qiu, X. Bai, and L. Wang, The Journal of Physical Chemistry Letters 9 (2018) 4319.
! ref : "<Phonons Theory and Experiments I Lattice Dynamics and Models of Interatomic Forces by Dr. Peter Brüesch (auth.) (z-lib.org).pdf>."
subroutine derivs_nuclei(nmodes,nq,dEa_dQ,wf,ld_gamma,xx,vv,dx,dv)
use elph2,only : iminusq
use elph2,only : iminusq_sub
implicit none
integer,intent(in) :: nmodes,nq
complex(kind=dpc),intent(in) :: dEa_dQ(nmodes,nq)
Expand Down Expand Up @@ -272,7 +271,7 @@ end subroutine get_dEa2_dQ2
SUBROUTINE ADD_BATH_EFFECT(nmodes,nq,wf,ld_gamma,temp,dEa2_dQ2,TT,l_ph_quantum,XX,VV)
use kinds,only : dp,dpc
use parameters,only : lit_ephonon,eps_acustic
use elph2,only : iminusq
use elph2,only : iminusq_sub
use randoms,only : GAUSSIAN_RANDOM_NUMBER_FAST
use constants,only : KB=>K_B_Ryd,sqrt3,sqrt5,sqrt7,ryd2mev,cone,ci,tpi
implicit none
Expand Down Expand Up @@ -333,16 +332,16 @@ SUBROUTINE ADD_BATH_EFFECT(nmodes,nq,wf,ld_gamma,temp,dEa2_dQ2,TT,l_ph_quantum,X
ENDSUBROUTINE


subroutine pre_md(nmodes,nqtotf,wf,ld_gamma,temp,phQ,phP,l_ph_quantum,pre_dt)
subroutine pre_md(nmodes,nq,wf,ld_gamma,temp,phQ,phP,l_ph_quantum,pre_dt)
use surfacecom,only : dEa_dQ,dEa2_dQ2,pre_nstep
use constants,only : ry_to_fs,ryd2eV
use io,only : stdout
implicit none
integer ,intent(in) :: nmodes,nqtotf
integer ,intent(in) :: nmodes,nq
real(kind=dp),intent(in) :: pre_dt,temp
logical,intent(in) :: l_ph_quantum
real(kind=dp),intent(in) :: wf(nmodes,nqtotf),ld_gamma(nmodes,nqtotf)
complex(kind=dpc),intent(inout) :: phQ(nmodes,nqtotf),phP(nmodes,nqtotf)
real(kind=dp),intent(in) :: wf(nmodes,nq),ld_gamma(nmodes,nq)
complex(kind=dpc),intent(inout) :: phQ(nmodes,nq),phP(nmodes,nq)


integer :: istep
Expand All @@ -352,8 +351,8 @@ subroutine pre_md(nmodes,nqtotf,wf,ld_gamma,temp,phQ,phP,l_ph_quantum,pre_dt)
dEa_dQ = 0.0
dEa2_dQ2 = 0.0
do istep=1,pre_nstep
call rk4_nuclei(nmodes,nqtotf,dEa_dQ,ld_gamma,wf,phQ,phP,pre_dt)
call add_bath_effect(nmodes,nqtotf,wf,ld_gamma,temp,dEa2_dQ2,pre_dt,l_ph_quantum,phQ,phP)
call rk4_nuclei(nmodes,nq,dEa_dQ,ld_gamma,wf,phQ,phP,pre_dt)
call add_bath_effect(nmodes,nq,wf,ld_gamma,temp,dEa2_dQ2,pre_dt,l_ph_quantum,phQ,phP)
enddo

time = pre_nstep*pre_dt*ry_to_fs
Expand Down
16 changes: 8 additions & 8 deletions src_complex/hamiltonian.f90
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module hamiltonian
use kinds,only : dp,dpc
use io, only : msg,io_error,stdout
use io, only : msg,io_error,stdout
use types
use parameters
use elph2, only : nbndfst,nk=>nktotf,epmatq,nq => nqtotf,wf
use elph2, only : nbndfst,epmatq,wf
use modes, only : nmodes
use readepw,only : E_nk
use constants,only : ryd2mev,cone,czero
use surfacecom,only: lelecsh,lholesh,ieband_min,ieband_max,&
ihband_min,ihband_max,nk_sub,nq_sub
ihband_min,ihband_max,nq_sub
use memory_report,only : MB,GB,complex_size, real_size,int_size,ram,print_memory

implicit none
Expand All @@ -27,17 +27,17 @@ module hamiltonian
integer :: ngfre_e,ngfre_h

!平衡位置哈密顿量,电声耦合项,总的H和临时H
real(kind=dp),allocatable :: E_e(:),E0_e(:),E_h(:),E0_h(:)
real(kind=dp),allocatable :: E_e(:),E0_e(:),E_h(:),E0_h(:)
complex(kind=dp),allocatable :: P_e(:,:),P_e_nk(:,:,:),P0_e(:,:),P0_e_nk(:,:,:),&
P_h(:,:),P_h_nk(:,:,:),P0_h(:,:),P0_h_nk(:,:,:)
!哈密顿量的本征值与本征矢
integer :: ierr
contains

subroutine allocate_hamiltonian(lelecsh,lholesh,ieband_min,ieband_max,ihband_min,ihband_max)
subroutine allocate_hamiltonian(lelecsh,lholesh,nk_sub,ieband_min,ieband_max,ihband_min,ihband_max)
implicit none
logical,intent(in) :: lelecsh,lholesh
integer,intent(in) :: ieband_min,ieband_max,ihband_min,ihband_max
integer,intent(in) :: nk_sub,ieband_min,ieband_max,ihband_min,ihband_max
if(lelecsh) then
neband = ieband_max - ieband_min + 1
nefre = neband * nk_sub
Expand Down Expand Up @@ -131,10 +131,10 @@ subroutine allocate_hamiltonian(lelecsh,lholesh,ieband_min,ieband_max,ihband_min

end subroutine allocate_hamiltonian

subroutine set_H0_nk(nk,nk_sub,indexk,nq_sub,indexq,ibandmin,ibandmax,Enk,H0_nk,gmnvkq_eh)
subroutine set_H0_nk(nk_sub,indexk,nq_sub,indexq,ibandmin,ibandmax,Enk,H0_nk,gmnvkq_eh)
use elph2, only : etf_sub,gmnvkq
implicit none
integer , intent(in) :: nk,nk_sub,nq_sub
integer , intent(in) :: nk_sub,nq_sub
integer , intent(in) :: indexk(nk_sub),indexq(nq_sub),ibandmin,ibandmax
real(kind=dp), intent(out) :: Enk(ibandmax-ibandmin+1,nk_sub)
complex(kind=dp), intent(out) :: H0_nk(ibandmax-ibandmin+1,nk_sub,ibandmax-ibandmin+1,nk_sub)
Expand Down
6 changes: 3 additions & 3 deletions src_complex/initialsh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ end subroutine set_subband
subroutine init_eh_KSstat(lelecsh,lholesh,llaser,nkf,init_ik,init_eband,init_hband,e_en,h_en)
use parameters,only : init_ikx,init_iky,init_ikz,init_kx,init_ky,init_kz
use epwcom,only : nkf1,nkf2,nkf3
use readepw,only : etf,icbm,xkf
use surfacecom,only : ieband_min,ieband_max,ihband_min,ihband_max,c_e_nk,c_h_nk,&
use readepw,only : icbm,xkf
use surfacecom,only : ieband_min,ieband_max,ihband_min,ihband_max,&
indexk
use elph2,only : vmef,ibndmin,ibndmax,nbndfst,etf_sub !vmef(3,nbndsub,nbndsub,nkf)
use elph2,only : etf_sub !vmef(3,nbndsub,nbndsub,nkf)
use getwcvk,only: W_cvk !(W_cvk(icbm:ieband_max,ihband_min:ivbm,nkf)
use constants,only :ryd2eV
use io,only : stdout
Expand Down
17 changes: 9 additions & 8 deletions src_complex/lvcsh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,24 @@ program lvcsh
call set_subband(lelecsh,lholesh,ieband_min,ieband_max,ihband_min,ihband_max)
!get ieband_min,ieband_max,ihband_min,ihband_max
call set_subkspace(lelecsh,lholesh,llaser,w_laser,nk_sub)
! get nk_sub and indexk(nk_sub), etf_sub(:,nk_sub)
call set_subqspace(nk_sub,indexk,nqtotf,nq_sub)
! get nq_sub and indexq(nq_sub) wf_sub(nmodes,nq_sub) iminusq_sub(nq_sub) kqmap_sub(nk_sub,nq_sub)



call allocate_hamiltonian(lelecsh,lholesh,ieband_min,ieband_max,ihband_min,ihband_max)
call allocate_hamiltonian(lelecsh,lholesh,nk_sub,ieband_min,ieband_max,ihband_min,ihband_max)

if(lelecsh) then
call set_H0_nk(nktotf,nk_sub,indexk,nq_sub,indexq,ieband_min,ieband_max,Enk_e,H0_e_nk,gmnvkq_e)
!set H0_e_nk and gmnvkq_e
call set_H0_nk(nk_sub,indexk,nq_sub,indexq,ieband_min,ieband_max,Enk_e,H0_e_nk,gmnvkq_e)
!set Enk_e(nband,nk_sub) H0_e_nk and gmnvkq_e
if(nefre_sh == 0 .or. nefre_sh > nefre) nefre_sh = nefre
endif

if(lholesh) then
call set_H0_nk(nktotf,nk_sub,indexk,nq_sub,indexq,ihband_min,ihband_max,Enk_h,H0_h_nk,gmnvkq_h)
call set_H0_nk(nk_sub,indexk,nq_sub,indexq,ihband_min,ihband_max,Enk_h,H0_h_nk,gmnvkq_h)
H0_h_nk = -1.0 * H0_h_nk
gmnvkq_h = -1.0 * gmnvkq_h
!set H0_h_nk and gmnvkq_h
!set Enk_h(nband,nk_sub) H0_h_nk and gmnvkq_h(:::,nk_sub,nq_sub)
if(nhfre_sh == 0 .or. nhfre_sh > nhfre) nhfre_sh = nhfre
endif

Expand Down Expand Up @@ -232,11 +233,11 @@ program lvcsh
!dEa_dQ in time t0
if(l_dEa_dQ) then
if(lelecsh) then
call get_dEa_dQ(nmodes,nq_sub,neband,nk_sub,P0_e_nk,gmnvkq_e,lit_gmnvkq,iesurface,dEa_dQ_e)
call get_dEa_dQ(nmodes,nq_sub,neband,nk_sub,P0_e_nk,gmnvkq_e,iesurface,dEa_dQ_e)
dEa_dQ = dEa_dQ + dEa_dQ_e
endif
if(lholesh) then
call get_dEa_dQ(nmodes,nq_sub,nhband,nk_sub,P0_h_nk,gmnvkq_h,lit_gmnvkq,ihsurface,dEa_dQ_h)
call get_dEa_dQ(nmodes,nq_sub,nhband,nk_sub,P0_h_nk,gmnvkq_h,ihsurface,dEa_dQ_h)
dEa_dQ = dEa_dQ + dEa_dQ_h
endif
endif
Expand Down
3 changes: 2 additions & 1 deletion src_complex/saveinf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module saveinf
use surfacecom,only : dt,nstep,temp,nqv,l_ph_quantum,eps_acustic,indexk,indexq
use io,only : io_file_unit,open_file,close_file,stdout
use constants,only : ry_to_fs,maxlen,RYTOEV,ryd2meV,K_B_Ryd
use elph2,only : wf,xqf,wf_sub
use elph2,only : wf_sub
use parameters,only : outdir
implicit none
integer :: iaver,isnap,ifre,iq,imode,inode,icore
Expand Down Expand Up @@ -505,6 +505,7 @@ end subroutine plot_phU


subroutine plot_ph_temp(nmodes,nq,nsnap,phKsit,phUsit)
use elph2,only : xqf
implicit none
integer , intent(in) :: nmodes,nq,nsnap
real(kind=dp),intent(in) :: phKsit(nmodes,nq,0:nsnap),phUsit(nmodes,nq,0:nsnap)
Expand Down

0 comments on commit b2f9b5f

Please sign in to comment.