mirror of
https://github.com/pfloos/quack
synced 2025-01-03 01:55:57 +01:00
HF individual energy working
This commit is contained in:
parent
ac5955ab27
commit
388db3ca6e
@ -6,14 +6,14 @@
|
||||
# GGA = 2: B88,G96,PBE
|
||||
# MGGA = 3:
|
||||
# Hybrid = 4: HF,B3LYP,PBE
|
||||
1 S51
|
||||
4 HF
|
||||
# correlation rung:
|
||||
# Hartree = 0: H
|
||||
# LDA = 1: PW92,VWN3,VWN5,eVWN5
|
||||
# GGA = 2: LYP,PBE
|
||||
# MGGA = 3:
|
||||
# Hybrid = 4: HF,B3LYP,PBE
|
||||
1 VWN5
|
||||
4 HF
|
||||
# quadrature grid SG-n
|
||||
0
|
||||
# Number of states in ensemble (nEns)
|
||||
@ -28,10 +28,10 @@
|
||||
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
|
||||
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||
1.00 0.00 0.00
|
||||
0.00 0.00 1.00
|
||||
# N-centered?
|
||||
F
|
||||
# Parameters for CC weight-dependent exchange functional
|
||||
|
@ -1,9 +1,9 @@
|
||||
# RHF UHF KS MOM
|
||||
T F F F
|
||||
F F T F
|
||||
# MP2* MP3 MP2-F12
|
||||
F F F
|
||||
# CCD DCD CCSD CCSD(T)
|
||||
F F T F
|
||||
F F F F
|
||||
# drCCD rCCD lCCD pCCD
|
||||
F F F F
|
||||
# CIS* CIS(D) CID CISD FCI
|
||||
@ -11,11 +11,11 @@
|
||||
# RPA* RPAx* ppRPA
|
||||
F F F
|
||||
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
||||
T F F F F
|
||||
F F F F F
|
||||
# G0W0* evGW* qsGW* ufG0W0 ufGW
|
||||
T F F F F
|
||||
F F F F F
|
||||
# G0T0 evGT qsGT
|
||||
T F F
|
||||
F F F
|
||||
# MCMP2
|
||||
F
|
||||
# * unrestricted version available
|
||||
|
@ -5,7 +5,7 @@
|
||||
# CC: maxSCF thresh DIIS n_diis
|
||||
64 0.0000000001 T 5
|
||||
# spin: TDA singlet triplet spin_conserved spin_flip
|
||||
F T T T T
|
||||
F T F T T
|
||||
# GF: maxSCF thresh DIIS n_diis lin eta renorm
|
||||
256 0.00001 T 5 T 0.00367493 3
|
||||
# GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0
|
||||
|
@ -1,4 +1,4 @@
|
||||
2
|
||||
|
||||
H 0. 0. 0.
|
||||
H 0. 0. 0.740848
|
||||
H 0. -0.740848 0.740848
|
||||
|
@ -62,7 +62,7 @@ subroutine unrestricted_correlation_individual_energy(rung,DFA,LDA_centered,nEns
|
||||
|
||||
case(4)
|
||||
|
||||
call print_warning('!!! Individual energies NYI for hybrids !!!')
|
||||
call unrestricted_hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,Ec)
|
||||
|
||||
end select
|
||||
|
||||
|
@ -29,13 +29,6 @@ subroutine unrestricted_exchange_individual_energy(rung,DFA,LDA_centered,nEns,wE
|
||||
logical,intent(in) :: doNcentered
|
||||
double precision,intent(in) :: kappa
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision :: ExLDA
|
||||
double precision :: ExGGA
|
||||
double precision :: ExMGGA
|
||||
double precision :: ExHF
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: Ex
|
||||
@ -53,32 +46,25 @@ subroutine unrestricted_exchange_individual_energy(rung,DFA,LDA_centered,nEns,wE
|
||||
case(1)
|
||||
|
||||
call unrestricted_lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,&
|
||||
rhow,rho,Cx_choice,doNcentered,kappa,ExLDA)
|
||||
|
||||
Ex = ExLDA
|
||||
rhow,rho,Cx_choice,doNcentered,kappa,Ex)
|
||||
|
||||
! GGA functionals
|
||||
|
||||
case(2)
|
||||
|
||||
call unrestricted_gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,ExGGA)
|
||||
|
||||
Ex = ExGGA
|
||||
call unrestricted_gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,Ex)
|
||||
|
||||
! MGGA functionals
|
||||
|
||||
case(3)
|
||||
|
||||
call unrestricted_mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,ExMGGA)
|
||||
|
||||
Ex = ExMGGA
|
||||
call unrestricted_mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,Ex)
|
||||
|
||||
! Hybrid functionals
|
||||
|
||||
case(4)
|
||||
|
||||
! call unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,P,FxHF,rho,drho,Ex)
|
||||
call print_warning('!!! Individual energies NYI for Hybrids !!!')
|
||||
call unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,P,rhow,drhow,rho,drho,Ex)
|
||||
|
||||
end select
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
subroutine unrestricted_fock_exchange_individual_energy(nBas,Pw,P,ERI,Ex)
|
||||
|
||||
! Compute the Fock exchange potential
|
||||
! Compute the HF individual energy in the unrestricted formalism
|
||||
|
||||
implicit none
|
||||
|
||||
@ -24,8 +24,9 @@ subroutine unrestricted_fock_exchange_individual_energy(nBas,Pw,P,ERI,Ex)
|
||||
|
||||
allocate(Fx(nBas,nBas))
|
||||
|
||||
call unrestricted_fock_exchange_potential(nBas,Pw(:,:),ERI(:,:,:,:),Fx(:,:))
|
||||
Ex = trace_matrix(nBas,matmul(P(:,:),Fx(:,:))) &
|
||||
- 0.5d0*trace_matrix(nBas,matmul(Pw(:,:),Fx(:,:)))
|
||||
call unrestricted_fock_exchange_potential(nBas,Pw,ERI,Fx)
|
||||
|
||||
Ex = trace_matrix(nBas,matmul(P ,Fx)) &
|
||||
- 0.5d0*trace_matrix(nBas,matmul(Pw,Fx))
|
||||
|
||||
end subroutine unrestricted_fock_exchange_individual_energy
|
||||
|
@ -0,0 +1,39 @@
|
||||
subroutine unrestricted_hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,Ec)
|
||||
|
||||
! Compute the hybrid correlation energy for individual states
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: DFA
|
||||
integer,intent(in) :: nEns
|
||||
double precision,intent(in) :: wEns(nEns)
|
||||
integer,intent(in) :: nGrid
|
||||
double precision,intent(in) :: weight(nGrid)
|
||||
double precision,intent(in) :: rhow(nGrid)
|
||||
double precision,intent(in) :: drhow(ncart,nGrid)
|
||||
double precision,intent(in) :: rho(nGrid)
|
||||
double precision,intent(in) :: drho(ncart,nGrid)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision :: Ec(nsp)
|
||||
|
||||
! Select correlation functional
|
||||
|
||||
select case (DFA)
|
||||
|
||||
case (1)
|
||||
|
||||
Ec(:) = 0d0
|
||||
|
||||
case default
|
||||
|
||||
call print_warning('!!! Hybrid correlation individual energy not available !!!')
|
||||
stop
|
||||
|
||||
end select
|
||||
|
||||
end subroutine unrestricted_hybrid_correlation_individual_energy
|
44
src/eDFT/unrestricted_hybrid_exchange_individual_energy.f90
Normal file
44
src/eDFT/unrestricted_hybrid_exchange_individual_energy.f90
Normal file
@ -0,0 +1,44 @@
|
||||
subroutine unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,P,rhow,drhow,rho,drho,Ex)
|
||||
|
||||
! Compute the hybrid exchange energy for individual states
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: DFA
|
||||
integer,intent(in) :: nEns
|
||||
double precision,intent(in) :: wEns(nEns)
|
||||
integer,intent(in) :: nGrid
|
||||
double precision,intent(in) :: weight(nGrid)
|
||||
double precision,intent(in) :: rhow(nGrid)
|
||||
double precision,intent(in) :: drhow(ncart,nGrid)
|
||||
double precision,intent(in) :: rho(nGrid)
|
||||
double precision,intent(in) :: drho(ncart,nGrid)
|
||||
|
||||
integer,intent(in) :: nBas
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: Pw(nBas,nBas)
|
||||
double precision,intent(in) :: P(nBas,nBas)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision :: Ex
|
||||
|
||||
! Select correlation functional
|
||||
|
||||
select case (DFA)
|
||||
|
||||
case (1)
|
||||
|
||||
call unrestricted_fock_exchange_individual_energy(nBas,Pw,P,ERI,Ex)
|
||||
|
||||
case default
|
||||
|
||||
call print_warning('!!! Hybrid exchange individual energy not available !!!')
|
||||
stop
|
||||
|
||||
end select
|
||||
|
||||
end subroutine unrestricted_hybrid_exchange_individual_energy
|
Loading…
Reference in New Issue
Block a user