The Elk Code
writeeval.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: writeeval
8 ! !INTERFACE:
9 subroutine writeeval
10 ! !USES:
11 use modmain
12 ! !DESCRIPTION:
13 ! Outputs the second-variational eigenvalues and occupation numbers to the
14 ! file {\tt EIGVAL.OUT}.
15 !
16 ! !REVISION HISTORY:
17 ! Created June 2003 (JKD)
18 !EOP
19 !BOC
20 implicit none
21 ! local variables
22 integer ik,ist,is,ia,ias
23 ! write out the valence eigenvalues
24 open(50,file='EIGVAL'//trim(filext),form='FORMATTED')
25 write(50,'(I6," : nkpt")') nkpt
26 write(50,'(I6," : nstsv")') nstsv
27 do ik=1,nkpt
28  write(50,*)
29  write(50,'(I6,3G18.10," : k-point, vkl")') ik,vkl(:,ik)
30  write(50,'(" (state, eigenvalue and occupancy below)")')
31  do ist=1,nstsv
32  write(50,'(I6,2G18.10)') ist,evalsv(ist,ik),occsv(ist,ik)
33  end do
34  write(50,*)
35 end do
36 close(50)
37 ! write out the core eigenvalues
38 open(50,file='EVALCORE'//trim(filext),form='FORMATTED')
39 do is=1,nspecies
40  do ia=1,natoms(is)
41  ias=idxas(ia,is)
42  write(50,*)
43  write(50,'("Species : ",I4," (",A,"), atom : ",I4)') is,trim(spsymb(is)),ia
44  do ist=1,nstsp(is)
45  if (spcore(ist,is)) then
46  write(50,'(" n = ",I2,", l = ",I2,", k = ",I2," : ",G18.10)') &
47  nsp(ist,is),lsp(ist,is),ksp(ist,is),evalcr(ist,ias)
48  end if
49  end do
50  end do
51 end do
52 close(50)
53 end subroutine
54 !EOC
55 
integer, dimension(maxstsp, maxspecies) ksp
Definition: modmain.f90:125
character(256) filext
Definition: modmain.f90:1301
integer, dimension(maxstsp, maxspecies) lsp
Definition: modmain.f90:123
real(8), dimension(:,:), allocatable evalsv
Definition: modmain.f90:921
integer nkpt
Definition: modmain.f90:461
integer, dimension(maxatoms, maxspecies) idxas
Definition: modmain.f90:42
real(8), dimension(:,:), allocatable evalcr
Definition: modmain.f90:937
logical, dimension(maxstsp, maxspecies) spcore
Definition: modmain.f90:127
integer nstsv
Definition: modmain.f90:889
real(8), dimension(:,:), allocatable occsv
Definition: modmain.f90:905
real(8), dimension(:,:), allocatable vkl
Definition: modmain.f90:471
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer, dimension(maxstsp, maxspecies) nsp
Definition: modmain.f90:121
integer nspecies
Definition: modmain.f90:34
integer, dimension(maxspecies) nstsp
Definition: modmain.f90:113
subroutine writeeval
Definition: writeeval.f90:10
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78