mirror of
https://github.com/pfloos/quack
synced 2024-12-23 04:43:42 +01:00
pCCD
This commit is contained in:
parent
bbbf50e146
commit
c05432416e
@ -71,7 +71,7 @@ subroutine pCCD(dotest,maxIt,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR, &
|
||||
double precision,allocatable :: ExpKap(:,:)
|
||||
|
||||
integer :: O,V,N
|
||||
integer :: Np
|
||||
integer :: Nsq
|
||||
integer :: n_diis
|
||||
double precision :: rcond
|
||||
double precision,allocatable :: err_diis(:,:)
|
||||
@ -92,7 +92,7 @@ subroutine pCCD(dotest,maxIt,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR, &
|
||||
V = nV - nR
|
||||
N = O + V
|
||||
|
||||
Np = N*N
|
||||
Nsq = N*N
|
||||
|
||||
!------------------------------------!
|
||||
! Star Loop for orbital optimization !
|
||||
@ -357,9 +357,9 @@ subroutine pCCD(dotest,maxIt,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR, &
|
||||
! Compute orbital gradient !
|
||||
!--------------------------!
|
||||
|
||||
allocate(grad(Np))
|
||||
allocate(grad(Nsq))
|
||||
|
||||
call pCCD_orbital_gradient(O,V,N,Np,h,ERI_MO,rdm1,rdm2,grad)
|
||||
call pCCD_orbital_gradient(O,V,N,Nsq,h,ERI_MO,rdm1,rdm2,grad)
|
||||
|
||||
! Check convergence of orbital optimization
|
||||
|
||||
@ -378,15 +378,15 @@ subroutine pCCD(dotest,maxIt,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR, &
|
||||
! Compute orbital Hessian !
|
||||
!-------------------------!
|
||||
|
||||
allocate(hess(Np,Np))
|
||||
allocate(hess(Nsq,Nsq))
|
||||
|
||||
call pCCD_orbital_hessian(O,V,N,Np,h,ERI_MO,rdm1,rdm2,hess)
|
||||
call pCCD_orbital_hessian(O,V,N,Nsq,h,ERI_MO,rdm1,rdm2,hess)
|
||||
|
||||
deallocate(rdm1,rdm2)
|
||||
|
||||
allocate(hessInv(Np,Np))
|
||||
allocate(hessInv(Nsq,Nsq))
|
||||
|
||||
call inverse_matrix(Np,hess,hessInv)
|
||||
call inverse_matrix(Nsq,hess,hessInv)
|
||||
|
||||
deallocate(hess)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine pCCD_orbital_gradient(O,V,N,Np,h,ERI_MO,rdm1,rdm2,grad)
|
||||
subroutine pCCD_orbital_gradient(O,V,N,Nsq,h,ERI_MO,rdm1,rdm2,grad)
|
||||
|
||||
! Compute the orbital gradient at the pCCD level
|
||||
|
||||
@ -9,7 +9,7 @@ subroutine pCCD_orbital_gradient(O,V,N,Np,h,ERI_MO,rdm1,rdm2,grad)
|
||||
integer,intent(in) :: O
|
||||
integer,intent(in) :: V
|
||||
integer,intent(in) :: N
|
||||
integer,intent(in) :: Np
|
||||
integer,intent(in) :: Nsq
|
||||
double precision,intent(in) :: h(N,N)
|
||||
double precision,intent(in) :: ERI_MO(N,N,N,N)
|
||||
double precision,intent(in) :: rdm1(N,N)
|
||||
@ -24,7 +24,7 @@ subroutine pCCD_orbital_gradient(O,V,N,Np,h,ERI_MO,rdm1,rdm2,grad)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: grad(Np)
|
||||
double precision,intent(out) :: grad(Nsq)
|
||||
|
||||
! Compute gradient
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine pCCD_orbital_hessian(O,V,N,Np,h,ERI_MO,rdm1,rdm2,hess)
|
||||
subroutine pCCD_orbital_hessian(O,V,N,Nsq,h,ERI_MO,rdm1,rdm2,hess)
|
||||
|
||||
! Compute the orbital hessian at the pCCD level
|
||||
|
||||
@ -9,7 +9,7 @@ subroutine pCCD_orbital_hessian(O,V,N,Np,h,ERI_MO,rdm1,rdm2,hess)
|
||||
integer,intent(in) :: O
|
||||
integer,intent(in) :: V
|
||||
integer,intent(in) :: N
|
||||
integer,intent(in) :: Np
|
||||
integer,intent(in) :: Nsq
|
||||
double precision,intent(in) :: h(N,N)
|
||||
double precision,intent(in) :: ERI_MO(N,N,N,N)
|
||||
double precision,intent(in) :: rdm1(N,N)
|
||||
@ -28,7 +28,7 @@ subroutine pCCD_orbital_hessian(O,V,N,Np,h,ERI_MO,rdm1,rdm2,hess)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: hess(Np,Np)
|
||||
double precision,intent(out) :: hess(Nsq,Nsq)
|
||||
|
||||
! Compute intermediate array
|
||||
|
||||
@ -116,7 +116,7 @@ subroutine pCCD_orbital_hessian(O,V,N,Np,h,ERI_MO,rdm1,rdm2,hess)
|
||||
if(debug) then
|
||||
|
||||
write(*,*) 'Orbital Hessian at the pCCD level:'
|
||||
call matout(Np,Np,hess)
|
||||
call matout(Nsq,Nsq,hess)
|
||||
write(*,*)
|
||||
|
||||
end if
|
||||
|
Loading…
Reference in New Issue
Block a user