The Elk Code
rdmeval.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2007-2008 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
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: rdmeval
8 ! !INTERFACE:
9 subroutine rdmeval
10 ! !USES:
11 use modmain
12 use modrdm
13 ! !DESCRIPTION:
14 ! RDMFT eigenvalues are determined by calculating the derivative of the total
15 ! energy with respect to the occupation number at half the maximum occupancy
16 ! ($n_{\rm max}/2$).
17 !
18 ! !REVISION HISTORY:
19 ! Created 2009 (Sharma)
20 !EOP
21 !BOC
22 implicit none
23 ! local variables
24 integer ik,ist
25 real(8) t1
26 ! allocatable arrays
27 real(8), allocatable :: dedn(:,:)
28 allocate(dedn(nstsv,nkpt))
29 do ik=1,nkpt
30  do ist=1,nstsv
31  t1=occsv(ist,ik)
32  occsv(ist,ik)=occmax/2.d0
33  call rdmdedn(dedn)
34  evalsv(ist,ik)=-dedn(ist,ik)
35  occsv(ist,ik)=t1
36  end do
37  call putevalsv(filext,ik,evalsv(:,ik))
38 end do
39 deallocate(dedn)
40 end subroutine
41 !EOC
42 
character(256) filext
Definition: modmain.f90:1301
real(8), dimension(:,:), allocatable evalsv
Definition: modmain.f90:921
subroutine putevalsv(fext, ik, evalsv_)
Definition: putevalsv.f90:7
integer nkpt
Definition: modmain.f90:461
subroutine rdmdedn(dedn)
Definition: rdmdedn.f90:10
Definition: modrdm.f90:6
integer nstsv
Definition: modmain.f90:889
real(8) occmax
Definition: modmain.f90:901
real(8), dimension(:,:), allocatable occsv
Definition: modmain.f90:905
subroutine rdmeval
Definition: rdmeval.f90:10