9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-30 15:15:38 +01:00

few modif in tc-scf

This commit is contained in:
AbdAmmar 2023-12-23 12:32:02 +01:00
parent a6c26a75e9
commit 368450f72b
3 changed files with 14 additions and 50 deletions

View File

@ -386,7 +386,7 @@ subroutine non_hrmt_bieig(n, A, thr_d, thr_nd, leigvec, reigvec, n_real_eigv, ei
thr_diag = 1d-06
thr_norm = 1d+10
call check_EIGVEC(n, n, A, WR, VL, VR, thr_diag, thr_norm, .false.)
!call check_EIGVEC(n, n, A, WR, VL, VR, thr_diag, thr_norm, .false.)
!
! -------------------------------------------------------------------------------------
@ -479,15 +479,16 @@ subroutine non_hrmt_bieig(n, A, thr_d, thr_nd, leigvec, reigvec, n_real_eigv, ei
return
! accu_nd is modified after adding the normalization
!elseif( (accu_nd .lt. thr_nd) .and. (dabs(accu_d-dble(n_real_eigv))/dble(n_real_eigv) .gt. thr_d) ) then
elseif( (accu_nd .lt. thr_nd) .and. (dabs(accu_d-dble(n_real_eigv))/dble(n_real_eigv) .gt. thr_d) ) then
! print *, ' lapack vectors are not normalized but bi-orthogonalized'
! call check_biorthog_binormalize(n, n_real_eigv, leigvec, reigvec, thr_d, thr_nd, .true.)
print *, ' lapack vectors are not normalized but bi-orthogonalized'
call check_biorthog_binormalize(n, n_real_eigv, leigvec, reigvec, thr_d, thr_nd, .true.)
! call check_EIGVEC(n, n, A, eigval, leigvec, reigvec, thr_diag, thr_norm, .true.)
call check_biorthog(n, n_real_eigv, leigvec, reigvec, accu_d, accu_nd, S, thr_d, thr_nd, .true.)
call check_EIGVEC(n, n, A, eigval, leigvec, reigvec, thr_diag, thr_norm, .true.)
! deallocate(S)
! return
deallocate(S)
return
else

View File

@ -1865,10 +1865,11 @@ subroutine check_biorthog(n, m, Vl, Vr, accu_d, accu_nd, S, thr_d, thr_nd, stop_
, Vl, size(Vl, 1), Vr, size(Vr, 1) &
, 0.d0, S, size(S, 1) )
print *, ' overlap matrix:'
do i = 1, m
write(*,'(1000(F16.10,X))') S(i,:)
enddo
! print ca juste s'il y a besoin
!print *, ' overlap matrix:'
!do i = 1, m
! write(*,'(1000(F16.10,X))') S(i,:)
!enddo
accu_d = 0.d0
accu_nd = 0.d0
@ -1888,7 +1889,7 @@ subroutine check_biorthog(n, m, Vl, Vr, accu_d, accu_nd, S, thr_d, thr_nd, stop_
print *, ' accu_nd = ', accu_nd
print *, ' accu_d = ', dabs(accu_d-dble(m))/dble(m)
else
print *, ' vectors are bi-orthogonaly'
print *, ' vectors are bi-orthogonals'
endif
! ---

View File

@ -1,38 +0,0 @@
! ---
BEGIN_PROVIDER [integer, nC_orb]
&BEGIN_PROVIDER [integer, nO_orb]
&BEGIN_PROVIDER [integer, nV_orb]
&BEGIN_PROVIDER [integer, nR_orb]
&BEGIN_PROVIDER [integer, nS_exc]
BEGIN_DOC
!
! nC_orb = number of core orbitals
! nO_orb = number of occupied orbitals
! nV_orb = number of virtual orbitals
! nR_orb = number of Rydberg orbitals
! nS_exc = number of single excitation
!
END_DOC
implicit none
nC_orb = 0
nO_orb = elec_beta_num - nC_orb
nV_orb = mo_num - (nC_orb + nO_orb)
nR_orb = 0
nS_exc = (nO_orb-nC_orb) * (nV_orb-nR_orb)
print *, ' nC_orb = ', nC_orb
print *, ' nO_orb = ', nO_orb
print *, ' nV_orb = ', nV_orb
print *, ' nR_orb = ', nR_orb
print *, ' nS_exc = ', nS_exc
END_PROVIDER
! ---