4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 04:14:26 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
f3e7222e49 looking for a bug 2020-07-04 14:32:06 +02:00
Clotilde Marut
22dda9af8b minor modifications 2020-07-04 13:19:45 +02:00
11 changed files with 36 additions and 68 deletions

View File

@ -1,25 +1,9 @@
1 10
S 4
1 528.5000000 0.0009400
2 79.3100000 0.0072140
3 18.0500000 0.0359750
4 5.0850000 0.1277820
1 3
S 3
1 38.3600000 0.0238090
2 5.7700000 0.1548910
3 1.2400000 0.4699870
S 1
1 1.6090000 1.0000000
S 1
1 0.5363000 1.0000000
S 1
1 0.1833000 1.0000000
1 0.2976000 1.0000000
P 1
1 5.9940000 1.0000000
P 1
1 1.7450000 1.0000000
P 1
1 0.5600000 1.0000000
D 1
1 4.2990000 1.0000000
D 1
1 1.2230000 1.0000000
F 1
1 2.6800000 1.0000000
1 1.2750000 1.0000000

View File

@ -1,12 +1,12 @@
# Restricted or unrestricted KS calculation
GOK-RKS
eDFT-UKS
# exchange rung:
# Hartree = 0
# LDA = 1: RS51,RMFL20
# GGA = 2: RB88
# Hybrid = 4
# Hartree-Fock = 666
1 RCC
# Hartree-Fock = 666: RHF,UHF
1 US51
# correlation rung:
# Hartree = 0
# LDA = 1: RVWN5,RMFL20

View File

@ -1,25 +1,9 @@
1 10
S 4
1 528.5000000 0.0009400
2 79.3100000 0.0072140
3 18.0500000 0.0359750
4 5.0850000 0.1277820
1 3
S 3
1 38.3600000 0.0238090
2 5.7700000 0.1548910
3 1.2400000 0.4699870
S 1
1 1.6090000 1.0000000
S 1
1 0.5363000 1.0000000
S 1
1 0.1833000 1.0000000
1 0.2976000 1.0000000
P 1
1 5.9940000 1.0000000
P 1
1 1.7450000 1.0000000
P 1
1 0.5600000 1.0000000
D 1
1 4.2990000 1.0000000
D 1
1 1.2230000 1.0000000
F 1
1 2.6800000 1.0000000
1 1.2750000 1.0000000

View File

@ -190,7 +190,7 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,aCC_
!------------------------------------------------------------------------
call restricted_density_matrix(nBas,nEns,nO,c(:,:),P(:,:,:))
! Weight-dependent density matrix
Pw(:,:) = 0d0

View File

@ -26,7 +26,6 @@ subroutine US51_lda_exchange_individual_energy(nGrid,weight,rhow,rho,Ex)
alpha = -(3d0/2d0)*(3d0/(4d0*pi))**(1d0/3d0)
Ex = 0d0
do iG=1,nGrid

View File

@ -164,9 +164,9 @@ program eDFT
if(method == 'GOK-RKS') then
call cpu_time(start_KS)
call GOK_RKS(.false.,x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns(:),aCC_w1,aCC_w2,nGrid,weight(:), &
maxSCF,thresh,max_diis,guess_type,nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1), &
S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc,Ew,c(:,:))
call GOK_RKS(.false.,x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight, &
maxSCF,thresh,max_diis,guess_type,nBas,AO,dAO,nO(1),nV(1), &
S,T,V,Hc,ERI,X,ENuc,Ew,c)
call cpu_time(end_KS)
t_KS = end_KS - start_KS

View File

@ -331,7 +331,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
! Check the grid accuracy by computing the number of electrons
do ispin=1,nspin
nEl(ispin) = electron_number(nGrid,weight(:),rhow(:,ispin))
nEl(ispin) = electron_number(nGrid,weight,rhow(:,ispin))
end do
! Dump results
@ -361,7 +361,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
! Compute final KS energy
call print_UKS(nBas,nO(:),eps(:,:),c(:,:,:),ENuc,ET(:),EV(:),EJ(:),Ex(:),Ec(:),Ew)
call print_UKS(nBas,nO,eps,c,ENuc,ET,EV,EJ,Ex,Ec,Ew)
!------------------------------------------------------------------------
! Compute individual energies from ensemble energy

