4
1
mirror of https://github.com/pfloos/quack synced 2024-06-16 10:15:29 +02:00

make UKS easier

This commit is contained in:
Pierre-Francois Loos 2021-02-15 22:31:41 +01:00
parent ba7a2349af
commit 6e82622670
3 changed files with 32 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# Restricted or unrestricted KS calculation
eDFT-UKS
UKS
# exchange rung:
# Hartree = 0: H
# LDA = 1: S51,CC-S51

View File

@ -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)

View File

@ -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