From 368450f72bec8e20f80d57c582d38eb5bf3763ec Mon Sep 17 00:00:00 2001 From: AbdAmmar Date: Sat, 23 Dec 2023 12:32:02 +0100 Subject: [PATCH] few modif in tc-scf --- plugins/local/non_hermit_dav/biorthog.irp.f | 15 ++++---- .../lapack_diag_non_hermit.irp.f | 11 +++--- src/tc_bi_ortho/ORBITALS.irp.f | 38 ------------------- 3 files changed, 14 insertions(+), 50 deletions(-) delete mode 100644 src/tc_bi_ortho/ORBITALS.irp.f diff --git a/plugins/local/non_hermit_dav/biorthog.irp.f b/plugins/local/non_hermit_dav/biorthog.irp.f index 13917c5a..87a118f4 100644 --- a/plugins/local/non_hermit_dav/biorthog.irp.f +++ b/plugins/local/non_hermit_dav/biorthog.irp.f @@ -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 diff --git a/plugins/local/non_hermit_dav/lapack_diag_non_hermit.irp.f b/plugins/local/non_hermit_dav/lapack_diag_non_hermit.irp.f index 1144f29f..c7e9fe09 100644 --- a/plugins/local/non_hermit_dav/lapack_diag_non_hermit.irp.f +++ b/plugins/local/non_hermit_dav/lapack_diag_non_hermit.irp.f @@ -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 ! --- diff --git a/src/tc_bi_ortho/ORBITALS.irp.f b/src/tc_bi_ortho/ORBITALS.irp.f deleted file mode 100644 index fdc4758d..00000000 --- a/src/tc_bi_ortho/ORBITALS.irp.f +++ /dev/null @@ -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 - -! --- - -