mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
dirty - noiter version
This commit is contained in:
parent
35d75d36a3
commit
65cdad8f18
@ -129,7 +129,7 @@ END_PROVIDER
|
||||
do j=1,i
|
||||
call get_excitation_degree(psi_ref(1,1,i), psi_ref(1,1,j), degree, N_int)
|
||||
delta_cas(i,j,i_state) = 0d0
|
||||
if(no_mono_dressing .and. degree == 1) cycle
|
||||
!if(no_mono_dressing .and. degree == 1) cycle
|
||||
do k=1,N_det_non_ref
|
||||
|
||||
call i_h_j(psi_ref(1,1,j), psi_non_ref(1,1,k),N_int,Hjk)
|
||||
@ -220,7 +220,7 @@ end function
|
||||
end do
|
||||
|
||||
|
||||
kloop: do k=cepa0_shortcut(blok), cepa0_shortcut(blok+1)-1
|
||||
kloop: do k=cepa0_shortcut(blok), i ! cepa0_shortcut(blok+1)-1
|
||||
if(lambda_mrcc(i_state, det_cepa0_idx(k)) == 0d0) cycle
|
||||
|
||||
do ni=1,N_int
|
||||
@ -426,7 +426,7 @@ implicit none
|
||||
|
||||
call i_h_j(psi_non_ref(1,1,i), psi_ref(1,1,i_I),N_int,hIi)
|
||||
diI = hIi * lambda_mrcc(i_state, i)
|
||||
do J = 1 , N_det_ref !!!
|
||||
do J = 1 , i_I ! N_det_ref !!!
|
||||
call get_excitation(psi_ref(1,1,i_I),psi_ref(1,1,J),exc_IJ,degree,phase_IJ,N_int)
|
||||
call i_h_j(psi_non_ref(1,1,i), psi_ref(1,1,J),N_int,hJi)
|
||||
delta_JI = hJi * diI
|
||||
|
@ -6,7 +6,7 @@ subroutine run(N_st,energy)
|
||||
integer, intent(in) :: N_st
|
||||
double precision, intent(out) :: energy(N_st)
|
||||
|
||||
integer :: i
|
||||
integer :: i,j
|
||||
|
||||
double precision :: E_new, E_old, delta_e
|
||||
integer :: iteration
|
||||
@ -17,31 +17,43 @@ subroutine run(N_st,energy)
|
||||
|
||||
thresh_mrcc = 1d-7
|
||||
n_it_mrcc_max = 10
|
||||
|
||||
E_new = 0.d0
|
||||
delta_E = 1.d0
|
||||
iteration = 0
|
||||
lambda = 1.d0
|
||||
do while (delta_E > thresh_mrcc)
|
||||
iteration += 1
|
||||
print *, '==========================='
|
||||
print *, 'MRCEPA0 Iteration', iteration
|
||||
print *, '==========================='
|
||||
print *, ''
|
||||
E_old = sum(ci_energy_dressed)
|
||||
call write_double(6,ci_energy_dressed(1),"MRCEPA0 energy")
|
||||
call diagonalize_ci_dressed(lambda)
|
||||
E_new = sum(ci_energy_dressed)
|
||||
delta_E = dabs(E_new - E_old)
|
||||
call save_wavefunction
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
if (iteration > n_it_mrcc_max) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCEPA0 energy")
|
||||
energy(:) = ci_energy_dressed(:)
|
||||
|
||||
if(no_mono_dressing) then
|
||||
do j=1,N_states_diag
|
||||
do i=1,N_det
|
||||
psi_coef(i,j) = CI_eigenvectors_dressed(i,j)
|
||||
enddo
|
||||
enddo
|
||||
SOFT_TOUCH psi_coef ci_energy_dressed
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
call save_wavefunction
|
||||
energy(:) = ci_energy_dressed(:)
|
||||
else
|
||||
E_new = 0.d0
|
||||
delta_E = 1.d0
|
||||
iteration = 0
|
||||
lambda = 1.d0
|
||||
do while (delta_E > thresh_mrcc)
|
||||
iteration += 1
|
||||
print *, '==========================='
|
||||
print *, 'MRCEPA0 Iteration', iteration
|
||||
print *, '==========================='
|
||||
print *, ''
|
||||
E_old = sum(ci_energy_dressed)
|
||||
call write_double(6,ci_energy_dressed(1),"MRCEPA0 energy")
|
||||
call diagonalize_ci_dressed(lambda)
|
||||
E_new = sum(ci_energy_dressed)
|
||||
delta_E = dabs(E_new - E_old)
|
||||
call save_wavefunction
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
if (iteration > n_it_mrcc_max) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCEPA0 energy")
|
||||
energy(:) = ci_energy_dressed(:)
|
||||
endif
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user