9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 03:23:29 +01:00

Print overlap in deterministic PT2

This commit is contained in:
Anthony Scemama 2020-09-03 17:13:26 +02:00
parent 8c75ad6cfa
commit 5fcdbe12df
2 changed files with 8 additions and 9 deletions

View File

@ -317,14 +317,7 @@ subroutine ZMQ_pt2(E, pt2_data, pt2_data_err, relative_error, N_in)
do k=1,N_states do k=1,N_states
pt2_overlap(pt2_stoch_istate,k) = pt2_data % overlap(k,pt2_stoch_istate) pt2_overlap(pt2_stoch_istate,k) = pt2_data % overlap(k,pt2_stoch_istate)
enddo enddo
! ! The overlap is not exactly zero because of the guiding function. print *, 'Overlap of perturbed states:'
! ! Remove the bias
! do k=1,pt2_stoch_istate-1
! pt2_overlap(k,pt2_stoch_istate) -= pt2_data % overlap(k,pt2_stoch_istate)
! enddo
print *, 'Overlap before orthogonalization'
print *, pt2_overlap(:,pt2_stoch_istate)
print *, 'Overlap after orthogonalization'
print *, pt2_overlap(pt2_stoch_istate,:) print *, pt2_overlap(pt2_stoch_istate,:)
print *, '-------' print *, '-------'
SOFT_TOUCH pt2_overlap SOFT_TOUCH pt2_overlap
@ -529,7 +522,7 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2_data, pt2_data_
if ((time - time1 > 1.d0) .or. (n==N_det_generators)) then if ((time - time1 > 1.d0) .or. (n==N_det_generators)) then
time1 = time time1 = time
print '(I10, X, F11.7, X, G10.3, X, G10.3, X, G10.3, X, G10.3, X, G10.3, X, F10.4)', c, & print '(I10, X, F11.7, X, F10.6, X, G10.3, X, F10.6, X, G10.3, X, G10.3, X, F10.4)', c, &
pt2_data % pt2(pt2_stoch_istate) +E, & pt2_data % pt2(pt2_stoch_istate) +E, &
pt2_data_err % pt2(pt2_stoch_istate), & pt2_data_err % pt2(pt2_stoch_istate), &
pt2_data % variance(pt2_stoch_istate), & pt2_data % variance(pt2_stoch_istate), &

View File

@ -141,6 +141,12 @@ subroutine ZMQ_selection(N_in, pt2_data)
enddo enddo
pt2_overlap(:,:) = pt2_data % overlap(:,:) pt2_overlap(:,:) = pt2_data % overlap(:,:)
print *, 'Overlap of perturbed states:'
do l=1,N_states
print *, pt2_overlap(l,:)
enddo
print *, '-------'
SOFT_TOUCH pt2_overlap SOFT_TOUCH pt2_overlap
call update_pt2_and_variance_weights(pt2_data, N_states) call update_pt2_and_variance_weights(pt2_data, N_states)