2019-03-19 10:13:33 +01:00
|
|
|
program QuAcK
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
2019-05-07 22:55:36 +02:00
|
|
|
logical :: doSph
|
2020-09-22 15:32:26 +02:00
|
|
|
logical :: unrestricted = .false.
|
2019-03-19 10:13:33 +01:00
|
|
|
logical :: doRHF,doUHF,doMOM
|
2021-03-03 11:37:46 +01:00
|
|
|
logical :: dostab
|
2020-10-13 13:44:24 +02:00
|
|
|
logical :: doKS
|
2019-03-19 10:13:33 +01:00
|
|
|
logical :: doMP2,doMP3,doMP2F12
|
2020-12-04 13:26:08 +01:00
|
|
|
logical :: doCCD,doDCD,doCCSD,doCCSDT
|
2020-03-21 22:50:43 +01:00
|
|
|
logical :: do_drCCD,do_rCCD,do_lCCD,do_pCCD
|
2021-03-08 17:00:05 +01:00
|
|
|
logical :: doCIS,doCIS_D,doCID,doCISD,doFCI
|
2020-04-20 12:28:19 +02:00
|
|
|
logical :: doRPA,doRPAx,doppRPA
|
|
|
|
logical :: doADC
|
2021-03-05 22:34:48 +01:00
|
|
|
logical :: doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3
|
2019-03-19 10:13:33 +01:00
|
|
|
logical :: doG0W0,doevGW,doqsGW
|
2019-10-16 18:14:47 +02:00
|
|
|
logical :: doG0T0,doevGT,doqsGT
|
2019-03-19 10:13:33 +01:00
|
|
|
logical :: doMCMP2,doMinMCMP2
|
2020-04-16 17:02:01 +02:00
|
|
|
logical :: doGTGW = .false.
|
2019-07-09 23:09:32 +02:00
|
|
|
logical :: doBas
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
integer :: nNuc,nBas,nBasCABS
|
2020-09-21 16:54:38 +02:00
|
|
|
integer :: nEl(nspin)
|
|
|
|
integer :: nC(nspin)
|
|
|
|
integer :: nO(nspin)
|
|
|
|
integer :: nV(nspin)
|
|
|
|
integer :: nR(nspin)
|
2019-10-18 23:16:37 +02:00
|
|
|
integer :: nS(nspin)
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: ENuc,ERHF,EUHF,Norm
|
|
|
|
double precision :: EcMP2(3),EcMP3,EcMP2F12(3),EcMCMP2(3),Err_EcMCMP2(3),Var_EcMCMP2(3)
|
|
|
|
|
|
|
|
double precision,allocatable :: ZNuc(:),rNuc(:,:)
|
|
|
|
double precision,allocatable :: cHF(:,:,:),eHF(:,:),PHF(:,:,:)
|
2021-02-15 21:44:24 +01:00
|
|
|
double precision,allocatable :: Vxc(:,:)
|
2020-01-14 21:27:34 +01:00
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
double precision,allocatable :: eG0W0(:,:)
|
|
|
|
double precision,allocatable :: eG0T0(:,:)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-01-14 21:27:34 +01:00
|
|
|
logical :: doACFDT
|
2020-01-16 21:39:00 +01:00
|
|
|
logical :: exchange_kernel
|
2020-01-14 21:27:34 +01:00
|
|
|
logical :: doXBS
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
integer :: nShell
|
2020-03-25 09:48:58 +01:00
|
|
|
integer,allocatable :: TotAngMomShell(:)
|
|
|
|
integer,allocatable :: KShell(:)
|
|
|
|
double precision,allocatable :: CenterShell(:,:)
|
|
|
|
double precision,allocatable :: DShell(:,:)
|
|
|
|
double precision,allocatable :: ExpShell(:,:)
|
|
|
|
integer,allocatable :: max_ang_mom(:)
|
|
|
|
double precision,allocatable :: min_exponent(:,:)
|
|
|
|
double precision,allocatable :: max_exponent(:)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
integer :: TrialType
|
|
|
|
double precision,allocatable :: cTrial(:),gradient(:),hessian(:,:)
|
|
|
|
|
2020-09-28 21:25:25 +02:00
|
|
|
double precision,allocatable :: S(:,:)
|
|
|
|
double precision,allocatable :: T(:,:)
|
|
|
|
double precision,allocatable :: V(:,:)
|
|
|
|
double precision,allocatable :: Hc(:,:)
|
|
|
|
double precision,allocatable :: X(:,:)
|
2020-10-21 12:58:37 +02:00
|
|
|
double precision,allocatable :: dipole_int_AO(:,:,:)
|
|
|
|
double precision,allocatable :: dipole_int_MO(:,:,:)
|
2020-09-28 22:58:58 +02:00
|
|
|
double precision,allocatable :: dipole_int_aa(:,:,:)
|
|
|
|
double precision,allocatable :: dipole_int_bb(:,:,:)
|
2020-04-16 17:02:01 +02:00
|
|
|
double precision,allocatable :: ERI_AO(:,:,:,:)
|
|
|
|
double precision,allocatable :: ERI_MO(:,:,:,:)
|
2020-09-28 21:25:25 +02:00
|
|
|
integer :: ixyz
|
2020-09-22 23:08:47 +02:00
|
|
|
integer :: bra1,bra2
|
|
|
|
integer :: ket1,ket2
|
2020-09-22 22:13:51 +02:00
|
|
|
double precision,allocatable :: ERI_MO_aaaa(:,:,:,:)
|
|
|
|
double precision,allocatable :: ERI_MO_aabb(:,:,:,:)
|
|
|
|
double precision,allocatable :: ERI_MO_bbbb(:,:,:,:)
|
2020-04-16 17:02:01 +02:00
|
|
|
double precision,allocatable :: ERI_ERF_AO(:,:,:,:)
|
|
|
|
double precision,allocatable :: ERI_ERF_MO(:,:,:,:)
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision,allocatable :: F12(:,:,:,:),Yuk(:,:,:,:),FC(:,:,:,:,:,:)
|
|
|
|
|
2019-04-24 18:00:54 +02:00
|
|
|
double precision :: start_QuAcK ,end_QuAcK ,t_QuAcK
|
2019-05-07 22:55:36 +02:00
|
|
|
double precision :: start_int ,end_int ,t_int
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_HF ,end_HF ,t_HF
|
2021-03-03 11:37:46 +01:00
|
|
|
double precision :: start_stab ,end_stab ,t_stab
|
2020-10-13 13:44:24 +02:00
|
|
|
double precision :: start_KS ,end_KS ,t_KS
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_MOM ,end_MOM ,t_MOM
|
2019-05-07 22:55:36 +02:00
|
|
|
double precision :: start_AOtoMO ,end_AOtoMO ,t_AOtoMO
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_CCD ,end_CCD ,t_CCD
|
2020-12-04 13:26:08 +01:00
|
|
|
double precision :: start_DCD ,end_DCD ,t_DCD
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_CCSD ,end_CCSD ,t_CCSD
|
|
|
|
double precision :: start_CIS ,end_CIS ,t_CIS
|
2020-04-20 12:28:19 +02:00
|
|
|
double precision :: start_CID ,end_CID ,t_CID
|
|
|
|
double precision :: start_CISD ,end_CISD ,t_CISD
|
2021-03-08 17:00:05 +01:00
|
|
|
double precision :: start_FCI ,end_FCI ,t_FCI
|
2020-01-13 23:08:03 +01:00
|
|
|
double precision :: start_RPA ,end_RPA ,t_RPA
|
2020-01-14 19:53:52 +01:00
|
|
|
double precision :: start_RPAx ,end_RPAx ,t_RPAx
|
2019-10-05 23:09:20 +02:00
|
|
|
double precision :: start_ppRPA ,end_ppRPA ,t_ppRPA
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_ADC ,end_ADC ,t_ADC
|
|
|
|
double precision :: start_GF2 ,end_GF2 ,t_GF2
|
|
|
|
double precision :: start_GF3 ,end_GF3 ,t_GF3
|
|
|
|
double precision :: start_G0W0 ,end_G0W0 ,t_G0W0
|
|
|
|
double precision :: start_evGW ,end_evGW ,t_evGW
|
|
|
|
double precision :: start_qsGW ,end_qsGW ,t_qsGW
|
2019-10-16 18:14:47 +02:00
|
|
|
double precision :: start_G0T0 ,end_G0T0 ,t_G0T0
|
|
|
|
double precision :: start_evGT ,end_evGT ,t_evGT
|
|
|
|
double precision :: start_qsGT ,end_qsGT ,t_qsGT
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: start_MP2 ,end_MP2 ,t_MP2
|
|
|
|
double precision :: start_MP3 ,end_MP3 ,t_MP3
|
|
|
|
double precision :: start_MP2F12 ,end_MP2F12 ,t_MP2F12
|
|
|
|
double precision :: start_MCMP2 ,end_MCMP2 ,t_MCMP2
|
|
|
|
double precision :: start_MinMCMP2,end_MinMCMP2,t_MinMCMP2
|
2019-07-09 23:09:32 +02:00
|
|
|
double precision :: start_Bas ,end_Bas ,t_Bas
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
integer :: maxSCF_HF,n_diis_HF
|
|
|
|
double precision :: thresh_HF
|
2020-10-27 17:23:48 +01:00
|
|
|
logical :: DIIS_HF,guess_type,ortho_type,mix
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
integer :: maxSCF_CC,n_diis_CC
|
|
|
|
double precision :: thresh_CC
|
|
|
|
logical :: DIIS_CC
|
|
|
|
|
2020-09-22 23:08:47 +02:00
|
|
|
logical :: singlet
|
|
|
|
logical :: triplet
|
|
|
|
logical :: spin_conserved
|
|
|
|
logical :: spin_flip
|
2020-06-15 23:04:07 +02:00
|
|
|
logical :: TDA
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-03-19 10:33:56 +01:00
|
|
|
integer :: maxSCF_GF,n_diis_GF,renormGF
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision :: thresh_GF
|
2020-06-15 23:04:07 +02:00
|
|
|
logical :: DIIS_GF,linGF
|
2020-06-03 12:06:16 +02:00
|
|
|
double precision :: eta_GF
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
integer :: maxSCF_GW,n_diis_GW
|
|
|
|
double precision :: thresh_GW
|
2020-06-15 23:04:07 +02:00
|
|
|
logical :: DIIS_GW,COHSEX,SOSEX,TDA_W,G0W,GW0,linGW
|
2020-06-03 12:06:16 +02:00
|
|
|
double precision :: eta_GW
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-06-15 23:04:07 +02:00
|
|
|
logical :: BSE,dBSE,dTDA,evDyn
|
2020-06-14 21:20:01 +02:00
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
integer :: nMC,nEq,nWalk,nPrint,iSeed
|
|
|
|
double precision :: dt
|
|
|
|
logical :: doDrift
|
|
|
|
|
|
|
|
! Hello World
|
|
|
|
|
|
|
|
write(*,*)
|
|
|
|
write(*,*) '******************************************************************************************'
|
|
|
|
write(*,*) '* QuAcK QuAcK QuAcK *'
|
|
|
|
write(*,*) '* __ __ __ __ __ __ __ __ __ *'
|
|
|
|
write(*,*) '* <(o )___ <(o )___ <(o )___ <(o )___ <(o )___ <(o )___ <(o )___ <(o )___ <(o )___ *'
|
|
|
|
write(*,*) '* ( ._> / ( ._> / ( ._> / ( ._> / ( ._> / ( ._> / ( ._> / ( ._> / ( ._> / *'
|
|
|
|
write(*,*) '*|--------------------------------------------------------------------------------------|*'
|
|
|
|
write(*,*) '******************************************************************************************'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-05-07 22:55:36 +02:00
|
|
|
! Spherium calculation?
|
|
|
|
|
2019-05-23 09:53:23 +02:00
|
|
|
doSph = .false.
|
2019-05-07 22:55:36 +02:00
|
|
|
|
2019-04-24 18:00:54 +02:00
|
|
|
call cpu_time(start_QuAcK)
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Which calculations do you want to do?
|
|
|
|
|
2020-10-13 13:44:24 +02:00
|
|
|
call read_methods(doRHF,doUHF,doKS,doMOM, &
|
2020-03-21 22:50:43 +01:00
|
|
|
doMP2,doMP3,doMP2F12, &
|
2020-12-04 13:26:08 +01:00
|
|
|
doCCD,doDCD,doCCSD,doCCSDT, &
|
2020-03-21 22:50:43 +01:00
|
|
|
do_drCCD,do_rCCD,do_lCCD,do_pCCD, &
|
2021-03-08 17:00:05 +01:00
|
|
|
doCIS,doCIS_D,doCID,doCISD,doFCI, &
|
2020-04-20 12:28:19 +02:00
|
|
|
doRPA,doRPAx,doppRPA, &
|
2021-03-05 22:34:48 +01:00
|
|
|
doG0F2,doevGF2,doqsGF2, &
|
|
|
|
doG0F3,doevGF3, &
|
2020-03-21 22:50:43 +01:00
|
|
|
doG0W0,doevGW,doqsGW, &
|
|
|
|
doG0T0,doevGT,doqsGT, &
|
2019-03-19 10:13:33 +01:00
|
|
|
doMCMP2)
|
|
|
|
|
|
|
|
! Read options for methods
|
|
|
|
|
2021-03-03 11:37:46 +01:00
|
|
|
call read_options(maxSCF_HF,thresh_HF,DIIS_HF,n_diis_HF,guess_type,ortho_type,mix,dostab, &
|
|
|
|
maxSCF_CC,thresh_CC,DIIS_CC,n_diis_CC, &
|
|
|
|
TDA,singlet,triplet,spin_conserved,spin_flip, &
|
|
|
|
maxSCF_GF,thresh_GF,DIIS_GF,n_diis_GF,linGF,eta_GF,renormGF, &
|
|
|
|
maxSCF_GW,thresh_GW,DIIS_GW,n_diis_GW,linGW,eta_GW, &
|
|
|
|
COHSEX,SOSEX,TDA_W,G0W,GW0, &
|
|
|
|
doACFDT,exchange_kernel,doXBS, &
|
|
|
|
BSE,dBSE,dTDA,evDyn, &
|
2019-03-19 10:13:33 +01:00
|
|
|
nMC,nEq,nWalk,dt,nPrint,iSeed,doDrift)
|
|
|
|
|
|
|
|
! Weird stuff
|
|
|
|
|
|
|
|
doMinMCMP2 = .false.
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Read input information
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
! Read number of atoms, number of electrons of the system
|
|
|
|
! nC = number of core orbitals
|
|
|
|
! nO = number of occupied orbitals
|
|
|
|
! nV = number of virtual orbitals (see below)
|
|
|
|
! nR = number of Rydberg orbitals
|
|
|
|
! nBas = number of basis functions (see below)
|
|
|
|
! = nO + nV
|
|
|
|
! nS = number of single excitation
|
|
|
|
! = nO*nV
|
|
|
|
|
2019-03-19 11:21:34 +01:00
|
|
|
call read_molecule(nNuc,nEl(:),nO(:),nC(:),nR(:))
|
2020-03-14 23:00:44 +01:00
|
|
|
allocate(ZNuc(nNuc),rNuc(nNuc,ncart))
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Read geometry
|
|
|
|
|
|
|
|
call read_geometry(nNuc,ZNuc,rNuc,ENuc)
|
|
|
|
|
2020-03-25 09:48:58 +01:00
|
|
|
allocate(CenterShell(maxShell,ncart),TotAngMomShell(maxShell),KShell(maxShell),DShell(maxShell,maxK), &
|
|
|
|
ExpShell(maxShell,maxK),max_ang_mom(nNuc),min_exponent(nNuc,maxL+1),max_exponent(nNuc))
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Read basis set information
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-03-25 09:48:58 +01:00
|
|
|
call read_basis(nNuc,rNuc,nBas,nO,nV,nShell,TotAngMomShell,CenterShell,KShell,DShell,ExpShell, &
|
|
|
|
max_ang_mom,min_exponent,max_exponent)
|
2020-01-22 09:20:18 +01:00
|
|
|
nS(:) = (nO(:) - nC(:))*(nV(:) - nR(:))
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Read auxiliary basis set information
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
! call ReadAuxBasis(nNuc,rNuc,nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell)
|
|
|
|
|
|
|
|
! Compute the number of basis functions
|
|
|
|
|
|
|
|
! call CalcNBasis(nShell,TotAngMomShell,nA)
|
|
|
|
|
|
|
|
! Number of virtual orbitals in complete space
|
|
|
|
|
|
|
|
! nBasCABS = nA - nBas
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Read one- and two-electron integrals
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
! Memory allocation for one- and two-electron integrals
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
allocate(cHF(nBas,nBas,nspin),eHF(nBas,nspin),eG0W0(nBas,nspin),eG0T0(nBas,nspin),PHF(nBas,nBas,nspin), &
|
2020-10-06 14:24:54 +02:00
|
|
|
S(nBas,nBas),T(nBas,nBas),V(nBas,nBas),Hc(nBas,nBas),X(nBas,nBas),ERI_AO(nBas,nBas,nBas,nBas), &
|
2021-02-15 21:44:24 +01:00
|
|
|
dipole_int_AO(nBas,nBas,ncart),dipole_int_MO(nBas,nBas,ncart),Vxc(nBas,nspin))
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Read integrals
|
|
|
|
|
2019-05-07 22:55:36 +02:00
|
|
|
call cpu_time(start_int)
|
|
|
|
|
|
|
|
if(doSph) then
|
|
|
|
|
2020-09-15 10:40:51 +02:00
|
|
|
call read_integrals_sph(nBas,S,T,V,Hc,ERI_AO)
|
2019-05-07 22:55:36 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-09-15 10:40:51 +02:00
|
|
|
call read_integrals(nBas,S,T,V,Hc,ERI_AO)
|
2020-10-21 12:58:37 +02:00
|
|
|
call read_dipole_integrals(nBas,dipole_int_AO)
|
2019-05-07 22:55:36 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
call cpu_time(end_int)
|
|
|
|
|
|
|
|
t_int = end_int - start_int
|
|
|
|
write(*,*)
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for reading integrals = ',t_int,' seconds'
|
|
|
|
write(*,*)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Compute orthogonalization matrix
|
|
|
|
|
|
|
|
call orthogonalization_matrix(ortho_type,nBas,S,X)
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute RHF energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doRHF) then
|
|
|
|
|
2020-10-08 17:19:48 +02:00
|
|
|
! Check that RHF calculation is worth doing...
|
|
|
|
|
|
|
|
if(nO(1) /= nO(2)) then
|
|
|
|
write(*,*) ' !!! The system does not appear to be closed shell !!!'
|
|
|
|
write(*,*)
|
|
|
|
stop
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(start_HF)
|
2020-10-04 09:36:03 +02:00
|
|
|
call RHF(maxSCF_HF,thresh_HF,n_diis_HF,guess_type,nNuc,ZNuc,rNuc,ENuc, &
|
2021-02-15 17:27:06 +01:00
|
|
|
nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,ERHF,eHF,cHF,PHF,Vxc)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_HF)
|
|
|
|
|
|
|
|
t_HF = end_HF - start_HF
|
2019-05-07 22:55:36 +02:00
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RHF = ',t_HF,' seconds'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2020-10-13 13:44:24 +02:00
|
|
|
! Compute UHF energy
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doUHF) then
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
! Switch on the unrestricted flag
|
|
|
|
unrestricted = .true.
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(start_HF)
|
2020-10-27 17:23:48 +01:00
|
|
|
call UHF(maxSCF_HF,thresh_HF,n_diis_HF,guess_type,mix,nNuc,ZNuc,rNuc,ENuc, &
|
2021-02-15 17:27:06 +01:00
|
|
|
nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,EUHF,eHF,cHF,PHF,Vxc)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_HF)
|
|
|
|
|
|
|
|
t_HF = end_HF - start_HF
|
2019-03-19 11:33:49 +01:00
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for UHF = ',t_HF,' seconds'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-10-13 13:44:24 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute KS energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doKS) then
|
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! Switch on the unrestricted flag
|
|
|
|
unrestricted = .true.
|
|
|
|
|
2020-10-13 13:44:24 +02:00
|
|
|
call cpu_time(start_KS)
|
2021-01-31 23:24:25 +01:00
|
|
|
call eDFT(maxSCF_HF,thresh_HF,n_diis_HF,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,nEl,nC, &
|
2021-02-14 22:24:52 +01:00
|
|
|
nO,nV,nR,nShell,TotAngMomShell,CenterShell,KShell,DShell,ExpShell, &
|
2021-02-15 17:27:06 +01:00
|
|
|
max_ang_mom,min_exponent,max_exponent,S,T,V,Hc,X,ERI_AO,dipole_int_AO,EUHF,eHF,cHF,PHF,Vxc)
|
2020-10-14 09:27:42 +02:00
|
|
|
|
2020-10-13 13:44:24 +02:00
|
|
|
call cpu_time(end_KS)
|
|
|
|
|
|
|
|
t_KS = end_KS - start_KS
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for KS = ',t_KS,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Maximum overlap method
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMOM) then
|
|
|
|
|
|
|
|
call cpu_time(start_MOM)
|
2021-05-19 15:11:44 +02:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
! call UMOM()
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call RMOM(maxSCF_HF,thresh_HF,n_diis_HF,guess_type,nNuc,ZNuc,rNuc,ENuc, &
|
|
|
|
nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,ERHF,eHF,cHF,PHF,Vxc)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_MOM)
|
|
|
|
|
|
|
|
t_MOM = end_MOM - start_MOM
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MOM = ',t_MOM,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! AO to MO integral transform for post-HF methods
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2019-05-07 22:55:36 +02:00
|
|
|
call cpu_time(start_AOtoMO)
|
|
|
|
|
2020-03-12 15:04:16 +01:00
|
|
|
write(*,*)
|
|
|
|
write(*,*) 'AO to MO transformation... Please be patient'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-05-07 22:55:36 +02:00
|
|
|
if(doSph) then
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
allocate(ERI_MO(nBas,nBas,nBas,nBas))
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO(:,:,:,:) = ERI_AO(:,:,:,:)
|
2019-05-07 22:55:36 +02:00
|
|
|
print*,'!!! MO = AO !!!'
|
2020-04-16 17:02:01 +02:00
|
|
|
deallocate(ERI_AO)
|
2019-05-07 22:55:36 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-28 21:25:25 +02:00
|
|
|
! Read and transform dipole-related integrals
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
allocate(dipole_int_aa(nBas,nBas,ncart),dipole_int_bb(nBas,nBas,ncart))
|
2020-10-21 12:58:37 +02:00
|
|
|
dipole_int_aa(:,:,:) = dipole_int_AO(:,:,:)
|
|
|
|
dipole_int_bb(:,:,:) = dipole_int_AO(:,:,:)
|
2020-09-28 21:25:25 +02:00
|
|
|
do ixyz=1,ncart
|
2020-09-28 22:58:58 +02:00
|
|
|
call AOtoMO_transform(nBas,cHF(:,:,1),dipole_int_aa(:,:,ixyz))
|
|
|
|
call AOtoMO_transform(nBas,cHF(:,:,2),dipole_int_bb(:,:,ixyz))
|
2020-09-28 21:25:25 +02:00
|
|
|
end do
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
! Memory allocation
|
|
|
|
|
2020-10-05 23:00:56 +02:00
|
|
|
allocate(ERI_MO_aaaa(nBas,nBas,nBas,nBas),ERI_MO_aabb(nBas,nBas,nBas,nBas),ERI_MO_bbbb(nBas,nBas,nBas,nBas))
|
2020-09-18 13:52:35 +02:00
|
|
|
|
|
|
|
! 4-index transform for (aa|aa) block
|
|
|
|
|
2020-09-22 23:08:47 +02:00
|
|
|
bra1 = 1
|
|
|
|
bra2 = 1
|
|
|
|
ket1 = 1
|
|
|
|
ket2 = 1
|
|
|
|
call AOtoMO_integral_transform(bra1,bra2,ket1,ket2,nBas,cHF,ERI_AO,ERI_MO_aaaa)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
2020-09-22 22:13:51 +02:00
|
|
|
! 4-index transform for (aa|bb) block
|
2020-09-18 13:52:35 +02:00
|
|
|
|
2020-09-22 23:08:47 +02:00
|
|
|
bra1 = 1
|
|
|
|
bra2 = 1
|
|
|
|
ket1 = 2
|
|
|
|
ket2 = 2
|
|
|
|
call AOtoMO_integral_transform(bra1,bra2,ket1,ket2,nBas,cHF,ERI_AO,ERI_MO_aabb)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
2020-09-22 22:13:51 +02:00
|
|
|
! 4-index transform for (bb|bb) block
|
2020-09-18 13:52:35 +02:00
|
|
|
|
2020-09-22 23:08:47 +02:00
|
|
|
bra1 = 2
|
|
|
|
bra2 = 2
|
|
|
|
ket1 = 2
|
|
|
|
ket2 = 2
|
|
|
|
call AOtoMO_integral_transform(bra1,bra2,ket1,ket2,nBas,cHF,ERI_AO,ERI_MO_bbbb)
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
else
|
|
|
|
|
|
|
|
! Memory allocation
|
|
|
|
|
|
|
|
allocate(ERI_MO(nBas,nBas,nBas,nBas))
|
2020-09-28 21:25:25 +02:00
|
|
|
|
|
|
|
! Read and transform dipole-related integrals
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
dipole_int_MO(:,:,:) = dipole_int_AO(:,:,:)
|
2020-09-28 21:25:25 +02:00
|
|
|
do ixyz=1,ncart
|
2020-10-21 12:58:37 +02:00
|
|
|
call AOtoMO_transform(nBas,cHF,dipole_int_MO(:,:,ixyz))
|
2020-09-28 21:25:25 +02:00
|
|
|
end do
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
! 4-index transform
|
|
|
|
|
2020-09-22 23:08:47 +02:00
|
|
|
bra1 = 1
|
|
|
|
bra2 = 1
|
|
|
|
ket1 = 1
|
|
|
|
ket2 = 1
|
|
|
|
call AOtoMO_integral_transform(bra1,bra2,ket1,ket2,nBas,cHF,ERI_AO,ERI_MO)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
|
|
|
end if
|
2019-05-07 22:55:36 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
call cpu_time(end_AOtoMO)
|
|
|
|
|
|
|
|
t_AOtoMO = end_AOtoMO - start_AOtoMO
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for AO to MO transformation = ',t_AOtoMO,' seconds'
|
|
|
|
write(*,*)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2021-03-03 11:37:46 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Stability analysis of HF solution
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(dostab) then
|
|
|
|
|
|
|
|
call cpu_time(start_stab)
|
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
call UHF_stability(nBas,nC,nO,nV,nR,nS,eHF,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call RHF_stability(nBas,nC,nO,nV,nR,nS,eHF,ERI_MO)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
call cpu_time(end_stab)
|
|
|
|
|
|
|
|
t_stab = end_stab - start_stab
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for stability analysis = ',t_stab,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MP2 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMP2) then
|
|
|
|
|
|
|
|
call cpu_time(start_MP2)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-22 22:13:51 +02:00
|
|
|
call UMP2(nBas,nC,nO,nV,nR,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,ENuc,EUHF,eHF,EcMP2)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call MP2(nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF,EcMP2)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_MP2)
|
|
|
|
|
|
|
|
t_MP2 = end_MP2 - start_MP2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP2 = ',t_MP2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MP3 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMP3) then
|
|
|
|
|
|
|
|
call cpu_time(start_MP3)
|
2020-09-21 16:54:38 +02:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
write(*,*) 'MP3 NYI for UHF reference'
|
|
|
|
stop
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-10-19 13:57:56 +02:00
|
|
|
call MP3(nBas,nC,nO,nV,nR,ERI_MO,eHF,ENuc,ERHF)
|
2020-09-21 16:54:38 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_MP3)
|
|
|
|
|
|
|
|
t_MP3 = end_MP3 - start_MP3
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP3 = ',t_MP3,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MP2-F12 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMP2F12) then
|
|
|
|
|
|
|
|
call cpu_time(start_MP2F12)
|
2019-03-19 23:02:22 +01:00
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Memory allocation for one- and two-electron integrals
|
2019-03-19 23:02:22 +01:00
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
allocate(F12(nBas,nBas,nBas,nBas),Yuk(nBas,nBas,nBas,nBas),FC(nBas,nBas,nBas,nBas,nBas,nBas))
|
2019-03-19 23:02:22 +01:00
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Read integrals
|
2019-03-19 23:02:22 +01:00
|
|
|
|
2020-04-16 17:02:01 +02:00
|
|
|
call read_F12_integrals(nBas,S,ERI_AO,F12,Yuk,FC)
|
|
|
|
call MP2F12(nBas,nC,nO,nV,ERI_AO,F12,Yuk,FC,ERHF,eHF,cHF)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_MP2F12)
|
|
|
|
|
|
|
|
t_MP2F12 = end_MP2F12 - start_MP2F12
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP2-F12 = ',t_MP2F12,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform CCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doCCD) then
|
|
|
|
|
|
|
|
call cpu_time(start_CCD)
|
2020-06-05 22:34:32 +02:00
|
|
|
call CCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
2020-03-24 12:28:56 +01:00
|
|
|
call cpu_time(end_CCD)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
t_CCD = end_CCD - start_CCD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCD = ',t_CCD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2020-12-04 13:26:08 +01:00
|
|
|
! Perform DCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doDCD) then
|
|
|
|
|
|
|
|
call cpu_time(start_DCD)
|
|
|
|
call DCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
|
|
|
call cpu_time(end_DCD)
|
|
|
|
|
|
|
|
t_DCD = end_DCD - start_DCD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for DCD = ',t_DCD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2019-03-19 10:13:33 +01:00
|
|
|
! Perform CCSD or CCSD(T) calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-01-13 23:08:03 +01:00
|
|
|
if(doCCSDT) doCCSD = .true.
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
if(doCCSD) then
|
|
|
|
|
|
|
|
call cpu_time(start_CCSD)
|
2020-06-05 22:34:32 +02:00
|
|
|
call CCSD(maxSCF_CC,thresh_CC,n_diis_CC,doCCSDT,nBas,nC,nO,nV,nR, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_CCSD)
|
|
|
|
|
|
|
|
t_CCSD = end_CCSD - start_CCSD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCSD or CCSD(T)= ',t_CCSD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2020-03-21 22:50:43 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform direct ring CCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(do_drCCD) then
|
|
|
|
|
|
|
|
call cpu_time(start_CCD)
|
2020-06-05 22:34:32 +02:00
|
|
|
call drCCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
2020-03-21 22:50:43 +01:00
|
|
|
call cpu_time(end_CCD)
|
|
|
|
|
|
|
|
t_CCD = end_CCD - start_CCD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for direct ring CCD = ',t_CCD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2020-01-14 14:44:01 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform ring CCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-03-21 22:50:43 +01:00
|
|
|
if(do_rCCD) then
|
2020-01-14 14:44:01 +01:00
|
|
|
|
|
|
|
call cpu_time(start_CCD)
|
2020-06-05 22:34:32 +02:00
|
|
|
call rCCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
2020-01-14 14:44:01 +01:00
|
|
|
call cpu_time(end_CCD)
|
|
|
|
|
|
|
|
t_CCD = end_CCD - start_CCD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for ring CCD = ',t_CCD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform ladder CCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-03-21 22:50:43 +01:00
|
|
|
if(do_lCCD) then
|
2020-01-14 14:44:01 +01:00
|
|
|
|
|
|
|
call cpu_time(start_CCD)
|
2020-06-05 22:34:32 +02:00
|
|
|
call lCCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,ENuc,ERHF,eHF)
|
2020-01-14 14:44:01 +01:00
|
|
|
call cpu_time(end_CCD)
|
|
|
|
|
|
|
|
t_CCD = end_CCD - start_CCD
|
2020-03-21 22:50:43 +01:00
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for ladder CCD = ',t_CCD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform pair CCD calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(do_pCCD) then
|
|
|
|
|
|
|
|
call cpu_time(start_CCD)
|
2020-11-05 15:51:33 +01:00
|
|
|
call pCCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF)
|
2020-03-21 22:50:43 +01:00
|
|
|
call cpu_time(end_CCD)
|
|
|
|
|
|
|
|
t_CCD = end_CCD - start_CCD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for pair CCD = ',t_CCD,' seconds'
|
2020-01-14 14:44:01 +01:00
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute CIS excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doCIS) then
|
|
|
|
|
|
|
|
call cpu_time(start_CIS)
|
2020-09-24 16:39:15 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-28 21:25:25 +02:00
|
|
|
call UCIS(spin_conserved,spin_flip,nBas,nC,nO,nV,nR,nS,ERI_MO_aaaa,ERI_MO_aabb, &
|
2020-10-05 23:00:56 +02:00
|
|
|
ERI_MO_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
2020-09-24 16:39:15 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
call CIS(singlet,triplet,doCIS_D,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int_MO,eHF)
|
2020-09-24 16:39:15 +02:00
|
|
|
|
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_CIS)
|
|
|
|
|
|
|
|
t_CIS = end_CIS - start_CIS
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CIS = ',t_CIS,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-20 12:28:19 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute CID excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doCID) then
|
|
|
|
|
|
|
|
call cpu_time(start_CID)
|
2020-09-22 23:08:47 +02:00
|
|
|
! call CID(singlet,triplet,nBas,nC,nO,nV,nR,ERI_MO,eHF)
|
2020-04-20 12:28:19 +02:00
|
|
|
call cpu_time(end_CID)
|
|
|
|
|
|
|
|
t_CID = end_CID - start_CID
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CID = ',t_CID,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute CISD excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doCISD) then
|
|
|
|
|
|
|
|
call cpu_time(start_CISD)
|
2020-09-28 21:25:25 +02:00
|
|
|
! call CISD(singlet,triplet,nBas,nC,nO,nV,nR,ERI_MO,eHF)
|
2020-04-20 12:28:19 +02:00
|
|
|
call cpu_time(end_CISD)
|
|
|
|
|
|
|
|
t_CISD = end_CISD - start_CISD
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CISD = ',t_CISD,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2020-01-13 23:08:03 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute (direct) RPA excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doRPA) then
|
|
|
|
|
|
|
|
call cpu_time(start_RPA)
|
2020-09-23 09:46:44 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-10-07 22:51:30 +02:00
|
|
|
call URPA(TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,0d0,nBas,nC,nO,nV,nR,nS,ENuc,EUHF, &
|
2020-10-05 23:00:56 +02:00
|
|
|
ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
2020-09-23 09:46:44 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
call RPA(TDA,doACFDT,exchange_kernel,singlet,triplet,0d0,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,dipole_int_MO,eHF)
|
2020-09-23 09:46:44 +02:00
|
|
|
|
|
|
|
end if
|
2020-01-13 23:08:03 +01:00
|
|
|
call cpu_time(end_RPA)
|
|
|
|
|
|
|
|
t_RPA = end_RPA - start_RPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RPA = ',t_RPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
2020-01-16 21:39:00 +01:00
|
|
|
! Compute RPAx (RPA with exchange) excitations
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-01-14 19:53:52 +01:00
|
|
|
if(doRPAx) then
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-01-14 19:53:52 +01:00
|
|
|
call cpu_time(start_RPAx)
|
2020-09-23 09:46:44 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-24 16:39:15 +02:00
|
|
|
call URPAx(TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,0d0,nBas,nC,nO,nV,nR,nS,ENuc,EUHF, &
|
2020-10-05 23:00:56 +02:00
|
|
|
ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
2020-09-23 09:46:44 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
call RPAx(TDA,doACFDT,exchange_kernel,singlet,triplet,0d0,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,dipole_int_MO,eHF)
|
2020-09-23 09:46:44 +02:00
|
|
|
|
|
|
|
end if
|
2020-01-14 19:53:52 +01:00
|
|
|
call cpu_time(end_RPAx)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-01-14 19:53:52 +01:00
|
|
|
t_RPAx = end_RPAx - start_RPAx
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for RPAx = ',t_RPAx,' seconds'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2019-10-05 23:09:20 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute pp-RPA excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doppRPA) then
|
|
|
|
|
|
|
|
call cpu_time(start_ppRPA)
|
2020-09-28 21:25:25 +02:00
|
|
|
call ppRPA(singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI_MO,eHF)
|
2019-10-05 23:09:20 +02:00
|
|
|
call cpu_time(end_ppRPA)
|
|
|
|
|
|
|
|
t_ppRPA = end_ppRPA - start_ppRPA
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for pp-RPA = ',t_ppRPA,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute ADC excitations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-04-20 12:28:19 +02:00
|
|
|
! if(doADC) then
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-20 12:28:19 +02:00
|
|
|
! call cpu_time(start_ADC)
|
2020-09-22 23:08:47 +02:00
|
|
|
! call ADC(singlet,triplet,maxSCF_GF,thresh_GF,n_diis_GF, &
|
2020-06-05 22:34:32 +02:00
|
|
|
! nBas,nC,nO,nV,nR,eHF,ERI_MO)
|
2020-04-20 12:28:19 +02:00
|
|
|
! call cpu_time(end_ADC)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-20 12:28:19 +02:00
|
|
|
! t_ADC = end_ADC - start_ADC
|
|
|
|
! write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for ADC = ',t_ADC,' seconds'
|
|
|
|
! write(*,*)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-20 12:28:19 +02:00
|
|
|
! end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2020-03-19 10:21:18 +01:00
|
|
|
! Compute G0F2 electronic binding energies
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
if(doG0F2) then
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
call cpu_time(start_GF2)
|
2021-03-08 17:00:05 +01:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
call UG0F2(BSE,TDA,dBSE,dTDA,evDyn,spin_conserved,spin_flip,linGF,eta_GF,nBas,nC,nO,nV,nR,nS,ENuc,EUHF, &
|
|
|
|
S,ERI_AO,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_aa,dipole_int_bb,eHF)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call G0F2(BSE,TDA,dBSE,dTDA,evDyn,singlet,triplet,linGF, &
|
|
|
|
eta_GF,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,dipole_int_MO,eHF)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_GF2)
|
|
|
|
|
|
|
|
t_GF2 = end_GF2 - start_GF2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for GF2 = ',t_GF2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2020-03-19 10:21:18 +01:00
|
|
|
! Compute evGF2 electronic binding energies
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
if(doevGF2) then
|
|
|
|
|
|
|
|
call cpu_time(start_GF2)
|
2021-03-08 20:09:54 +01:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
call evUGF2(maxSCF_GF,thresh_GF,n_diis_GF,BSE,TDA,dBSE,dTDA,evDyn,spin_conserved,spin_flip, &
|
|
|
|
eta_GF,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S,ERI_AO,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb, &
|
|
|
|
dipole_int_aa,dipole_int_bb,cHF,eHF)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call evGF2(BSE,TDA,dBSE,dTDA,evDyn,maxSCF_GF,thresh_GF,n_diis_GF, &
|
|
|
|
singlet,triplet,linGF,eta_GF,nBas,nC,nO,nV,nR,nS,ENuc,ERHF, &
|
|
|
|
ERI_MO,dipole_int_MO,eHF)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
call cpu_time(end_GF2)
|
|
|
|
|
|
|
|
t_GF2 = end_GF2 - start_GF2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for GF2 = ',t_GF2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2021-03-05 22:34:48 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform qsGF2 calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doqsGF2) then
|
|
|
|
|
|
|
|
call cpu_time(start_GF2)
|
|
|
|
|
2021-03-07 23:04:47 +01:00
|
|
|
if(unrestricted) then
|
|
|
|
|
|
|
|
call qsUGF2(maxSCF_GF,thresh_GF,n_diis_GF,BSE,TDA,dBSE,dTDA,evDyn,spin_conserved,spin_flip,eta_GF, &
|
|
|
|
nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO,nV,nR,nS,EUHF,S,X,T,V,Hc,ERI_AO, &
|
|
|
|
ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_AO,dipole_int_aa,dipole_int_bb,PHF,cHF,eHF)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call qsGF2(maxSCF_GF,thresh_GF,n_diis_GF,BSE,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta_GF,nNuc,ZNuc,rNuc,ENuc, &
|
|
|
|
nBas,nC,nO,nV,nR,nS,ERHF,S,X,T,V,Hc,ERI_AO,ERI_MO,dipole_int_AO,dipole_int_MO,PHF,cHF,eHF)
|
|
|
|
|
|
|
|
end if
|
2021-03-05 22:34:48 +01:00
|
|
|
|
|
|
|
call cpu_time(end_GF2)
|
|
|
|
|
|
|
|
t_GF2 = end_GF2 - start_GF2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for qsGF2 = ',t_GF2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute G0F3 electronic binding energies
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doG0F3) then
|
|
|
|
|
|
|
|
call cpu_time(start_GF3)
|
2020-06-05 22:34:32 +02:00
|
|
|
call G0F3(renormGF,nBas,nC,nO,nV,nR,ERI_MO,eHF)
|
2020-03-19 10:21:18 +01:00
|
|
|
call cpu_time(end_GF3)
|
|
|
|
|
|
|
|
t_GF3 = end_GF3 - start_GF3
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for GF3 = ',t_GF3,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute evGF3 electronic binding energies
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doevGF3) then
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
call cpu_time(start_GF3)
|
2020-06-05 22:34:32 +02:00
|
|
|
call evGF3(maxSCF_GF,thresh_GF,n_diis_GF,renormGF,nBas,nC,nO,nV,nR,ERI_MO,eHF)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_GF3)
|
|
|
|
|
|
|
|
t_GF3 = end_GF3 - start_GF3
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for GF3 = ',t_GF3,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform G0W0 calculatiom
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
eG0W0(:,:) = eHF(:,:)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
if(doG0W0) then
|
|
|
|
|
|
|
|
call cpu_time(start_G0W0)
|
2020-09-18 13:52:35 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
call UG0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,spin_conserved,spin_flip, &
|
2021-02-15 17:27:06 +01:00
|
|
|
linGW,eta_GW,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S,ERI_AO,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb, &
|
|
|
|
dipole_int_aa,dipole_int_bb,PHF,cHF,eHF,Vxc,eG0W0)
|
2020-09-18 13:52:35 +02:00
|
|
|
else
|
|
|
|
|
2020-09-25 15:05:06 +02:00
|
|
|
call G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
2021-02-15 17:27:06 +01:00
|
|
|
linGW,eta_GW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
2020-09-18 13:52:35 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_G0W0)
|
|
|
|
|
|
|
|
t_G0W0 = end_G0W0 - start_G0W0
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for G0W0 = ',t_G0W0,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform evGW calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doevGW) then
|
|
|
|
|
|
|
|
call cpu_time(start_evGW)
|
2020-09-24 22:50:56 +02:00
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
call evUGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA, &
|
|
|
|
G0W,GW0,dBSE,dTDA,evDyn,spin_conserved,spin_flip,eta_GW,nBas,nC,nO,nV,nR,nS,ENuc, &
|
2021-02-15 17:27:06 +01:00
|
|
|
EUHF,S,ERI_AO,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_aa,dipole_int_bb, &
|
|
|
|
PHF,cHF,eHF,Vxc,eG0W0)
|
2020-09-24 22:50:56 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call evGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX, &
|
|
|
|
BSE,TDA_W,TDA,G0W,GW0,dBSE,dTDA,evDyn,singlet,triplet,eta_GW, &
|
2021-02-15 17:27:06 +01:00
|
|
|
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
2020-09-24 22:50:56 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_evGW)
|
|
|
|
|
|
|
|
t_evGW = end_evGW - start_evGW
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for evGW = ',t_evGW,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform qsGW calculation
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doqsGW) then
|
|
|
|
|
|
|
|
call cpu_time(start_qsGW)
|
2020-10-21 12:09:18 +02:00
|
|
|
|
|
|
|
if(unrestricted) then
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
call qsUGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|
|
|
G0W,GW0,dBSE,dTDA,evDyn,spin_conserved,spin_flip,eta_GW,nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO, &
|
|
|
|
nV,nR,nS,EUHF,S,X,T,V,Hc,ERI_AO,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,dipole_int_AO, &
|
|
|
|
dipole_int_aa,dipole_int_bb,PHF,cHF,eHF)
|
2020-10-21 12:09:18 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-10-21 12:58:37 +02:00
|
|
|
call qsGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX, &
|
|
|
|
BSE,TDA_W,TDA,G0W,GW0,dBSE,dTDA,evDyn,singlet,triplet,eta_GW,nNuc,ZNuc,rNuc,ENuc, &
|
|
|
|
nBas,nC,nO,nV,nR,nS,ERHF,S,X,T,V,Hc,ERI_AO,ERI_MO,dipole_int_AO,dipole_int_MO,PHF,cHF,eHF)
|
2020-10-21 12:09:18 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_qsGW)
|
|
|
|
|
|
|
|
t_qsGW = end_qsGW - start_qsGW
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for qsGW = ',t_qsGW,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
2019-10-16 18:14:47 +02:00
|
|
|
! Perform G0T0 calculatiom
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
eG0T0(:,:) = eHF(:,:)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2019-10-16 18:14:47 +02:00
|
|
|
if(doG0T0) then
|
|
|
|
|
|
|
|
call cpu_time(start_G0T0)
|
2021-02-16 10:00:01 +01:00
|
|
|
call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
|
|
|
linGW,eta_GW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
|
|
|
PHF,cHF,eHF,Vxc,eG0T0)
|
2019-10-16 18:14:47 +02:00
|
|
|
call cpu_time(end_G0T0)
|
|
|
|
|
|
|
|
t_G0T0 = end_G0T0 - start_G0T0
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for G0T0 = ',t_G0T0,' seconds'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-13 14:19:14 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Perform evGT calculatiom
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doevGT) then
|
|
|
|
|
|
|
|
call cpu_time(start_evGT)
|
2020-09-28 21:25:25 +02:00
|
|
|
call evGT(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS, &
|
|
|
|
BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta_GW, &
|
2021-02-16 10:00:01 +01:00
|
|
|
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
|
|
|
PHF,cHF,eHF,Vxc,eG0T0)
|
2020-04-13 14:19:14 +02:00
|
|
|
call cpu_time(end_evGT)
|
|
|
|
|
|
|
|
t_evGT = end_evGT - start_evGT
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for evGT = ',t_evGT,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Information for Monte Carlo calculations
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMCMP2 .or. doMinMCMP2) then
|
|
|
|
|
|
|
|
! Print simulation details
|
|
|
|
|
|
|
|
write(*,'(A32)') '----------------------'
|
|
|
|
write(*,'(A32,1X,I16)') 'Number of Monte Carlo steps',nMC
|
|
|
|
write(*,'(A32,1X,I16)') 'Number of equilibration steps',nEq
|
|
|
|
write(*,'(A32,1X,I16)') 'Number of walkers',nWalk
|
|
|
|
write(*,'(A32,1X,F16.10)') 'Initial time step',dt
|
|
|
|
write(*,'(A32,1X,I16)') 'Frequency of ouput',nPrint
|
|
|
|
write(*,'(A32,1X,I16)') 'Seed for random number generator',iSeed
|
|
|
|
write(*,'(A32)') '----------------------'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
! Initialize random number generator
|
|
|
|
|
|
|
|
call initialize_random_generator(iSeed)
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Type of weight function
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! TrialType = 0 => HF density
|
|
|
|
! TrialType = 1 => Custom one-electron function
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
TrialType = 0
|
|
|
|
allocate(cTrial(nBas),gradient(nBas),hessian(nBas,nBas))
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MC-MP2 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMCMP2) then
|
|
|
|
|
|
|
|
call cpu_time(start_MCMP2)
|
2021-02-15 17:27:06 +01:00
|
|
|
! call MCMP2(doDrift,nBas,nC,nO,nV,cHF,eHF,EcMP2, &
|
|
|
|
! nMC,nEq,nWalk,dt,nPrint, &
|
|
|
|
! nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell, &
|
|
|
|
! Norm,EcMCMP2,Err_EcMCMP2,Var_EcMCMP2)
|
2019-03-19 10:13:33 +01:00
|
|
|
call cpu_time(end_MCMP2)
|
|
|
|
|
|
|
|
t_MCMP2 = end_MCMP2 - start_MCMP2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MC-MP2 = ',t_MCMP2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Minimize MC-MP2 variance
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMinMCMP2) then
|
|
|
|
|
|
|
|
call cpu_time(start_MinMCMP2)
|
|
|
|
! call MinMCMP2(nBas,nEl,nC,nO,nV,cHF,eHF,EcMP2, &
|
|
|
|
! nMC,nEq,nWalk,dt,nPrint, &
|
|
|
|
! nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell, &
|
|
|
|
! TrialType,Norm,cTrial,gradient,hessian)
|
|
|
|
call cpu_time(end_MinMCMP2)
|
|
|
|
|
|
|
|
t_MinMCMP2 = end_MinMCMP2 - start_MinMCMP2
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MC-MP2 variance minimization = ',t_MinMCMP2,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2020-04-16 17:02:01 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Range-separeted GT/GW
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! if(doGTGW) then
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! ! Read and transform long-range two-electron integrals
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! allocate(ERI_ERF_AO(nBas,nBas,nBas,nBas),ERI_ERF_MO(nBas,nBas,nBas,nBas))
|
|
|
|
! call read_LR(nBas,ERI_ERF_AO)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! call cpu_time(start_AOtoMO)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! write(*,*)
|
|
|
|
! write(*,*) 'AO to MO transformation for long-range ERIs... Please be patient'
|
|
|
|
! write(*,*)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! call AOtoMO_integral_transform(nBas,cHF,ERI_ERF_AO,ERI_ERF_MO)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! call cpu_time(end_AOtoMO)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! deallocate(ERI_ERF_AO)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! t_AOtoMO = end_AOtoMO - start_AOtoMO
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for AO to MO transformation = ',t_AOtoMO,' seconds'
|
|
|
|
! write(*,*)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! ! Long-range G0W0 calculation
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! call cpu_time(start_G0W0)
|
|
|
|
! call G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|
|
|
! dBSE,dTDA,evDyn,singlet,triplet,linGW,eta_GW, &
|
|
|
|
! nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_ERF_MO,dipole_int_MO,eHF,eG0W0)
|
|
|
|
! call cpu_time(end_G0W0)
|
|
|
|
!
|
|
|
|
! t_G0W0 = end_G0W0 - start_G0W0
|
|
|
|
! write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for G0W0 = ',t_G0W0,' seconds'
|
|
|
|
! write(*,*)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! ! Short-range G0T0 calculation
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! ERI_ERF_MO(:,:,:,:) = ERI_MO(:,:,:,:) - ERI_ERF_MO(:,:,:,:)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! call cpu_time(start_G0T0)
|
|
|
|
! call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn, &
|
|
|
|
! singlet,triplet,linGW,eta_GW, &
|
|
|
|
! nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_ERF_MO,dipole_int_MO,eHF,eG0T0)
|
|
|
|
! call cpu_time(end_G0T0)
|
|
|
|
!
|
|
|
|
! t_G0T0 = end_G0T0 - start_G0T0
|
|
|
|
! write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for G0T0 = ',t_G0T0,' seconds'
|
|
|
|
! write(*,*)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2020-09-18 13:52:35 +02:00
|
|
|
! call matout(nBas,1,(eG0W0+eG0T0-eHF(:,1))*HaToeV)
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2021-02-15 17:27:06 +01:00
|
|
|
! end if
|
2020-04-16 17:02:01 +02:00
|
|
|
|
2019-07-09 16:17:10 +02:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Basis set correction
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
2019-09-20 22:28:01 +02:00
|
|
|
doBas = .false.
|
2019-07-09 16:17:10 +02:00
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
if(doBas) then
|
2019-07-09 16:17:10 +02:00
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
call cpu_time(start_Bas)
|
|
|
|
call basis_correction(nBas,nO,nShell,CenterShell,TotAngMomShell,KShell,DShell,ExpShell, &
|
2020-04-16 17:02:01 +02:00
|
|
|
ERI_MO,eHF,cHF,PHF,eG0W0)
|
2019-07-09 23:09:32 +02:00
|
|
|
call cpu_time(end_Bas)
|
2019-07-09 16:17:10 +02:00
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
t_Bas = end_Bas - start_Bas
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for basis set correction = ',t_Bas,' seconds'
|
|
|
|
write(*,*)
|
2019-07-09 16:17:10 +02:00
|
|
|
|
2019-07-09 23:09:32 +02:00
|
|
|
end if
|
2020-04-14 15:59:34 +02:00
|
|
|
|
2021-03-08 17:00:05 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute FCI
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doFCI) then
|
|
|
|
|
|
|
|
call cpu_time(start_FCI)
|
|
|
|
call FCI(nBas,nC,nO,nV,nR,ERI_MO,eHF)
|
|
|
|
call cpu_time(end_FCI)
|
|
|
|
|
|
|
|
t_FCI = end_FCI - start_FCI
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for FCI = ',t_FCI,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! End of QuAcK
|
|
|
|
!------------------------------------------------------------------------
|
2019-04-24 18:00:54 +02:00
|
|
|
|
|
|
|
call cpu_time(end_QuAcK)
|
|
|
|
|
|
|
|
t_QuAcK = end_QuAcK - start_QuAcK
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for QuAcK = ',t_QuAcK,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
end program QuAcK
|