mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
bug in lambda_mrcc
This commit is contained in:
parent
690dfb5bb6
commit
4298ab6ab0
@ -16,7 +16,7 @@
|
||||
lambda_mrcc_pt2(0) = 0
|
||||
|
||||
do i=1,N_det_non_ref
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef_normalized, N_int, N_det_ref,&
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,&
|
||||
size(psi_ref_coef,1), N_states,ihpsi_current)
|
||||
call i_H_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
|
||||
do k=1,N_states
|
||||
|
@ -124,7 +124,7 @@ END_PROVIDER
|
||||
|
||||
provide lambda_mrcc
|
||||
do i_state = 1, N_states
|
||||
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas)
|
||||
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas,N_det_ref)
|
||||
do i=1,N_det_ref
|
||||
do j=1,i
|
||||
call get_excitation_degree(psi_ref(1,1,i), psi_ref(1,1,j), degree, N_int)
|
||||
|
@ -42,7 +42,7 @@ subroutine mrcepa0_iterations
|
||||
! E_past(j) = E_new
|
||||
! j +=1
|
||||
call save_wavefunction
|
||||
if (iteration > 0) then
|
||||
if (iteration > 10) then
|
||||
exit
|
||||
endif
|
||||
print*,'------------'
|
||||
@ -55,7 +55,6 @@ subroutine mrcepa0_iterations
|
||||
print*,'------------'
|
||||
enddo
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCEPA0 energy")
|
||||
call write_double(6,ci_energy_dressed(1)+rest,"Final MRCEPA0+rest energy")
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
call save_wavefunction
|
||||
end
|
||||
@ -88,23 +87,3 @@ subroutine set_generators_bitmasks_as_holes_and_particles
|
||||
end
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, rest ]
|
||||
integer :: i, j
|
||||
double precision :: hij, c0
|
||||
|
||||
c0 = 1d0
|
||||
do i=1,N_det_non_ref
|
||||
c0 += psi_non_ref_coef(i,1)**2
|
||||
end do
|
||||
c0 = dsqrt(c0)
|
||||
print *, "C", c0
|
||||
rest = 0d0
|
||||
do i=1, N_det_non_ref
|
||||
if(lambda_mrcc(1, i) == 0d0) then
|
||||
do j=1, N_det_ref
|
||||
call i_h_j(psi_ref(1,1,j), psi_non_ref(1,1,i), N_int, hij)
|
||||
rest += hij * psi_non_ref_coef(i,1) * psi_ref_coef(j,1) / c0
|
||||
end do
|
||||
end if
|
||||
end do
|
||||
END_PROVIDER
|
||||
|
Loading…
Reference in New Issue
Block a user