mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2025-01-03 10:05:44 +01:00
Removed tau
This commit is contained in:
parent
10ae28d78d
commit
3e6b874f9e
@ -36,8 +36,6 @@ subroutine CCSD
|
||||
double precision,allocatable :: r1(:,:)
|
||||
double precision,allocatable :: r2(:,:,:,:)
|
||||
|
||||
double precision,allocatable :: tau(:,:,:,:)
|
||||
|
||||
! Hello world
|
||||
|
||||
write(*,*)
|
||||
@ -62,10 +60,6 @@ subroutine CCSD
|
||||
nBas2 = spin_mo_num
|
||||
|
||||
|
||||
! Guess amplitudes
|
||||
|
||||
allocate(tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num))
|
||||
|
||||
! Initialization
|
||||
|
||||
allocate(cFvv(spin_vir_num,spin_vir_num),cFoo(spin_occ_num,spin_occ_num),cFov(spin_occ_num,spin_vir_num), &
|
||||
@ -75,9 +69,7 @@ subroutine CCSD
|
||||
Conv = 1d0
|
||||
nSCF = 0
|
||||
|
||||
call form_tau_nc (tau)
|
||||
|
||||
EcMP2 = 0.25d0*u_dot_v(OOVV,tau,size(OOVV))
|
||||
EcMP2 = 0.25d0*u_dot_v(OOVV,tau_cc,size(OOVV))
|
||||
write(*,'(1X,A10,1X,F10.6)') 'Ec(MP2) = ',EcMP2
|
||||
write(*,'(1X,A10,1X,F10.6)') 'E (MP2) = ',EcMP2 + ERHF
|
||||
|
||||
@ -104,15 +96,14 @@ subroutine CCSD
|
||||
spin_fock_matrix_mo_vv, &
|
||||
cFoo,cFov,cFvv)
|
||||
|
||||
call form_cw_nc (tau, &
|
||||
cWoooo,cWovvo,cWvvvv)
|
||||
call form_cw_nc (cWoooo,cWovvo,cWvvvv)
|
||||
|
||||
! Compute residuals
|
||||
|
||||
call form_r1_nc(spin_fock_matrix_mo_ov, &
|
||||
cFoo,cFov,cFvv,r1)
|
||||
|
||||
call form_r2_nc(tau,cFoo,cFov,cFvv, &
|
||||
call form_r2_nc(cFoo,cFov,cFvv, &
|
||||
cWoooo,cWvvvv,cWovvo,r2)
|
||||
|
||||
! Check convergence
|
||||
@ -125,8 +116,6 @@ subroutine CCSD
|
||||
t2_cc(:,:,:,:) = t2_cc(:,:,:,:) - r2(:,:,:,:)/delta_OOVV(:,:,:,:)
|
||||
TOUCH t1_cc t2_cc
|
||||
|
||||
call form_tau_nc (tau)
|
||||
|
||||
! Compute correlation energy
|
||||
|
||||
call CCSD_Ec_nc(spin_fock_matrix_mo_ov,EcCCSD)
|
||||
@ -163,7 +152,6 @@ subroutine CCSD
|
||||
deallocate( &
|
||||
cFvv,cFoo,cFov, &
|
||||
cWoooo,cWvvvv,cWovvo, &
|
||||
tau, &
|
||||
r1,r2)
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
|
@ -1,13 +1,9 @@
|
||||
subroutine form_cW_nc(tau,cWoooo,cWovvo,cWvvvv)
|
||||
subroutine form_cW_nc(cWoooo,cWovvo,cWvvvv)
|
||||
|
||||
! Compute W terms in CCSD
|
||||
|
||||
implicit none
|
||||
|
||||
! Input variables
|
||||
|
||||
double precision,intent(in) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: i,j,m,n
|
||||
@ -42,7 +38,7 @@ subroutine form_cW_nc(tau,cWoooo,cWovvo,cWvvvv)
|
||||
do e=1,spin_vir_num
|
||||
do j=1,spin_occ_num
|
||||
do i=1,spin_occ_num
|
||||
x = 0.25d0*tau(i,j,e,f)
|
||||
x = 0.25d0*tau_cc(i,j,e,f)
|
||||
do n=1,spin_occ_num
|
||||
do m=1,spin_occ_num
|
||||
cWoooo(m,n,i,j) = cWoooo(m,n,i,j) + x*OOVV(m,n,e,f)
|
||||
@ -119,7 +115,7 @@ subroutine form_cW_nc(tau,cWoooo,cWovvo,cWvvvv)
|
||||
x = 0.d0
|
||||
do n=1,spin_occ_num
|
||||
do m=1,spin_occ_num
|
||||
x = x + tau(m,n,a,b)*OOVV(m,n,e,f)
|
||||
x = x + tau_cc(m,n,a,b)*OOVV(m,n,e,f)
|
||||
end do
|
||||
end do
|
||||
cWvvvv(a,b,e,f) = cWvvvv(a,b,e,f) + 0.25d0*x
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine form_r2_nc(tau,cFoo,cFov,cFvv,cWoooo,cWvvvv,cWovvo,r2)
|
||||
subroutine form_r2_nc(cFoo,cFov,cFvv,cWoooo,cWvvvv,cWovvo,r2)
|
||||
|
||||
! Form t2 residues in non-canonical CCSD
|
||||
|
||||
@ -14,7 +14,6 @@ subroutine form_r2_nc(tau,cFoo,cFov,cFvv,cWoooo,cWvvvv,cWovvo,r2)
|
||||
double precision,intent(in) :: cWvvvv(spin_vir_num,spin_vir_num,spin_vir_num,spin_vir_num)
|
||||
double precision,intent(in) :: cWovvo(spin_occ_num,spin_vir_num,spin_vir_num,spin_occ_num)
|
||||
|
||||
double precision,intent(in) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
||||
double precision :: x
|
||||
|
||||
! Local variables
|
||||
@ -155,7 +154,7 @@ subroutine form_r2_nc(tau,cFoo,cFov,cFvv,cWoooo,cWvvvv,cWovvo,r2)
|
||||
do i=1,spin_occ_num
|
||||
do n=1,spin_occ_num
|
||||
do m=1,spin_occ_num
|
||||
r2(i,j,a,b) = r2(i,j,a,b) + 0.5d0*tau(m,n,a,b)*cWoooo(m,n,i,j)
|
||||
r2(i,j,a,b) = r2(i,j,a,b) + 0.5d0*tau_cc(m,n,a,b)*cWoooo(m,n,i,j)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
@ -171,7 +170,7 @@ subroutine form_r2_nc(tau,cFoo,cFov,cFvv,cWoooo,cWvvvv,cWovvo,r2)
|
||||
x = 0.5d0*cWvvvv(a,b,e,f)
|
||||
do j=1,spin_occ_num
|
||||
do i=1,spin_occ_num
|
||||
r2(i,j,a,b) = r2(i,j,a,b) + x*tau(i,j,e,f)
|
||||
r2(i,j,a,b) = r2(i,j,a,b) + x*tau_cc(i,j,e,f)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
@ -1,33 +0,0 @@
|
||||
subroutine form_tau(t1,t2,tau)
|
||||
|
||||
! Form tau in CCSD
|
||||
|
||||
implicit none
|
||||
|
||||
! Input variables
|
||||
|
||||
double precision,intent(in) :: t1(spin_occ_num,spin_vir_num)
|
||||
double precision,intent(in) :: t2(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: a,b,c,d
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
||||
|
||||
do b=1,spin_vir_num
|
||||
do a=1,spin_vir_num
|
||||
do j=1,spin_occ_num
|
||||
do i=1,spin_occ_num
|
||||
|
||||
tau(i,j,a,b) = 0.5d0*t2(i,j,a,b) + t1(i,a)*t1(j,b)
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine form_tau
|
@ -1,28 +1,21 @@
|
||||
subroutine form_tau_nc(tau)
|
||||
BEGIN_PROVIDER [ double precision, tau_cc, (spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Tau in CCSD
|
||||
END_DOC
|
||||
|
||||
! Form tau in CCSD
|
||||
|
||||
implicit none
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: a,b,c,d
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
||||
integer :: i,j,a,b
|
||||
|
||||
do b=1,spin_vir_num
|
||||
do a=1,spin_vir_num
|
||||
do j=1,spin_occ_num
|
||||
do i=1,spin_occ_num
|
||||
|
||||
tau(i,j,a,b) = t2_cc(i,j,a,b) + t1_cc(i,a)*t1_cc(j,b) - t1_cc(i,b)*t1_cc(j,a)
|
||||
tau_cc(i,j,a,b) = t2_cc(i,j,a,b) + t1_cc(i,a)*t1_cc(j,b) - t1_cc(i,b)*t1_cc(j,a)
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine form_tau_nc
|
||||
END_PROVIDER
|
||||
|
Loading…
Reference in New Issue
Block a user