mirror of
https://github.com/pfloos/quack
synced 2024-08-27 06:31:45 +02:00
print energies
This commit is contained in:
parent
a5163dbbcb
commit
2fdc2b2978
@ -19,6 +19,6 @@
|
|||||||
# Number of states in ensemble (nEns)
|
# Number of states in ensemble (nEns)
|
||||||
2
|
2
|
||||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||||
0.00000 0.00000
|
0.50000 0.00000
|
||||||
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
|
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
|
||||||
64 0.0000001 T 5 1 1
|
64 0.0000001 T 5 1 1
|
||||||
|
@ -93,7 +93,7 @@ subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,*) '*******************************************************************'
|
write(*,*) '*******************************************************************'
|
||||||
write(*,*) '* Exchange rung *'
|
write(*,*) '* EXCHANGE RUNG *'
|
||||||
write(*,*) '*******************************************************************'
|
write(*,*) '*******************************************************************'
|
||||||
|
|
||||||
call select_rung(x_rung,x_DFA)
|
call select_rung(x_rung,x_DFA)
|
||||||
@ -102,7 +102,7 @@ subroutine GOK_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,*) '*******************************************************************'
|
write(*,*) '*******************************************************************'
|
||||||
write(*,*) '* Correlation rung *'
|
write(*,*) '* CORRELATION RUNG *'
|
||||||
write(*,*) '*******************************************************************'
|
write(*,*) '*******************************************************************'
|
||||||
|
|
||||||
call select_rung(c_rung,c_DFA)
|
call select_rung(c_rung,c_DFA)
|
||||||
@ -326,6 +326,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(:,:,:),E(:),Om(:))
|
Fc(:,:),P(:,:,:),rho(:,:),drho(:,:,:),Ew,E(:),Om(:))
|
||||||
|
|
||||||
end subroutine GOK_RKS
|
end subroutine GOK_RKS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,ExcDD,E, &
|
subroutine print_restricted_individual_energy(nEns,Ew,EwGOC,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
|
||||||
@ -9,6 +9,8 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
! Input variables
|
! Input variables
|
||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
|
double precision,intent(in) :: Ew
|
||||||
|
double precision,intent(in) :: EwGOC
|
||||||
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)
|
||||||
@ -23,12 +25,24 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
|
|
||||||
integer :: iEns
|
integer :: iEns
|
||||||
|
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
! Ensemble energies
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
write(*,'(A60)') ' ENSEMBLE ENERGIES'
|
||||||
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
write(*,'(A44,F16.10,A3)') ' Ensemble energy: ',Ew, ' au'
|
||||||
|
write(*,'(A44,F16.10,A3)') ' GOC Ensemble energy: ',EwGOC,' au'
|
||||||
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
write(*,*)
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Kinetic energy
|
! Kinetic energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual kinetic energies'
|
write(*,'(A60)') ' INDIVIDUAL KINETIC ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Kinetic energy state ',iEns,': ',ET(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Kinetic energy state ',iEns,': ',ET(iEns),' au'
|
||||||
@ -41,7 +55,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual potential energies'
|
write(*,'(A60)') ' INDIVIDUAL POTENTIAL ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Potential energy state ',iEns,': ',EV(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Potential energy state ',iEns,': ',EV(iEns),' au'
|
||||||
@ -54,7 +68,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual Hartree energies'
|
write(*,'(A60)') ' INDIVIDUAL HARTREE ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Hartree energy state ',iEns,': ',EJ(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Hartree energy state ',iEns,': ',EJ(iEns),' au'
|
||||||
@ -67,7 +81,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual exchange energies'
|
write(*,'(A60)') ' INDIVIDUAL EXCHANGE ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Exchange energy state ',iEns,': ',Ex(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Exchange energy state ',iEns,': ',Ex(iEns),' au'
|
||||||
@ -80,7 +94,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual correlation energies'
|
write(*,'(A60)') ' INDIVIDUAL CORRELATION ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Correlation energy state ',iEns,': ',Ec(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Correlation energy state ',iEns,': ',Ec(iEns),' au'
|
||||||
@ -93,7 +107,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Derivative discontinuities (DD) '
|
write(*,'(A60)') ' ENSEMBLE DERIVATIVE CONTRIBUTIONS'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,*)
|
write(*,*)
|
||||||
@ -109,7 +123,7 @@ subroutine print_restricted_individual_energy(nEns,ET,EV,EJ,Ex,Ec,Exc,ExDD,EcDD,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A50)') ' Individual and excitation energies '
|
write(*,'(A60)') ' INDIVIDUAL AND EXCITATION ENERGIES'
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
write(*,'(A40,I2,A2,F16.10,A3)') ' Individual energy state ',iEns,': ',E(iEns),' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Individual energy state ',iEns,': ',E(iEns),' au'
|
||||||
|
@ -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,E,Om)
|
nO,nV,T,V,ERI,ENuc,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,Ew,E,Om)
|
||||||
|
|
||||||
! Compute individual energies as well as excitation energies
|
! Compute individual energies as well as excitation energies
|
||||||
|
|
||||||
@ -37,8 +37,11 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
double precision,intent(in) :: FxHF(nBas,nBas)
|
double precision,intent(in) :: FxHF(nBas,nBas)
|
||||||
double precision,intent(in) :: Fc(nBas,nBas)
|
double precision,intent(in) :: Fc(nBas,nBas)
|
||||||
|
|
||||||
|
double precision :: Ew
|
||||||
|
|
||||||
! 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)
|
||||||
@ -123,6 +126,15 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGri
|
|||||||
+ Ex(iEns) + Ec(iEns) + ExcDD(iEns)
|
+ Ex(iEns) + Ec(iEns) + ExcDD(iEns)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
! Total energy with ghost-interaction correction
|
||||||
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EwGOC = 0d0
|
||||||
|
do iEns=1,nEns
|
||||||
|
EwGOC = EwGOC + wEns(iEns)*E(iEns)
|
||||||
|
end do
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Excitation energies
|
! Excitation energies
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -145,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,ET(:),EV(:),EJ(:),Ex(:),Ec(:),Exc(:), &
|
call print_restricted_individual_energy(nEns,Ew,EwGOC,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