2 ! Copyright (C) 2007 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.
6 subroutine rdmdedc(ik
,dedc
)
7 ! calculate the derivative of total energy w.r.t. evecsv
11 integer, intent(in
) :: ik
12 complex(8), intent(out
) :: dedc(nstsv
,nstsv
)
16 complex(8), allocatable
:: evecsv(:,:)
17 complex(8), allocatable
:: c(:,:)
18 ! allocate local arrays
19 allocate(evecsv(nstsv
,nstsv
))
20 allocate(c(nstsv
,nstsv
))
21 ! get the eigenvectors from file
22 call getevecsv(vkl(1,ik
),evecsv
)
23 ! kinetic and Coulomb potential contribution
24 call zgemm('N','N',nstsv
,nstsv
,nstsv
,zone
,evecsv
,nstsv
,vclmat(1,1,ik
),nstsv
, &
27 dedc(:,ist
)=occsv(ist
,ik
)*(dkdc(:,ist
,ik
)+c(:,ist
))
29 ! exchange-correlation contribution
30 call rdmdexcdc(ik
,evecsv
,dedc
)