diff --git a/input/dft b/input/dft index a225eb2..ca731a0 100644 --- a/input/dft +++ b/input/dft @@ -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 diff --git a/src/eDFT/fock_exchange_individual_energy.f90 b/src/eDFT/fock_exchange_individual_energy.f90 index a14ce0a..e1839eb 100644 --- a/src/eDFT/fock_exchange_individual_energy.f90 +++ b/src/eDFT/fock_exchange_individual_energy.f90 @@ -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