10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-19 20:42:41 +01:00
quantum_package/src/CISD_selected/cisd_selection.irp.f

30 lines
830 B
FortranFixed
Raw Normal View History

program cisd
implicit none
integer :: i,k
double precision, allocatable :: pt2(:), norm_pert(:)
double precision :: H_pert_diag, E_old
integer :: N_st, iter
2014-05-27 17:30:44 +02:00
character*(64) :: perturbation
N_st = N_states
allocate (pt2(N_st), norm_pert(N_st))
pt2 = 1.d0
2014-05-27 17:30:44 +02:00
perturbation = "epstein_nesbet"
do while (maxval(abs(pt2(1:N_st))) > 1.d-6)
2014-05-26 13:09:32 +02:00
E_old = CI_energy(1)
2014-05-27 17:30:44 +02:00
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
2014-05-26 21:42:16 +02:00
call diagonalize_CI
print *, 'N_det = ', N_det
print *, 'N_states = ', N_states
print *, 'PT2 = ', pt2
2014-05-26 13:09:32 +02:00
print *, 'E = ', E_old
print *, 'E+PT2 = ', E_old+pt2
if (abort_all) then
exit
endif
enddo
2014-05-26 21:42:16 +02:00
deallocate(pt2,norm_pert)
end