mirror of
https://github.com/pfloos/quack
synced 2024-08-25 05:31:47 +02:00
fix KS
This commit is contained in:
parent
da8c1c691e
commit
722d74ae17
@ -317,8 +317,8 @@ program QuAcK
|
||||
|
||||
call cpu_time(start_KS)
|
||||
call eDFT(maxSCF_HF,thresh_HF,n_diis_HF,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,nEl,nC, &
|
||||
nO,nV,nR,nShell,TotAngMomShell,CenterShell,KShell,DShell,ExpShell, &
|
||||
max_ang_mom,min_exponent,max_exponent,S,T,V,Hc,X,ERI_AO,dipole_int_AO)
|
||||
nO,nV,nR,nShell,TotAngMomShell,CenterShell,KShell,DShell,ExpShell, &
|
||||
max_ang_mom,min_exponent,max_exponent,S,T,V,Hc,X,ERI_AO,dipole_int_AO,EUHF,eHF,cHF,PHF)
|
||||
|
||||
call cpu_time(end_KS)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,nEl,nC,nO,nV,nR, &
|
||||
nShell,TotAngMomShell,CenterShell,KShell,DShell,ExpShell, &
|
||||
max_ang_mom,min_exponent,max_exponent,S,T,V,Hc,X,ERI,dipole_int)
|
||||
max_ang_mom,min_exponent,max_exponent,S,T,V,Hc,X,ERI,dipole_int,Ew,eKS,cKS,PKS)
|
||||
|
||||
! exchange-correlation density-functional theory calculations
|
||||
|
||||
@ -50,7 +50,6 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision :: Ew
|
||||
double precision,allocatable :: c(:,:)
|
||||
|
||||
character(len=8) :: method
|
||||
@ -83,6 +82,14 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
||||
|
||||
integer :: i,vmajor,vminor,vmicro
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: Ew
|
||||
double precision,intent(out) :: eKS(nBas,nspin)
|
||||
double precision,intent(out) :: cKS(nBas,nBas,nspin)
|
||||
double precision,intent(out) :: PKS(nBas,nBas,nspin)
|
||||
|
||||
|
||||
! Hello World
|
||||
|
||||
write(*,*)
|
||||
@ -209,7 +216,7 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
||||
|
||||
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,Ew,occnum,Cx_choice,doNcentered)
|
||||
nBas,AO,dAO,S,T,V,Hc,ERI,X,ENuc,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS)
|
||||
call cpu_time(end_KS)
|
||||
|
||||
t_KS = end_KS - start_KS
|
||||
|
@ -1,5 +1,5 @@
|
||||
subroutine 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,Ew,occnum,Cx_choice,doNcentered)
|
||||
nBas,AO,dAO,S,T,V,Hc,ERI,X,ENuc,occnum,Cx_choice,doNcentered,Ew,eps,c,Pw)
|
||||
|
||||
! Perform unrestricted Kohn-Sham calculation for ensembles
|
||||
|
||||
@ -48,10 +48,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
||||
double precision :: EJ(nsp)
|
||||
double precision :: Ex(nspin)
|
||||
double precision :: Ec(nsp)
|
||||
double precision :: Ew
|
||||
|
||||
double precision,allocatable :: eps(:,:)
|
||||
double precision,allocatable :: c(:,:,:)
|
||||
double precision,allocatable :: cp(:,:,:)
|
||||
double precision,allocatable :: J(:,:,:)
|
||||
double precision,allocatable :: F(:,:,:)
|
||||
@ -65,7 +62,6 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
||||
double precision,external :: trace_matrix
|
||||
double precision,external :: electron_number
|
||||
|
||||
double precision,allocatable :: Pw(:,:,:)
|
||||
double precision,allocatable :: rhow(:,:)
|
||||
double precision,allocatable :: drhow(:,:,:)
|
||||
double precision :: nEl(nspin)
|
||||
@ -79,6 +75,13 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
||||
|
||||
integer :: ispin,iEns,iBas
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: Ew
|
||||
double precision,intent(out) :: eps(nBas,nspin)
|
||||
double precision,intent(out) :: Pw(nBas,nBas,nspin)
|
||||
double precision,intent(out) :: c(nBAs,nBas,nspin)
|
||||
|
||||
! Hello world
|
||||
|
||||
write(*,*)
|
||||
@ -120,16 +123,14 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(eps(nBas,nspin),c(nBas,nBas,nspin),cp(nBas,nBas,nspin), &
|
||||
J(nBas,nBas,nspin),F(nBas,nBas,nspin),Fp(nBas,nBas,nspin), &
|
||||
allocate(cp(nBas,nBas,nspin),J(nBas,nBas,nspin),F(nBas,nBas,nspin),Fp(nBas,nBas,nspin), &
|
||||
Fx(nBas,nBas,nspin),FxHF(nBas,nBas,nspin),Fc(nBas,nBas,nspin),err(nBas,nBas,nspin), &
|
||||
Pw(nBas,nBas,nspin),rhow(nGrid,nspin),drhow(ncart,nGrid,nspin), &
|
||||
err_diis(nBasSq,max_diis,nspin),F_diis(nBasSq,max_diis,nspin), &
|
||||
rhow(nGrid,nspin),drhow(ncart,nGrid,nspin), &
|
||||
err_diis(nBasSq,max_diis,nspin),F_diis(nBasSq,max_diis,nspin), &
|
||||
P(nBas,nBas,nspin,nEns),rho(nGrid,nspin,nEns),drho(ncart,nGrid,nspin,nEns))
|
||||
|
||||
! Guess coefficients and eigenvalues
|
||||
|
||||
|
||||
if(guess_type == 1) then
|
||||
|
||||
do ispin=1,nspin
|
||||
|
@ -43,23 +43,18 @@ subroutine unrestricted_correlation_derivative_discontinuity(rung,DFA,nEns,wEns,
|
||||
case(2)
|
||||
|
||||
call print_warning('!!! derivative discontinuity NYI for GGAs !!!')
|
||||
stop
|
||||
|
||||
! MGGA functionals
|
||||
|
||||
case(3)
|
||||
|
||||
call print_warning('!!! derivative discontinuity NYI for MGGAs !!!')
|
||||
stop
|
||||
|
||||
! Hybrid functionals
|
||||
|
||||
case(4)
|
||||
|
||||
call print_warning('!!! derivative discontinuity NYI for hybrids !!!')
|
||||
stop
|
||||
|
||||
aC = 0.81d0
|
||||
|
||||
end select
|
||||
|
||||
|
@ -48,23 +48,18 @@ subroutine unrestricted_correlation_individual_energy(rung,DFA,LDA_centered,nEns
|
||||
case(2)
|
||||
|
||||
call print_warning('!!! Individual energies NYI for GGAs !!!')
|
||||
stop
|
||||
|
||||
! MGGA functionals
|
||||
|
||||
case(3)
|
||||
|
||||
call print_warning('!!! Individual energies NYI for MGGAs !!!')
|
||||
stop
|
||||
|
||||
! Hybrid functionals
|
||||
|
||||
case(4)
|
||||
|
||||
call print_warning('!!! Individual energies NYI for hybrids !!!')
|
||||
stop
|
||||
|
||||
aC = 0.81d0
|
||||
|
||||
end select
|
||||
|
||||
|
@ -60,7 +60,6 @@ subroutine unrestricted_exchange_derivative_discontinuity(rung,DFA,nEns,wEns,aCC
|
||||
case(4)
|
||||
|
||||
call print_warning('!!! exchange part of derivative discontinuity NYI for hybrids !!!')
|
||||
stop
|
||||
|
||||
end select
|
||||
|
||||
|
@ -78,7 +78,6 @@ subroutine unrestricted_exchange_individual_energy(rung,DFA,LDA_centered,nEns,wE
|
||||
case(4)
|
||||
|
||||
call print_warning('!!! Individual energies NYI for Hybrids !!!')
|
||||
stop
|
||||
|
||||
end select
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user