The Elk Code
readefm.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 !BOP
7 ! !ROUTINE: readefm
8 ! !INTERFACE:
9 subroutine readefm
10 ! !USES:
11 use modmain
12 ! !DESCRIPTION:
13 ! Reads the Fermi energy from the file {\tt EFERMI.OUT}.
14 !
15 ! !REVISION HISTORY:
16 ! Created March 2005 (JKD)
17 !EOP
18 !BOC
19 implicit none
20 ! local variables
21 integer ios
22 open(50,file='EFERMI'//trim(filext),form='FORMATTED',action='READ', &
23  status='OLD',iostat=ios)
24 if (ios /= 0) then
25  write(*,*)
26  write(*,'("Error(readefm): error opening ",A)') 'EFERMI'//trim(filext)
27  write(*,*)
28  stop
29 end if
30 read(50,*,iostat=ios) efermi
31 if (ios /= 0) then
32  write(*,*)
33  write(*,'("Error(readefm): error reading Fermi energy from EFERMI.OUT")')
34  write(*,*)
35  stop
36 end if
37 close(50)
38 end subroutine
39 !EOC
40 
real(8) efermi
Definition: modmain.f90:907
character(256) filext
Definition: modmain.f90:1301
subroutine readefm
Definition: readefm.f90:10