View File

@ -28,23 +28,23 @@ subroutine lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_
case ('US51')
call US51_lda_exchange_individual_energy(nGrid,weight(:),rhow(:),rho(:),Ex)
call US51_lda_exchange_individual_energy(nGrid,weight,rhow,rho,Ex)
case ('RS51')
call RS51_lda_exchange_individual_energy(nGrid,weight(:),rhow(:),rho(:),Ex)
call RS51_lda_exchange_individual_energy(nGrid,weight,rhow,rho,Ex)
case ('RMFL20')
call RMFL20_lda_exchange_individual_energy(LDA_centered,nEns,wEns,nGrid,weight(:),rhow(:),rho(:),Ex)
call RMFL20_lda_exchange_individual_energy(LDA_centered,nEns,wEns,nGrid,weight,rhow,rho,Ex)
case ('RCC')
call RCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight(:),rhow(:),rho(:),Ex)
call RCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rhow,rho,Ex)
case ('UCC')
call UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight(:),rhow(:),rho(:),Ex)
call UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rhow,rho,Ex)
case default

View File

@ -16,7 +16,7 @@ subroutine print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EJ,Ex,Ec,Exc,
double precision,intent(in) :: EJ(nsp,nEns)
double precision,intent(in) :: Ex(nspin,nEns), Ec(nsp,nEns), Exc(nEns)
double precision,intent(in) :: Eaux(nspin,nEns)
double precision,intent(in) :: ExDD(nspin,nEns), EcDD(nsp,nEns), ExcDD(nspin,nEns)
double precision,intent(in) :: ExDD(nspin,nEns), EcDD(nsp,nEns), ExcDD(nsp,nEns)
double precision,intent(in) :: Omx(nEns), Omc(nEns), Omxc(nEns)
double precision,intent(in) :: Omaux(nEns)
double precision,intent(in) :: OmxDD(nEns),OmcDD(nEns),OmxcDD(nEns)

View File

@ -45,6 +45,6 @@ subroutine unrestricted_auxiliary_energy(nBas,nEns,nO,eps,Eaux)
iEns = 3
Eaux(1,iEns) = sum(eps(1:nO(1)+1,1))
Eaux(2,iEns) = sum(eps(1:nO(2) ,2))
Eaux(2,iEns) = sum(eps(1:nO(2),2))
end subroutine unrestricted_auxiliary_energy

View File

@ -27,8 +27,8 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
double precision,intent(in) :: ENuc
double precision,intent(in) :: eps(nBas,nspin) !!!!!
double precision,intent(in) :: Pw(nBas,nBas,nspin) !!!!!
double precision,intent(in) :: eps(nBas,nspin)
double precision,intent(in) :: Pw(nBas,nBas,nspin)
double precision,intent(in) :: rhow(nGrid,nspin)
double precision,intent(in) :: drhow(ncart,nGrid,nspin)
@ -118,9 +118,10 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
do iEns=1,nEns
do ispin=1,nspin
call exchange_individual_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,ERI, &
Pw(:,:,ispin),P(:,:,ispin,iEns),rhow(:,ispin),drhow(:,:,ispin), &
call exchange_individual_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,ERI, &
Pw(:,:,ispin),P(:,:,ispin,iEns),rhow(:,ispin),drhow(:,:,ispin), &
rho(:,ispin,iEns),drho(:,:,ispin,iEns),Ex(ispin,iEns))
print*,'Ex = ',Ex(ispin,iEns)
end do
end do
@ -137,7 +138,7 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
! Compute auxiliary energies
!------------------------------------------------------------------------
call unrestricted_auxiliary_energy(nBas,nEns,nO(:),eps(:,:),Eaux(:,:))
call unrestricted_auxiliary_energy(nBas,nEns,nO,eps,Eaux)
!------------------------------------------------------------------------
! Compute derivative discontinuities