mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-30 15:15:38 +01:00
Orthogonalized PT2
This commit is contained in:
parent
02a2695827
commit
13abddef2d
@ -37,3 +37,11 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, pt2_overlap, (N_states, N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Overlap between the perturbed wave functions
|
||||
END_DOC
|
||||
pt2_overlap(1:N_states,1:N_states) = 0.d0
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -314,6 +314,12 @@ subroutine ZMQ_pt2(E, pt2_data, pt2_data_err, relative_error, N_in)
|
||||
|
||||
print '(A)', '========== ================= =========== =============== =============== ================='
|
||||
|
||||
pt2_overlap(:,pt2_stoch_istate) = pt2_data % overlap(:,pt2_stoch_istate)
|
||||
print *, 'Overlap'
|
||||
print *, pt2_overlap(:,pt2_stoch_istate)
|
||||
print *, '-------'
|
||||
SOFT_TOUCH pt2_overlap
|
||||
|
||||
enddo
|
||||
FREE pt2_stoch_istate
|
||||
|
||||
|
@ -787,11 +787,11 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
enddo
|
||||
|
||||
! Gram-Schmidt using input overlap matrix
|
||||
! do istate=1,N_states
|
||||
! do jstate=1,istate-1
|
||||
! coef(istate) = coef(istate) - pt2_overlap(jstate,istate)/(pt2_overlap(jstate,jstate)) * coef(jstate)
|
||||
! enddo
|
||||
! enddo
|
||||
do istate=1,N_states
|
||||
do jstate=1,istate-1
|
||||
coef(istate) = coef(istate) - pt2_overlap(istate,jstate)/(1.d0+pt2_overlap(jstate,jstate)) * coef(jstate)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do istate=1,N_states
|
||||
alpha_h_psi = mat(istate, p1, p2)
|
||||
|
@ -140,6 +140,8 @@ subroutine ZMQ_selection(N_in, pt2_data)
|
||||
pt2_data % pt2(k)/(1.d0 + pt2_data % overlap(k,k))
|
||||
enddo
|
||||
|
||||
pt2_overlap(:,:) = pt2_data % overlap(:,:)
|
||||
SOFT_TOUCH pt2_overlap
|
||||
call update_pt2_and_variance_weights(pt2_data, N_states)
|
||||
|
||||
end subroutine
|
||||
|
@ -186,10 +186,10 @@ END_DOC
|
||||
|
||||
implicit none
|
||||
|
||||
integer,intent(inout) :: dim_DIIS
|
||||
double precision,intent(in) :: Fock_matrix_DIIS(ao_num,ao_num,dim_DIIS),error_matrix_DIIS(ao_num,ao_num,dim_DIIS)
|
||||
integer,intent(in) :: iteration_SCF, size_Fock_matrix_AO
|
||||
double precision,intent(inout):: Fock_matrix_AO_(size_Fock_matrix_AO,ao_num)
|
||||
integer,intent(inout) :: dim_DIIS
|
||||
|
||||
double precision,allocatable :: B_matrix_DIIS(:,:),X_vector_DIIS(:)
|
||||
double precision,allocatable :: C_vector_DIIS(:)
|
||||
|
Loading…
Reference in New Issue
Block a user