mirror of
https://github.com/pfloos/quack
synced 2025-01-05 19:08:46 +01:00
LIM
This commit is contained in:
parent
2fdc2b2978
commit
404746ad04
35
input/basis
35
input/basis
@ -1,13 +1,26 @@
|
|||||||
1 3
|
1 8
|
||||||
|
S 6
|
||||||
|
1 1264.5857000 0.0019448
|
||||||
|
2 189.9368100 0.0148351
|
||||||
|
3 43.1590890 0.0720906
|
||||||
|
4 12.0986630 0.2371542
|
||||||
|
5 3.8063232 0.4691987
|
||||||
|
6 1.2728903 0.3565202
|
||||||
S 3
|
S 3
|
||||||
1 30.1678710 0.15432897
|
1 3.1964631 -0.1126487
|
||||||
2 5.4951153 0.53532814
|
2 0.7478133 -0.2295064
|
||||||
3 1.4871927 0.44463454
|
3 0.2199663 1.1869167
|
||||||
S 3
|
|
||||||
1 1.3148331 -0.0999672
|
|
||||||
2 0.3055389 0.3995128
|
|
||||||
3 0.0993707 0.7001155
|
|
||||||
P 3
|
P 3
|
||||||
1 1.3148331 0.1559163
|
1 3.1964631 0.0559802
|
||||||
2 0.3055389 0.6076837
|
2 0.7478133 0.2615506
|
||||||
3 0.0993707 0.3919574
|
3 0.2199663 0.7939723
|
||||||
|
S 1
|
||||||
|
1 0.0823099 1.0000000
|
||||||
|
P 1
|
||||||
|
1 0.0823099 1.0000000
|
||||||
|
S 1
|
||||||
|
1 0.0207000 1.0000000
|
||||||
|
P 1
|
||||||
|
1 0.0207000 1.0000000
|
||||||
|
D 1
|
||||||
|
1 0.4000000 1.0000000
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# Restricted or unrestricted KS calculation
|
# Restricted or unrestricted KS calculation
|
||||||
GOK-RKS
|
LIM-RKS
|
||||||
# exchange rung:
|
# exchange rung:
|
||||||
# Hartree = 0
|
# Hartree = 0
|
||||||
# LDA = 1: RS51,S51,RMFL20
|
# LDA = 1: RS51,S51,RMFL20
|
||||||
# GGA = 2: G96,B88
|
# GGA = 2: G96,B88
|
||||||
# Hybrid = 4
|
# Hybrid = 4
|
||||||
# Hartree-Fock = 666
|
# Hartree-Fock = 666
|
||||||
1 RMFL20
|
1 RS51
|
||||||
# correlation rung:
|
# correlation rung:
|
||||||
# Hartree = 0
|
# Hartree = 0
|
||||||
# LDA = 1: W38,VWN5,C16,RMFL20
|
# LDA = 1: W38,VWN5,C16,RMFL20
|
||||||
# GGA = 2: LYP
|
# GGA = 2: LYP
|
||||||
# Hybrid = 4: B3LYP
|
# Hybrid = 4: B3LYP
|
||||||
# Hartree-Fock = 666
|
# Hartree-Fock = 666
|
||||||
1 RMFL20
|
1 RVWN5
|
||||||
# quadrature grid SG-n
|
# quadrature grid SG-n
|
||||||
1
|
1
|
||||||
# Number of states in ensemble (nEns)
|
# Number of states in ensemble (nEns)
|
||||||
|
35
input/weight
35
input/weight
@ -1,13 +1,26 @@
|
|||||||
1 3
|
1 8
|
||||||
|
S 6
|
||||||
|
1 1264.5857000 0.0019448
|
||||||
|
2 189.9368100 0.0148351
|
||||||
|
3 43.1590890 0.0720906
|
||||||
|
4 12.0986630 0.2371542
|
||||||
|
5 3.8063232 0.4691987
|
||||||
|
6 1.2728903 0.3565202
|
||||||
S 3
|
S 3
|
||||||
1 30.1678710 0.15432897
|
1 3.1964631 -0.1126487
|
||||||
2 5.4951153 0.53532814
|
2 0.7478133 -0.2295064
|
||||||
3 1.4871927 0.44463454
|
3 0.2199663 1.1869167
|
||||||
S 3
|
|
||||||
1 1.3148331 -0.0999672
|
|
||||||
2 0.3055389 0.3995128
|
|
||||||
3 0.0993707 0.7001155
|
|
||||||
P 3
|
P 3
|
||||||
1 1.3148331 0.1559163
|
1 3.1964631 0.0559802
|
||||||
2 0.3055389 0.6076837
|
2 0.7478133 0.2615506
|
||||||
3 0.0993707 0.3919574
|
3 0.2199663 0.7939723
|
||||||
|
S 1
|
||||||
|
1 0.0823099 1.0000000
|
||||||
|
P 1
|
||||||
|
1 0.0823099 1.0000000
|
||||||
|
S 1
|
||||||
|
1 0.0207000 1.0000000
|
||||||
|
P 1
|
||||||
|
1 0.0207000 1.0000000
|
||||||
|
D 1
|
||||||
|
1 0.4000000 1.0000000
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, &
|
subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, &
|
||||||
max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,Ew)
|
max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,Ew,EwGIC)
|
||||||
|
|
||||||
! Perform restricted Kohn-Sham calculation for ensembles
|
! Perform restricted Kohn-Sham calculation for ensembles
|
||||||
|
|
||||||
@ -41,7 +41,6 @@ subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
double precision :: EJ
|
double precision :: EJ
|
||||||
double precision :: Ex
|
double precision :: Ex
|
||||||
double precision :: Ec
|
double precision :: Ec
|
||||||
double precision :: Ew
|
|
||||||
|
|
||||||
double precision,allocatable :: eps(:)
|
double precision,allocatable :: eps(:)
|
||||||
double precision,allocatable :: c(:,:)
|
double precision,allocatable :: c(:,:)
|
||||||
@ -72,6 +71,11 @@ subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
|
|
||||||
integer :: iEns
|
integer :: iEns
|
||||||
|
|
||||||
|
! Output variables
|
||||||
|
|
||||||
|
double precision,intent(out) :: Ew
|
||||||
|
double precision,intent(out) :: EwGIC
|
||||||
|
|
||||||
! Hello world
|
! Hello world
|
||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
@ -326,6 +330,6 @@ subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
call restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),nBas, &
|
call restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),nBas, &
|
||||||
AO(:,:),dAO(:,:,:),nO,nV,T(:,:),V(:,:),ERI(:,:,:,:),ENuc, &
|
AO(:,:),dAO(:,:,:),nO,nV,T(:,:),V(:,:),ERI(:,:,:,:),ENuc, &
|
||||||
Pw(:,:),rhow(:),drhow(:,:),J(:,:),Fx(:,:),FxHF(:,:), &
|
Pw(:,:),rhow(:),drhow(:,:),J(:,:),Fx(:,:),FxHF(:,:), &
|
||||||
Fc(:,:),P(:,:,:),rho(:,:),drho(:,:,:),Ew,E(:),Om(:))
|
Fc(:,:),P(:,:,:),rho(:,:),drho(:,:,:),Ew,EwGIC,E(:),Om(:))
|
||||||
|
|
||||||
end subroutine GOK_RKS
|
end subroutine GOK_RKS
|
||||||
|
@ -7,7 +7,7 @@ program eDFT
|
|||||||
|
|
||||||
integer :: nNuc,nBas
|
integer :: nNuc,nBas
|
||||||
integer :: nEl(nspin),nC(nspin),nO(nspin),nV(nspin),nR(nspin)
|
integer :: nEl(nspin),nC(nspin),nO(nspin),nV(nspin),nR(nspin)
|
||||||
double precision :: ENuc,EKS
|
double precision :: ENuc,Ew,EwGIC
|
||||||
|
|
||||||
double precision,allocatable :: ZNuc(:),rNuc(:,:)
|
double precision,allocatable :: ZNuc(:),rNuc(:,:)
|
||||||
|
|
||||||
@ -131,31 +131,48 @@ program eDFT
|
|||||||
call AO_values_grid(nBas,nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell,nGrid,root,AO,dAO)
|
call AO_values_grid(nBas,nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell,nGrid,root,AO,dAO)
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Compute RKS energy
|
! Compute GOK-RKS energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
if(method == 'GOK-RKS') then
|
if(method == 'GOK-RKS') then
|
||||||
|
|
||||||
call cpu_time(start_KS)
|
call cpu_time(start_KS)
|
||||||
call GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, &
|
call GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, &
|
||||||
nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc,EKS)
|
nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc,Ew,EwGIC)
|
||||||
call cpu_time(end_KS)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
t_KS = end_KS - start_KS
|
t_KS = end_KS - start_KS
|
||||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RKS = ',t_KS,' seconds'
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for GOC-RKS = ',t_KS,' seconds'
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Compute UKS energy
|
! Compute RKS energy
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if(method == 'LIM-RKS') then
|
||||||
|
|
||||||
|
call cpu_time(start_KS)
|
||||||
|
call LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, &
|
||||||
|
nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc)
|
||||||
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
|
t_KS = end_KS - start_KS
|
||||||
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for LIM-RKS = ',t_KS,' seconds'
|
||||||
|
write(*,*)
|
||||||
|
|
||||||
|
end if
|
||||||
|
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
! Compute GOK-UKS energy (BROKEN)
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
if(method == 'GOK-UKS') then
|
if(method == 'GOK-UKS') then
|
||||||
|
|
||||||
call cpu_time(start_KS)
|
call cpu_time(start_KS)
|
||||||
call GOK_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, &
|
call GOK_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, &
|
||||||
nBas,AO(:,:),dAO(:,:,:),nO(:),nV(:),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc,EKS)
|
nBas,AO(:,:),dAO(:,:,:),nO(:),nV(:),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc,Ew)
|
||||||
call cpu_time(end_KS)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
t_KS = end_KS - start_KS
|
t_KS = end_KS - start_KS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine print_restricted_individual_energy(nEns,Ew,EwGOC,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,ExcDD,E, &
|
subroutine print_restricted_individual_energy(nEns,Ew,EwGIC,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,ExcDD,E, &
|
||||||
Om,Omx,Omc,Omxc,OmxDD,OmcDD,OmxcDD)
|
Om,Omx,Omc,Omxc,OmxDD,OmcDD,OmxcDD)
|
||||||
|
|
||||||
! Print individual energies for eDFT calculation
|
! Print individual energies for eDFT calculation
|
||||||
@ -10,7 +10,7 @@ subroutine print_restricted_individual_energy(nEns,Ew,EwGOC,ET,EV,EJ,Ex,Ec,Exc,E
|
|||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: Ew
|
double precision,intent(in) :: Ew
|
||||||
double precision,intent(in) :: EwGOC
|
double precision,intent(in) :: EwGIC
|
||||||
double precision,intent(in) :: ET(nEns)
|
double precision,intent(in) :: ET(nEns)
|
||||||
double precision,intent(in) :: EV(nEns)
|
double precision,intent(in) :: EV(nEns)
|
||||||
double precision,intent(in) :: EJ(nEns)
|
double precision,intent(in) :: EJ(nEns)
|
||||||
@ -33,7 +33,7 @@ subroutine print_restricted_individual_energy(nEns,Ew,EwGOC,ET,EV,EJ,Ex,Ec,Exc,E
|
|||||||
write(*,'(A60)') ' ENSEMBLE ENERGIES'
|
write(*,'(A60)') ' ENSEMBLE ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A44,F16.10,A3)') ' Ensemble energy: ',Ew, ' au'
|
write(*,'(A44,F16.10,A3)') ' Ensemble energy: ',Ew, ' au'
|
||||||
write(*,'(A44,F16.10,A3)') ' GOC Ensemble energy: ',EwGOC,' au'
|
write(*,'(A44,F16.10,A3)') ' GIC Ensemble energy: ',EwGIC,' au'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO, &
|
subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO, &
|
||||||
nO,nV,T,V,ERI,ENuc,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,Ew,E,Om)
|
nO,nV,T,V,ERI,ENuc,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,Ew,EwGIC,E,Om)
|
||||||
|
|
||||||
! Compute individual energies as well as excitation energies
|
! Compute individual energies as well as excitation energies
|
||||||
|
|
||||||
@ -41,7 +41,6 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
double precision :: EwGOC
|
|
||||||
double precision :: ET(nEns)
|
double precision :: ET(nEns)
|
||||||
double precision :: EV(nEns)
|
double precision :: EV(nEns)
|
||||||
double precision :: EJ(nEns)
|
double precision :: EJ(nEns)
|
||||||
@ -56,6 +55,7 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
|
double precision,intent(out) :: EwGIC
|
||||||
double precision,intent(out) :: E(nEns)
|
double precision,intent(out) :: E(nEns)
|
||||||
double precision,intent(out) :: Om(nEns)
|
double precision,intent(out) :: Om(nEns)
|
||||||
|
|
||||||
@ -130,9 +130,9 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
! Total energy with ghost-interaction correction
|
! Total energy with ghost-interaction correction
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
EwGOC = 0d0
|
EwGIC = 0d0
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
EwGOC = EwGOC + wEns(iEns)*E(iEns)
|
EwGIC = EwGIC + wEns(iEns)*E(iEns)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -157,7 +157,7 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
! Dump results
|
! Dump results
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
call print_restricted_individual_energy(nEns,Ew,EwGOC,ET(:),EV(:),EJ(:),Ex(:),Ec(:),Exc(:), &
|
call print_restricted_individual_energy(nEns,Ew,EwGIC,ET(:),EV(:),EJ(:),Ex(:),Ec(:),Exc(:), &
|
||||||
ExDD(:),EcDD(:),ExcDD(:),E(:), &
|
ExDD(:),EcDD(:),ExcDD(:),E(:), &
|
||||||
Om(:),Omx(:),Omc(:),Omxc(:),OmxDD(:),OmcDD(:),OmxcDD(:))
|
Om(:),Omx(:),Omc(:),Omxc(:),OmxDD(:),OmcDD(:),OmxcDD(:))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user