10
1
mirror of https://github.com/pfloos/quack synced 2024-12-27 06:43:42 +01:00
QuAcK/src/eDFT/print_restricted_individual_energy.f90

202 lines
9.9 KiB
Fortran
Raw Normal View History

2020-03-30 22:45:05 +02:00
subroutine print_restricted_individual_energy(nEns,ENuc,Ew,EwGIC,ET,EV,EJ,Ex,Ec,Exc,Eaux,ExDD,EcDD,ExcDD,E, &
Om,Omx,Omc,Omxc,Omaux,OmxDD,OmcDD,OmxcDD)
2020-03-15 16:30:18 +01:00
! Print individual energies for eDFT calculation
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nEns
2020-03-27 20:46:13 +01:00
double precision,intent(in) :: ENuc
2020-03-18 07:29:54 +01:00
double precision,intent(in) :: Ew
2020-03-18 11:10:21 +01:00
double precision,intent(in) :: EwGIC
2020-03-15 16:30:18 +01:00
double precision,intent(in) :: ET(nEns)
double precision,intent(in) :: EV(nEns)
double precision,intent(in) :: EJ(nEns)
2020-03-17 11:29:20 +01:00
double precision,intent(in) :: Ex(nEns), Ec(nEns), Exc(nEns)
2020-03-30 22:45:05 +02:00
double precision,intent(in) :: Eaux(nEns)
2020-03-17 11:29:20 +01:00
double precision,intent(in) :: ExDD(nEns), EcDD(nEns), ExcDD(nEns)
double precision,intent(in) :: Omx(nEns), Omc(nEns), Omxc(nEns)
2020-03-30 22:45:05 +02:00
double precision,intent(in) :: Omaux(nEns)
2020-03-17 11:29:20 +01:00
double precision,intent(in) :: OmxDD(nEns),OmcDD(nEns),OmxcDD(nEns)
2020-03-15 16:30:18 +01:00
double precision,intent(in) :: E(nEns)
double precision,intent(in) :: Om(nEns)
! Local variables
integer :: iEns
2020-03-18 07:29:54 +01:00
!------------------------------------------------------------------------
! Ensemble energies
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
write(*,'(A60)') ' ENSEMBLE ENERGIES'
write(*,'(A60)') '-------------------------------------------------'
2020-03-27 20:46:13 +01:00
write(*,'(A44,F16.10,A3)') ' Ensemble energy: ',Ew + ENuc,' au'
write(*,'(A44,F16.10,A3)') ' GIC Ensemble energy: ',EwGIC + ENuc,' au'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
2020-03-15 16:30:18 +01:00
!------------------------------------------------------------------------
! Kinetic energy
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' INDIVIDUAL KINETIC ENERGIES'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Kinetic energy state ',iEns,': ',ET(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
!------------------------------------------------------------------------
! Potential energy
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' INDIVIDUAL POTENTIAL ENERGIES'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Potential energy state ',iEns,': ',EV(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
!------------------------------------------------------------------------
! Hartree energy
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' INDIVIDUAL HARTREE ENERGIES'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Hartree energy state ',iEns,': ',EJ(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
!------------------------------------------------------------------------
! Exchange energy
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' INDIVIDUAL EXCHANGE ENERGIES'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Exchange energy state ',iEns,': ',Ex(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
!------------------------------------------------------------------------
! Correlation energy
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' INDIVIDUAL CORRELATION ENERGIES'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Correlation energy state ',iEns,': ',Ec(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
2020-03-30 22:45:05 +02:00
!------------------------------------------------------------------------
! Auxiliary energies
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
write(*,'(A60)') ' AUXILIARY KS ENERGIES'
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
write(*,'(A40,I2,A2,F16.10,A3)') 'Auxiliary KS energy state ',iEns,': ',Eaux(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
2020-03-15 16:30:18 +01:00
!------------------------------------------------------------------------
! Compute derivative discontinuities
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-18 07:29:54 +01:00
write(*,'(A60)') ' ENSEMBLE DERIVATIVE CONTRIBUTIONS'
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
2020-03-17 19:35:00 +01:00
write(*,*)
2020-03-17 11:29:20 +01:00
write(*,'(A40,I2,A2,F16.10,A3)') ' x ensemble derivative state ',iEns,': ',ExDD(iEns), ' au'
write(*,'(A40,I2,A2,F16.10,A3)') ' c ensemble derivative state ',iEns,': ',EcDD(iEns), ' au'
write(*,'(A40,I2,A2,F16.10,A3)') ' xc ensemble derivative state ',iEns,': ',ExcDD(iEns),' au'
2020-03-15 16:30:18 +01:00
end do
write(*,'(A60)') '-------------------------------------------------'
2020-03-17 19:35:00 +01:00
write(*,*)
2020-03-15 16:30:18 +01:00
!------------------------------------------------------------------------
! Total and Excitation energies
!------------------------------------------------------------------------
write(*,'(A60)') '-------------------------------------------------'
2020-03-30 22:45:05 +02:00
write(*,'(A60)') ' EXCITATION ENERGIES FROM AUXILIARY ENERGIES '
write(*,'(A60)') '-------------------------------------------------'
do iEns=2,nEns
write(*,'(A40,I2,A2,F16.10,A3)') ' Auxiliary excitation energy 1 ->',iEns,': ',Omaux(iEns)+OmxcDD(iEns),' au'
write(*,*)
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns),' au'
end do
write(*,'(A60)') '-------------------------------------------------'
do iEns=2,nEns
2020-03-30 23:51:47 +02:00
write(*,'(A40,I2,A2,F16.10,A3)') ' Auxiliary excitation energy 1 ->',iEns,': ',(Omaux(iEns)+OmxcDD(iEns))*HaToeV,' eV'
2020-03-30 22:45:05 +02:00
write(*,*)
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns)*HaToeV,' eV'
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
write(*,'(A60)') '-------------------------------------------------'
write(*,'(A60)') ' EXCITATION ENERGIES FROM INDIVIDUAL ENERGIES '
2020-03-15 16:30:18 +01:00
write(*,'(A60)') '-------------------------------------------------'
do iEns=1,nEns
2020-03-27 20:46:13 +01:00
write(*,'(A40,I2,A2,F16.10,A3)') ' Individual energy state ',iEns,': ',E(iEns) + ENuc,' au'
2020-03-15 16:30:18 +01:00
end do
write(*,'(A60)') '-------------------------------------------------'
2020-03-17 11:29:20 +01:00
2020-03-15 16:30:18 +01:00
do iEns=2,nEns
2020-03-17 11:29:20 +01:00
write(*,'(A40,I2,A2,F16.10,A3)') ' Excitation energy 1 ->',iEns,': ',Om(iEns), ' au'
write(*,*)
write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(iEns), ' au'
write(*,*)
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns), ' au'
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns),' au'
2020-03-15 16:30:18 +01:00
end do
write(*,'(A60)') '-------------------------------------------------'
2020-03-17 11:29:20 +01:00
2020-03-15 16:30:18 +01:00
do iEns=2,nEns
2020-03-17 11:29:20 +01:00
write(*,'(A40,I2,A2,F16.10,A3)') ' Excitation energy 1 ->',iEns,': ',Om(iEns)*HaToeV, ' eV'
write(*,*)
write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(iEns)*HaToeV, ' eV'
write(*,*)
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns)*HaToeV, ' eV'
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns)*HaToeV,' eV'
2020-03-15 16:30:18 +01:00
end do
write(*,'(A60)') '-------------------------------------------------'
write(*,*)
end subroutine print_restricted_individual_energy