4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 06:33:55 +01:00

CCSD under progress

This commit is contained in:
Pierre-Francois Loos 2019-03-15 21:47:34 +01:00
parent 5f015026e4
commit 9053823050
6 changed files with 64 additions and 32 deletions

View File

@ -1,9 +1,7 @@
1 3
1 2
S 3 1.00
38.3600000 0.0238090
5.7700000 0.1548910
1.2400000 0.4699870
38.4216340 0.0237660
5.7780300 0.1546790
1.2417740 0.4696300
S 1 1.00
0.2976000 1.0000000
P 1 1.00
1.2750000 1.0000000
0.2979640 1.0000000

View File

@ -1,5 +1,5 @@
# RHF: maxSCF thresh DIIS n_diis guess_type ortho_type
32 0.0000001 T 5 1 1
64 0.0000001 T 5 1 1
# MP:
# CIS/TDHF: singlet triplet

View File

@ -1,9 +1,7 @@
1 3
1 2
S 3 1.00
38.3600000 0.0238090
5.7700000 0.1548910
1.2400000 0.4699870
38.4216340 0.0237660
5.7780300 0.1546790
1.2417740 0.4696300
S 1 1.00
0.2976000 1.0000000
P 1 1.00
1.2750000 1.0000000
0.2979640 1.0000000

View File

@ -5,7 +5,7 @@ program MCQC
logical :: doHF,doMOM
logical :: doMP2,doMP3,doMP2F12
logical :: doCC
logical :: doCCD,doCCSD,doCCSDT
logical :: doCIS,doTDHF,doADC
logical :: doGF2,doGF3
logical :: doG0W0,doevGW,doqsGW
@ -14,6 +14,7 @@ program MCQC
integer :: nNuc,nBas,nBasCABS,nEl,nC,nO,nV,nR,nS
double precision :: ENuc,ERHF,Norm
double precision :: EcMP2(3),EcMP3,EcMP2F12(3),EcMCMP2(3),Err_EcMCMP2(3),Var_EcMCMP2(3)
double precision :: EcCCD,EcCCSD,EcCCSDT
double precision,allocatable :: ZNuc(:),rNuc(:,:),cHF(:,:),eHF(:),eG0W0(:),PHF(:,:)
@ -30,7 +31,9 @@ program MCQC
double precision :: start_HF ,end_HF ,t_HF
double precision :: start_MOM ,end_MOM ,t_MOM
double precision :: start_CC ,end_CC ,t_CC
double precision :: start_CCD ,end_CCD ,t_CCD
double precision :: start_CCSD ,end_CCSD ,t_CCSD
double precision :: start_CCSDT ,end_CCSDT ,t_CCSDT
double precision :: start_CIS ,end_CIS ,t_CIS
double precision :: start_TDHF ,end_TDHF ,t_TDHF
double precision :: start_ADC ,end_ADC ,t_ADC
@ -80,7 +83,7 @@ program MCQC
call read_methods(doHF,doMOM, &
doMP2,doMP3,doMP2F12, &
doCC, &
doCCD,doCCSD,doCCSDT, &
doCIS,doTDHF,doADC, &
doGF2,doGF3, &
doG0W0,doevGW,doqsGW, &
@ -199,6 +202,7 @@ program MCQC
! AO to MO integral transform for post-HF methods
!------------------------------------------------------------------------
call chem_to_phys_ERI(nBas,ERI_AO_basis)
call AOtoMO_integral_transform(nBas,cHF,ERI_AO_basis,ERI_MO_basis)
!------------------------------------------------------------------------
@ -253,22 +257,50 @@ program MCQC
write(*,*)
endif
!------------------------------------------------------------------------
! Perform CC calculation
! Perform CCD calculation
!------------------------------------------------------------------------
if(doCC) then
if(doCCD) then
call cpu_time(start_CC)
call CCD(nBas,nEl,ERI_MO_basis,ENuc,ERHF,eHF,cHF)
call cpu_time(end_CC)
call cpu_time(start_CCD)
call CCD(nBas,nEl,ERI_MO_basis,ENuc,ERHF,eHF,cHF,EcCCD)
call cpu_time(end_CCD)
t_CC = end_CC - start_CC
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CC = ',t_CC,' seconds'
t_CCD = end_CCD - start_CCD
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCD = ',t_CCD,' seconds'
write(*,*)
endif
!------------------------------------------------------------------------
! Perform CCSD or CCSD(T) calculation
!------------------------------------------------------------------------
if(doCCSD) then
call cpu_time(start_CCSD)
call CCSD(nBas,nEl,ERI_MO_basis,ENuc,ERHF,eHF,cHF,EcCCSD)
call cpu_time(end_CCSD)
if(doCCSDT) then
call cpu_time(start_CCSDT)
! call CCSDT(nBas,nEl,ERI_MO_basis,ENuc,ERHF,EcCCSD,eHF,cHF,EcCCSDT)
call cpu_time(end_CCSDT)
t_CCSDT = end_CCSDT - start_CCSDT
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for (T) = ',t_CCSDT,' seconds'
write(*,*)
end if
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
!------------------------------------------------------------------------
! Compute CIS excitations
!------------------------------------------------------------------------

View File

@ -38,11 +38,11 @@ subroutine MP2(nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
eps = e(i) + e(j) - e(a) - e(b)
! Secon-order ring diagram
! Second-order ring diagram
E2a = E2a + ERI(i,j,a,b)*ERI(i,j,a,b)/eps
! Second-order exchange
! Second-order exchange diagram
E2b = E2b + ERI(i,j,a,b)*ERI(i,j,b,a)/eps

View File

@ -1,6 +1,6 @@
subroutine read_methods(doHF,doMOM, &
doMP2,doMP3,doMP2F12, &
doCC, &
doCCD,doCCSD,doCCSDT, &
doCIS,doTDHF,doADC, &
doGF2,doGF3, &
doG0W0,doevGW,doqsGW, &
@ -14,7 +14,7 @@ subroutine read_methods(doHF,doMOM, &
logical,intent(out) :: doHF,doMOM
logical,intent(out) :: doMP2,doMP3,doMP2F12
logical,intent(out) :: doCC
logical,intent(out) :: doCCD,doCCSD,doCCSDT
logical,intent(out) :: doCIS,doTDHF,doADC
logical,intent(out) :: doGF2,doGF3
logical,intent(out) :: doG0W0,doevGW,doqsGW
@ -37,7 +37,9 @@ subroutine read_methods(doHF,doMOM, &
doMP3 = .false.
doMP2F12 = .false.
doCC = .false.
doCCD = .false.
doCCSD = .false.
doCCSDT = .false.
doCIS = .false.
doTDHF = .false.
@ -70,8 +72,10 @@ subroutine read_methods(doHF,doMOM, &
! Read CC methods
read(1,*)
read(1,*) answer1
if(answer1 == 'T') doCC = .true.
read(1,*) answer1,answer2,answer3
if(answer1 == 'T') doCCD = .true.
if(answer2 == 'T') doCCSD = .true.
if(answer3 == 'T') doCCSDT = .true.
! Read excited state methods