2023-02-07 17:07:49 +01:00
progr a m tc_bi_ortho
imp l icit none
BEG I N_DOC
! TODO : Reads psi_det in the EZFIO folder and prints out the left- and right-eigenvectors together with the energy. Saves the left-right wave functions at the end.
END _ DOC
pri n t * , 'Hello world'
my_ g rid_becke = . True .
my_ n _ pt_r_grid = 30
my_ n _ pt_a_grid = 50
rea d _ wf = . True .
tou c h read_wf
tou c h my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
cal l routine_diag
2023-03-16 14:00:21 +01:00
cal l save_tc_bi_ortho_wavefunction
2023-02-07 17:07:49 +01:00
end
subro u tine test
impl i cit none
inte g er :: i , j
doub l e precision :: hmono , htwoe , hthree , htot
use b itmasks
2023-03-16 14:00:21 +01:00
prin t * , 'reading the wave function '
do i = 1 , N_det
cal l debug_det ( psi_det ( 1 , 1 , i ) , N_int )
pri n t * , i , psi_l_coef_bi_ortho ( i , 1 ) * psi_r_coef_bi_ortho ( i , 1 )
pri n t * , i , psi_l_coef_bi_ortho ( i , 1 ) , psi_r_coef_bi_ortho ( i , 1 )
endd o
2023-02-07 17:07:49 +01:00
end
subro u tine routine_diag
impl i cit none
! provide eigval_right_tc_bi_orth
2023-03-16 14:00:21 +01:00
! provide overlap_bi_ortho
2023-02-07 17:07:49 +01:00
! provide htilde_matrix_elmt_bi_ortho
inte g er :: i , j
prin t * , 'eigval_right_tc_bi_orth = ' , eigval_right_tc_bi_orth ( 1 )
prin t * , 'e_tc_left_right = ' , e_tc_left_right
prin t * , 'e_tilde_bi_orth_00 = ' , e_tilde_bi_orth_00
prin t * , 'e_pt2_tc_bi_orth = ' , e_pt2_tc_bi_orth
prin t * , 'e_pt2_tc_bi_orth_single = ' , e_pt2_tc_bi_orth_single
prin t * , 'e_pt2_tc_bi_orth_double = ' , e_pt2_tc_bi_orth_double
prin t * , '***'
prin t * , 'e_corr_bi_orth = ' , e_corr_bi_orth
prin t * , 'e_corr_bi_orth_proj = ' , e_corr_bi_orth_proj
prin t * , 'e_corr_single_bi_orth = ' , e_corr_single_bi_orth
prin t * , 'e_corr_double_bi_orth = ' , e_corr_double_bi_orth
prin t * , 'Left/right eigenvectors'
do i = 1 , N_det
2023-03-16 14:00:21 +01:00
wri t e ( * , '(I5,X,(100(F12.7,X)))' ) i , leigvec_tc_bi_orth ( i , 1 ) , reigvec_tc_b i_orth(i,1),leigvec_tc_bi_orth(i,1)*reigvec_tc_bi_orth(i,1)
2023-02-07 17:07:49 +01:00
endd o
end