10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-30 00:44:28 +02:00
quantum_package/src/Full_CI/full_ci.irp.f

49 lines
1.4 KiB
FortranFixed
Raw Normal View History

2014-05-28 23:12:00 +02:00
program cisd
implicit none
integer :: i,k
2014-05-29 01:38:46 +02:00
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
2014-05-28 23:12:00 +02:00
integer :: N_st, degree
N_st = N_states
2014-05-29 01:38:46 +02:00
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st))
character*(64) :: perturbation
2014-05-28 23:12:00 +02:00
pt2 = 1.d0
diag_algorithm = "Lapack"
2014-06-27 10:16:40 +02:00
! do while (maxval(abs(pt2(1:N_st))) > 1.d-4)
do while (N_det < n_det_max_fci.and.maxval(abs(pt2(1:N_st))) > 1.d-4)
2014-05-28 23:12:00 +02:00
call H_apply_FCI(pt2, norm_pert, H_pert_diag, N_st)
call diagonalize_CI
2014-06-07 22:07:50 +02:00
call save_wavefunction
2014-05-28 23:12:00 +02:00
print *, 'N_det = ', N_det
print *, 'N_states = ', N_states
print *, 'PT2 = ', pt2
print *, 'E = ', CI_energy
print *, 'E+PT2 = ', CI_energy+pt2
2014-05-29 01:38:46 +02:00
print *, '-----'
2014-05-28 23:12:00 +02:00
if (abort_all) then
exit
endif
enddo
N_det = min(n_det_max_fci,N_det)
if(do_pt2_end)then
threshold_selectors = 1.d0
threshold_generators = 0.999d0
touch N_det psi_det psi_coef
call diagonalize_CI
call H_apply_FCI_PT2(pt2, norm_pert, H_pert_diag, N_st)
print *, 'Final step'
!! call remove_small_contributions
!! call diagonalize_CI
print *, 'N_det = ', N_det
print *, 'N_states = ', N_states
print *, 'PT2 = ', pt2
print *, 'E = ', CI_energy
print *, 'E+PT2 = ', CI_energy+pt2
print *, '-----'
endif
2014-05-28 23:12:00 +02:00
deallocate(pt2,norm_pert)
end