From 831f38f4e2fa20e2493542a4efcc2b23705c0faa Mon Sep 17 00:00:00 2001 From: xh125 Date: Wed, 6 Oct 2021 23:39:39 +0800 Subject: [PATCH] use subspace to do namd --- src_complex/readepw.f90 | 17 +++++++---------- src_complex/write_sh_information.f90 | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src_complex/readepw.f90 b/src_complex/readepw.f90 index 4a5f041..895f9ca 100644 --- a/src_complex/readepw.f90 +++ b/src_complex/readepw.f90 @@ -126,7 +126,7 @@ subroutine readepwout(fepwout) !logical :: eig_read,epbread,epbwrite,efermi_read LOGICAL :: already_skipped !! Skipping band during the Wannierization - integer :: nbndskip + integer :: nbndskip = 0 logical :: wannierize integer :: itmp,count_piv_spin @@ -981,14 +981,11 @@ subroutine readepwout(fepwout) ef = ef /ryd2ev WRITE(stdout,'(/5x,a,f10.6,a)') 'Fermi energy coarse grid = ', ef * ryd2ev, ' eV' - !if(nelec == 0.0 .and. ieband_max==0 .and. ihband_min==0) then - ! write(stdout,"(5X,A,F8.4,A)") "WARNING! The nelec =",nelec,"and ieband_max=0 ihband_min=0" - ! write(stdout,"(5X,A)") "Need to set nelec right in LVCSH.in .OR. set lreadscfout= .true." - !endif !IF (efermi_read) THEN read(unitepwout,"(/5X,A)") ctmp read(unitepwout,"(/5X,A)") ctmp + write(stdout,"(/5X,A)") ctmp if(ctmp(1:47)=="Fermi energy is read from the input file: Ef = ") then efermi_read = .true. backspace(unitepwout) @@ -1084,11 +1081,11 @@ subroutine readepwout(fepwout) read(unitepwout,"(5X,28X,f9.5,14X,i6)") scissor,icbm scissor = scissor/ryd2eV else - !IF (noncolin) THEN - ! icbm = FLOOR(nelec / 1.0d0) + 1 - !ELSE - ! icbm = FLOOR(nelec / 2.0d0) + 1 - !ENDIF + IF (noncolin) THEN + icbm = FLOOR(nelec / 1.0d0) + 1 + ELSE + icbm = FLOOR(nelec / 2.0d0) + 1 + ENDIF endif !WRITE(stdout, '(/5x," icbm(conductor band mim) = ",i6)' ) icbm diff --git a/src_complex/write_sh_information.f90 b/src_complex/write_sh_information.f90 index 78f0f74..0b5cc9f 100644 --- a/src_complex/write_sh_information.f90 +++ b/src_complex/write_sh_information.f90 @@ -63,7 +63,7 @@ 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 @@ -71,7 +71,7 @@ subroutine write_initial_information(iaver,nmodes,nqtotf,wf,phQ,phP) 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