Skip to content

Commit

Permalink
Made scissor shift impossible for lowest conduction band <= highest v…
Browse files Browse the repository at this point in the history
…alence band.
  • Loading branch information
nakib committed Nov 3, 2023
1 parent de60668 commit f1a275c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/electron.f90
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ subroutine read_input_and_setup(self, wann, crys, sym, num)
!Computing the shift in energy due to scissor operator
allocate(self%scissor(wann%numwannbands))
self%scissor(:) = 0.0_r64
if (.not. metallic) then
if (.not. metallic .and. self%indlowconduction > self%indhighvalence) then
self%scissor(self%indlowconduction:wann%numwannbands) = scissor
end if

Expand All @@ -278,7 +278,7 @@ subroutine read_input_and_setup(self, wann, crys, sym, num)
if(indhighvalence > 0) then
write(*, "(A, I5)") "Highest valence band index = ", self%indhighvalence
end if
if (scissor .ne. 0.0_r64) then
if (scissor .ne. 0.0_r64 .and. self%indlowconduction > self%indhighvalence) then
write(*, "(A, 1E16.8, A)") "Scissor operator = ", &
self%scissor(self%indlowconduction) , " eV"
end if
Expand Down Expand Up @@ -766,7 +766,8 @@ subroutine calculate_chempot(self, vol, dopingtype, Tlist, conclist, h)
high = self%indhighvalence
end if

if (this_image() == 1 .and. (.not. self%metallic) ) then
if (this_image() == 1 .and. (.not. self%metallic) &
.and. self%indlowconduction > self%indhighvalence) then
write(*, "(A, 1E16.8, A)") 'Maximum energy valence band = ' , &
maxval(self%ens_irred(:,self%indlowconduction-1)) , ' eV'
write(*, "(A, 1E16.8, A)") 'Minimum energy conduction band = ' , &
Expand Down

0 comments on commit f1a275c

Please sign in to comment.