2023-10-25 21:38:20 +02:00
|
|
|
subroutine RRPA(dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_kernel,singlet,triplet, &
|
|
|
|
nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF,cHF,S)
|
2023-07-23 11:16:42 +02:00
|
|
|
|
|
|
|
! Random-phase approximation module
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
logical :: dophRPA
|
|
|
|
logical :: dophRPAx
|
|
|
|
logical :: docrRPA
|
|
|
|
logical :: doppRPA
|
|
|
|
|
|
|
|
logical,intent(in) :: TDA
|
|
|
|
logical,intent(in) :: doACFDT
|
|
|
|
logical,intent(in) :: exchange_kernel
|
|
|
|
logical,intent(in) :: singlet
|
|
|
|
logical,intent(in) :: triplet
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nC(nspin)
|
|
|
|
integer,intent(in) :: nO(nspin)
|
|
|
|
integer,intent(in) :: nV(nspin)
|
|
|
|
integer,intent(in) :: nR(nspin)
|
|
|
|
integer,intent(in) :: nS(nspin)
|
|
|
|
double precision,intent(in) :: ENuc
|
|
|
|
double precision,intent(in) :: EHF
|
2023-10-25 21:38:20 +02:00
|
|
|
double precision,intent(in) :: epsHF(nBas)
|
|
|
|
double precision,intent(in) :: cHF(nBas,nBas)
|
2023-07-23 11:16:42 +02:00
|
|
|
double precision,intent(in) :: S(nBas,nBas)
|
|
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
|
|
|
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
double precision :: start_RPA ,end_RPA ,t_RPA
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute (direct) RPA excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(dophRPA) then
|
|
|
|
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(start_RPA)
|
2023-10-25 21:38:20 +02:00
|
|
|
call phRPA(TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(end_RPA)
|
2023-07-23 11:16:42 +02:00
|
|
|
|
|
|
|
t_RPA = end_RPA - start_RPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RPA = ',t_RPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute RPAx (RPA with exchange) excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(dophRPAx) then
|
|
|
|
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(start_RPA)
|
2023-10-25 21:38:20 +02:00
|
|
|
call phRPAx(TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(end_RPA)
|
2023-07-23 11:16:42 +02:00
|
|
|
|
|
|
|
t_RPA = end_RPA - start_RPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RPAx = ',t_RPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute crRPA excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(docrRPA) then
|
|
|
|
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(start_RPA)
|
2023-10-25 21:38:20 +02:00
|
|
|
call crRPA(TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(end_RPA)
|
2023-07-23 11:16:42 +02:00
|
|
|
|
|
|
|
t_RPA = end_RPA - start_RPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for pp-RPA = ',t_RPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute ppRPA excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doppRPA) then
|
|
|
|
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(start_RPA)
|
2023-10-25 21:38:20 +02:00
|
|
|
call ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,EHF,ERI,dipole_int,epsHF)
|
2023-07-31 16:01:12 +02:00
|
|
|
call wall_time(end_RPA)
|
2023-07-23 11:16:42 +02:00
|
|
|
|
|
|
|
t_RPA = end_RPA - start_RPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for pp-RPA = ',t_RPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
end subroutine
|