4
1
mirror of https://github.com/pfloos/quack synced 2024-10-31 19:23:52 +01:00

individual energies for HF

This commit is contained in:
Pierre-Francois Loos 2020-04-02 09:53:36 +02:00
parent f39341ab82
commit 5a80b38685
2 changed files with 3 additions and 14 deletions

View File

@ -19,6 +19,6 @@
# Number of states in ensemble (nEns)
2
# Ensemble weights: wEns(1),...,wEns(nEns-1)
0.25
0.0
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
32 0.00001 T 5 1 1

View File

@ -13,7 +13,6 @@ subroutine fock_exchange_individual_energy(nBas,Pw,P,ERI,Ex)
! Local variables
integer :: mu,nu,la,si
double precision,allocatable :: Fx(:,:)
double precision,external :: trace_matrix
@ -25,18 +24,8 @@ subroutine fock_exchange_individual_energy(nBas,Pw,P,ERI,Ex)
allocate(Fx(nBas,nBas))
Fx(:,:) = 0d0
call fock_exchange_potential(nBas,P(:,:),ERI(:,:,:,:),Fx(:,:))
do si=1,nBas
do la=1,nBas
do nu=1,nBas
do mu=1,nBas
Fx(mu,nu) = Fx(mu,nu) + P(la,si)*ERI(mu,la,si,nu)
enddo
enddo
enddo
enddo
Ex = -0.25d0*trace_matrix(nBas,matmul(P(:,:),Fx(:,:)))
Ex = 0.5d0*trace_matrix(nBas,matmul(P(:,:),Fx(:,:))) !&
end subroutine fock_exchange_individual_energy