mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-08 20:33:26 +01:00
Corrected print norm in mrcc
This commit is contained in:
parent
9ae8a25ab0
commit
2edaf7acd2
@ -856,24 +856,20 @@ END_PROVIDER
|
|||||||
f = 1.d0/norm
|
f = 1.d0/norm
|
||||||
! f now contains 1/ <T.Psi_0|T.Psi_0>
|
! f now contains 1/ <T.Psi_0|T.Psi_0>
|
||||||
|
|
||||||
norm = 1.d0
|
norm = 0.d0
|
||||||
do i=1,N_det_ref
|
do i=1,N_det_non_ref
|
||||||
norm = norm - psi_ref_coef(i,s)*psi_ref_coef(i,s)
|
norm = norm + psi_non_ref_coef(i,s)*psi_non_ref_coef(i,s)
|
||||||
enddo
|
enddo
|
||||||
! norm now contains <Psi_SD|Psi_SD>
|
! norm now contains <Psi_SD|Psi_SD>
|
||||||
f = dsqrt(f*norm)
|
f = dsqrt(f*norm)
|
||||||
! f normalises T.Psi_0 such that (1+T)|Psi> is normalized
|
! f normalises T.Psi_0 such that (1+T)|Psi> is normalized
|
||||||
|
|
||||||
norm = norm*f
|
|
||||||
print *, 'norm of |T Psi_0> = ', dsqrt(norm)
|
print *, 'norm of |T Psi_0> = ', dsqrt(norm)
|
||||||
|
norm = norm*f
|
||||||
if (dsqrt(norm) > 1.d0) then
|
if (dsqrt(norm) > 1.d0) then
|
||||||
stop 'Error : Norm of the SD larger than the norm of the reference.'
|
stop 'Error : Norm of the SD larger than the norm of the reference.'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
do i=1,N_det_ref
|
|
||||||
norm = norm + psi_ref_coef(i,s)*psi_ref_coef(i,s)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do i=1,N_det_non_ref
|
do i=1,N_det_non_ref
|
||||||
rho_mrcc(i,s) = rho_mrcc(i,s) * f
|
rho_mrcc(i,s) = rho_mrcc(i,s) * f
|
||||||
enddo
|
enddo
|
||||||
|
Loading…
Reference in New Issue
Block a user