2021-11-29 23:32:49 +01:00
|
|
|
subroutine unrestricted_fock_exchange_individual_energy(nBas,Pw,ERI,Ex)
|
2020-03-31 22:15:45 +02:00
|
|
|
|
2021-11-08 09:55:39 +01:00
|
|
|
! Compute the HF individual energy in the unrestricted formalism
|
2020-03-31 22:15:45 +02:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nBas
|
2020-04-01 22:59:52 +02:00
|
|
|
double precision,intent(in) :: Pw(nBas,nBas)
|
2020-03-31 22:15:45 +02:00
|
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
double precision,allocatable :: Fx(:,:)
|
|
|
|
double precision,external :: trace_matrix
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: Ex
|
|
|
|
|
|
|
|
! Compute HF exchange matrix
|
|
|
|
|
|
|
|
allocate(Fx(nBas,nBas))
|
|
|
|
|
2021-11-08 09:55:39 +01:00
|
|
|
call unrestricted_fock_exchange_potential(nBas,Pw,ERI,Fx)
|
|
|
|
|
2021-11-29 23:32:49 +01:00
|
|
|
Ex = - 0.5d0*trace_matrix(nBas,matmul(Pw,Fx))
|
2020-03-31 22:15:45 +02:00
|
|
|
|
2020-07-06 20:57:27 +02:00
|
|
|
end subroutine unrestricted_fock_exchange_individual_energy
|