From ac5955ab273afd20b9d7a56e52dc912d47845ac5 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Sat, 6 Nov 2021 14:36:54 +0100 Subject: [PATCH] fix print in CCSD --- input/methods | 10 +++++----- input/options | 4 ++-- mol/dinitrogen.xyz | 2 +- mol/h2.xyz | 6 +++--- scripts/scan_H2.sh | 15 +++++++-------- src/CC/CCSD.f90 | 8 +++++--- src/LR/linear_response_pp.f90 | 4 ++-- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/input/methods b/input/methods index 4879570..67ab225 100644 --- a/input/methods +++ b/input/methods @@ -1,9 +1,9 @@ # RHF UHF KS MOM - F F T F + T F F F # MP2* MP3 MP2-F12 F F F # CCD DCD CCSD CCSD(T) - F F F F + F F T F # drCCD rCCD lCCD pCCD F F F F # CIS* CIS(D) CID CISD FCI @@ -11,11 +11,11 @@ # RPA* RPAx* ppRPA F F F # G0F2* evGF2* qsGF2* G0F3 evGF3 - F F F F F + T F F F F # G0W0* evGW* qsGW* ufG0W0 ufGW - F F F F F + T F F F F # G0T0 evGT qsGT - F F F + T F F # MCMP2 F # * unrestricted version available diff --git a/input/options b/input/options index 061ca17..a4093ba 100644 --- a/input/options +++ b/input/options @@ -7,9 +7,9 @@ # spin: TDA singlet triplet spin_conserved spin_flip F T T T T # GF: maxSCF thresh DIIS n_diis lin eta renorm - 256 0.00001 T 5 T 0.0 3 + 256 0.00001 T 5 T 0.00367493 3 # GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 - 256 0.00001 T 5 T 0.0 F F F F F + 256 0.00001 T 5 T 0.00367493 F F F F F # ACFDT: AC Kx XBS F F T # BSE: BSE dBSE dTDA evDyn diff --git a/mol/dinitrogen.xyz b/mol/dinitrogen.xyz index 9cc520f..27ef551 100644 --- a/mol/dinitrogen.xyz +++ b/mol/dinitrogen.xyz @@ -1,4 +1,4 @@ 2 -Dinitrogen,^1 Sigma_g,CC3,aug-cc-pVTZ + N 0.00000000 0.00000000 0.55038998 N 0.00000000 0.00000000 -0.55038998 diff --git a/mol/h2.xyz b/mol/h2.xyz index 6a4e902..6b9263f 100644 --- a/mol/h2.xyz +++ b/mol/h2.xyz @@ -1,4 +1,4 @@ 2 - -H 0.0 0.0 0.0 -H 0.0 0.0 0.7 + +H 0. 0. 0. +H 0. 0. 0.740848 diff --git a/scripts/scan_H2.sh b/scripts/scan_H2.sh index 0d4103a..02efa4a 100755 --- a/scripts/scan_H2.sh +++ b/scripts/scan_H2.sh @@ -3,17 +3,16 @@ MOL="H2" BASIS="cc-pvdz" R_START=1.0 -R_END=2.4 +R_END=2.0 DR=0.1 for R in $(seq $R_START $DR $R_END) do - echo "# nAt nEla nElb nCore nRyd" > examples/molecule.$MOL - echo " 2 1 1 0 0" >> examples/molecule.$MOL - echo "# Znuc x y z" >> examples/molecule.$MOL - echo " H 0. 0. 0." >> examples/molecule.$MOL - echo " H 0. 0. $R" >> examples/molecule.$MOL - ./GoDuck $MOL $BASIS > ${MOL}_${BASIS}_${R}.out - echo $R `./extract.sh ${MOL}_${BASIS}_${R}.out | tail -4 | head -1` + echo "2" > mol/${MOL}.xyz + echo " " >> mol/${MOL}.xyz + echo "H 0. 0. 0." >> mol/${MOL}.xyz + echo "H 0. 0. $(printf %f $R)" >> mol/${MOL}.xyz + ./GoDuck -x $MOL -b $BASIS -m 1 > ${MOL}_${BASIS}_$R.out +### echo $R `./extract.sh ${MOL}_${BASIS}_$(printf %f $R).out | tail -4 | head -1` done diff --git a/src/CC/CCSD.f90 b/src/CC/CCSD.f90 index 8936721..7707659 100644 --- a/src/CC/CCSD.f90 +++ b/src/CC/CCSD.f90 @@ -32,7 +32,8 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN integer :: nSCF double precision :: Conv double precision :: EcMP2 - double precision :: ECCSD,EcCCSD + double precision :: ECCSD + double precision :: EcCCSD double precision :: EcCCT double precision,allocatable :: seHF(:) @@ -166,6 +167,7 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN Conv = 1d0 nSCF = 0 + ECCSD = ERHF n_diis = 0 t1_diis(:,:) = 0d0 @@ -262,7 +264,7 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN write(*,*)'----------------------------------------------------' write(*,*)' CCSD energy ' write(*,*)'----------------------------------------------------' - write(*,'(1X,A20,1X,F15.10)')' E(CCSD) = ',ECCSD + write(*,'(1X,A20,1X,F15.10)')' E(CCSD) = ',ENuc+ECCSD write(*,'(1X,A20,1X,F10.6)')' Ec(CCSD) = ',EcCCSD write(*,*)'----------------------------------------------------' write(*,*) @@ -293,7 +295,7 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN write(*,*)'----------------------------------------------------' write(*,*)' CCSD(T) energy ' write(*,*)'----------------------------------------------------' - write(*,'(1X,A20,1X,F15.10)')' E(CCSD(T)) = ',ECCSD + EcCCT + write(*,'(1X,A20,1X,F15.10)')' E(CCSD(T)) = ',ENuc + ECCSD + EcCCT write(*,'(1X,A20,1X,F10.6)')' Ec(CCSD(T)) = ',EcCCSD + EcCCT write(*,*)'----------------------------------------------------' write(*,*) diff --git a/src/LR/linear_response_pp.f90 b/src/LR/linear_response_pp.f90 index 473e303..2d9873b 100644 --- a/src/LR/linear_response_pp.f90 +++ b/src/LR/linear_response_pp.f90 @@ -52,9 +52,9 @@ subroutine linear_response_pp(ispin,TDA,nBas,nC,nO,nV,nR,nOO,nVV,lambda,e,ERI,Om ! Solve the p-p eigenproblem ! !-------------------------------------------------! ! ! -! | C -B | | X1 X2 | | w1 0 | | X1 X2 | ! +! | C B | | X1 X2 | | w1 0 | | X1 X2 | ! ! | | | | = | | | | ! -! | Bt -D | | Y1 Y2 | | 0 w2 | | Y1 Y2 | ! +! | -Bt -D | | Y1 Y2 | | 0 w2 | | Y1 Y2 | ! ! ! !-------------------------------------------------!