The Elk Code
writegwefm.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2025 J. K. Dewhurst and S. Sharma.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine writegwefm
7 use modmain
8 use modgw
9 implicit none
10 ! local variables
11 integer ik
12 ! initialise universal variables
13 call init0
14 call init1
15 call init3
16 ! read Fermi energy from file
17 call readefm
18 ! get the eigenvalues from file
19 do ik=1,nkpt
20  call getevalsv(filext,ik,vkl(:,ik),evalsv(:,ik))
21 end do
22 ! determine the GW Fermi energy
23 call gwefermi
24 ! write the GW Fermi energy to file
25 open(50,file='GWEFERMI.OUT',form='FORMATTED',action='WRITE')
26 write(50,'(G18.10)') efermi
27 close(50)
28 end subroutine
29 
real(8) efermi
Definition: modmain.f90:907
character(256) filext
Definition: modmain.f90:1301
real(8), dimension(:,:), allocatable evalsv
Definition: modmain.f90:921
integer nkpt
Definition: modmain.f90:461
subroutine getevalsv(fext, ikp, vpl, evalsv_)
Definition: getevalsv.f90:7
subroutine readefm
Definition: readefm.f90:10
subroutine init3
Definition: init3.f90:7
subroutine gwefermi
Definition: gwefermi.f90:7
subroutine init1
Definition: init1.f90:10
real(8), dimension(:,:), allocatable vkl
Definition: modmain.f90:471
Definition: modgw.f90:6
subroutine writegwefm
Definition: writegwefm.f90:7
subroutine init0
Definition: init0.f90:10