Skip to content

Commit

Permalink
fixed same bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xh125 committed Oct 11, 2021
1 parent 8684652 commit 77f2678
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions src_complex/initialsh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ subroutine set_subband(lelecsh,lholesh,ieband_min,ieband_max,ihband_min,ihband_m
ieband_max,&
ihband_min,&
ihband_max

if(ieband_min==0 .and. ieband_max==0) then
ieband_min = ncbmin
ieband_max = ibndmax
endif
if(ihband_min==0 .and. ihband_max==0) then
ihband_min = ibndmin
ihband_max = nvbmax
endif

if(lelecsh) then
if(ieband_min==0 .and. ieband_max==0) then
ieband_min = ncbmin
ieband_max = ibndmax
endif

if(ieband_min < ibndmin) then
write(stdout,"(A,I9,1X,A3,1X,I9)") "Error! The parameter: ieband_min need to set between ", ibndmin,"and",ibndmax
stop
Expand All @@ -47,10 +52,6 @@ subroutine set_subband(lelecsh,lholesh,ieband_min,ieband_max,ihband_min,ihband_m
endif

if(lholesh) then
if(ihband_min==0 .and. ihband_max==0) then
ihband_min = ibndmin
ihband_max = nvbmax
endif

if(ihband_min < ibndmin) then
write(stdout,"(A,I9,A3,I9)") "Error! The parameter: ihband_min need to set between ", ibndmin,"and",ibndmax
Expand Down
6 changes: 3 additions & 3 deletions src_complex/write_sh_information.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ subroutine write_initial_information(iaver,nmodes,nqtotf,wf,phQ,phP)
else
write(stdout,"(/,A)") " time(fs) rt(s) hsur&
& E_h(eV) T_ph(eV) U_ph(eV) E_ph(eV) E_tot(eV)"
write(stdout,"(F11.2,F11.2,I5,5(1X,F11.4))") 0.00,0.00,&
write(stdout,"(F9.2,F9.2,I5,5(1X,F11.4))") 0.00,0.00,&
ihsurface,-e_h(ihsurface)*ryd2eV,&
SUM_phK*ryd2eV,SUM_phU*ryd2eV,SUM_phE*ryd2eV,(E_h(ihsurface)+SUM_phE)*ryd2eV
endif
else
if(lelecsh) then
write(stdout,"(/,A)") " time(fs) rt(s) esur&
& E_e(eV) T_ph(eV) U_ph(eV) E_ph(eV) E_tot(eV)"
write(stdout,"(F11.2,F11.2,I5,5(1X,F11.4))") 0.00,0.00,&
write(stdout,"(F9.2,F9.2,I5,5(1X,F11.4))") 0.00,0.00,&
iesurface,e_e(iesurface)*ryd2eV,&
SUM_phK*ryd2eV,SUM_phU*ryd2eV,SUM_phE*ryd2eV,(E_e(iesurface)+SUM_phE)*ryd2eV
else
Expand Down Expand Up @@ -113,7 +113,7 @@ subroutine write_initial_information(iaver,nmodes,nqtotf,wf,phQ,phP)
!do ifre=1,nhfre
csit_h(:,isnap) = csit_h(:,isnap)+REAL(c_h(:)*CONJG(c_h(:)))
wsit_h(:,isnap) = wsit_h(:,isnap)+REAL(w_h(:)*CONJG(w_h(:)))
psit_h(:,isnap) = psit_h(:,isnap)+P_h(:,iesurface)**2
psit_h(:,isnap) = psit_h(:,isnap)+P_h(:,ihsurface)**2
pes_h(1:nhfre,isnap) = pes_h(1:nhfre,isnap)-E_h(1:nhfre)
if(iaver == 1) pes_one_h(1:nhfre,isnap) = -E_h(1:nhfre)
!enddo
Expand Down

0 comments on commit 77f2678

Please sign in to comment.