File: finddlefe.f90

package info (click to toggle)
elkcode 10.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 10,672 kB
  • sloc: f90: 52,747; perl: 964; makefile: 352; sh: 296; python: 105; ansic: 67
file content (27 lines) | stat: -rw-r--r-- 612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

! Copyright (C) 2025 J. K. Dewhurst and S. Sharma.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine finddlefe
use modmain
implicit none
! arguments
integer ik,ist,n
real(8) e,de
! determine the first energy moment of eigenvalues below the Fermi energy
de=0.d0
n=0
do ik=1,nkpt
  do ist=1,nstsv
    e=evalsv(ist,ik)-efermi
    if ((e <= 0.d0).and.(e > esccut)) then
      de=de+e
      n=n+1
    end if
  end do
end do
! set difference between fixed linearisation and Fermi energies
if (n > 0) dlefe=de/dble(n)
end subroutine