diff --git a/input/dft b/input/dft index d296083..3d705c5 100644 --- a/input/dft +++ b/input/dft @@ -1,5 +1,5 @@ # Restricted or unrestricted KS calculation - eDFT-UKS + UKS # exchange rung: # Hartree = 0: H # LDA = 1: S51,CC-S51 diff --git a/input/methods b/input/methods index 33cd61e..796ea7b 100644 --- a/input/methods +++ b/input/methods @@ -1,5 +1,5 @@ # RHF UHF KS MOM - F T F F + F F T F # MP2* MP3 MP2-F12 F F F # CCD DCD CCSD CCSD(T) diff --git a/src/eDFT/eDFT.f90 b/src/eDFT/eDFT.f90 index bbfbed6..387e44a 100644 --- a/src/eDFT/eDFT.f90 +++ b/src/eDFT/eDFT.f90 @@ -79,6 +79,7 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n integer :: Cx_choice integer :: i,vmajor,vminor,vmicro + integer :: iBas,iEns,ispin ! Output variables @@ -208,7 +209,35 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n ! end if !------------------------------------------------------------------------ -! Compute N-centered UKS energy +! Compute UKS energy +!------------------------------------------------------------------------ + + if(method == 'UKS') then + + ! Reset occupation numbers for conventional UKS calculation + + occnum(:,:,:) = 0d0 + do ispin=1,nspin + do iBas=1,nO(ispin) + do iEns=1,nEns + occnum(iBas,ispin,iEns) = 1d0 + end do + end do + end do + + call cpu_time(start_KS) + call eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight(:),maxSCF,thresh,max_diis,guess_type,mix, & + nBas,AO,dAO,S,T,V,Hc,ERI,X,ENuc,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS,Vxc) + call cpu_time(end_KS) + + t_KS = end_KS - start_KS + write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for UKS = ',t_KS,' seconds' + write(*,*) + + end if + +!------------------------------------------------------------------------ +! Compute UKS energy for ensembles !------------------------------------------------------------------------ if(method == 'eDFT-UKS') then