The Elk Code
 
Loading...
Searching...
No Matches
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:
9subroutine writeeval
10! !USES:
11use 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
20implicit none
21! local variables
22integer ik,ist,is,ia,ias
23! write out the valence eigenvalues
24open(50,file='EIGVAL'//trim(filext),form='FORMATTED')
25write(50,'(I6," : nkpt")') nkpt
26write(50,'(I6," : nstsv")') nstsv
27do 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,*)
35end do
36close(50)
37! write out the core eigenvalues
38open(50,file='EVALCORE'//trim(filext),form='FORMATTED')
39do 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
51end do
52close(50)
53end subroutine
54!EOC
55
integer, dimension(maxstsp, maxspecies) lsp
Definition modmain.f90:123
real(8), dimension(:,:), allocatable evalcr
Definition modmain.f90:934
integer, dimension(maxstsp, maxspecies) nsp
Definition modmain.f90:121
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
character(256) filext
Definition modmain.f90:1300
logical, dimension(maxstsp, maxspecies) spcore
Definition modmain.f90:127
integer, dimension(maxatoms, maxspecies) idxas
Definition modmain.f90:42
integer, dimension(maxspecies) nstsp
Definition modmain.f90:113
integer nkpt
Definition modmain.f90:461
character(64), dimension(maxspecies) spsymb
Definition modmain.f90:78
integer nstsv
Definition modmain.f90:886
integer, dimension(maxstsp, maxspecies) ksp
Definition modmain.f90:125
real(8), dimension(:,:), allocatable vkl
Definition modmain.f90:471
integer nspecies
Definition modmain.f90:34
real(8), dimension(:,:), allocatable occsv
Definition modmain.f90:902
real(8), dimension(:,:), allocatable evalsv
Definition modmain.f90:918
subroutine writeeval
Definition writeeval.f90:10