Skip to content

Commit

Permalink
fixed a bug in icbm
Browse files Browse the repository at this point in the history
  • Loading branch information
xh125 committed Sep 28, 2021
1 parent 78f6fca commit 25ffdd9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src_complex/readepw.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1084,15 +1084,15 @@ 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
WRITE(stdout, '(5x," ivbm(valence band max) = ",i6)' ) icbm-1
!WRITE(stdout, '(/5x," icbm(conductor band mim) = ",i6)' ) icbm
!WRITE(stdout, '(5x," ivbm(valence band max) = ",i6)' ) icbm-1


!
Expand Down Expand Up @@ -1322,7 +1322,8 @@ subroutine readepwout(fepwout)
ecbmin = Minval(etf(ncbmin,:))
WRITE(stdout,'(/14x,a,i5,2x,a,f9.3,a)') 'Valence band max = ', nvbmax, 'evbmax = ', evbmax , ' eV'
WRITE(stdout,'(14x,a,i5,2x,a,f9.3,a/)') 'Conductor band min = ', ncbmin, 'ecbmin = ', ecbmin , ' eV'
if(icbm /= ncbmin) write(stdout,"(5X,A)") "Warning! The nelec need to be set right."
icbm = ncbmin
!if(icbm /= ncbmin) write(stdout,"(5X,A)") "Warning! The nelec need to be set right."

etf = etf/ryd2eV
evbmax = evbmax/ryd2eV
Expand Down

0 comments on commit 25ffdd9

Please sign in to comment.