2014-05-24 02:39:18 +02:00
|
|
|
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
|
2014-05-24 02:39:18 +02:00
|
|
|
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"
|
2014-05-24 02:39:18 +02:00
|
|
|
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
|
2014-05-24 02:39:18 +02:00
|
|
|
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
|
2014-05-26 22:40:42 +02:00
|
|
|
if (abort_all) then
|
|
|
|
exit
|
|
|
|
endif
|
2014-05-24 02:39:18 +02:00
|
|
|
enddo
|
2014-05-26 21:42:16 +02:00
|
|
|
deallocate(pt2,norm_pert)
|
2014-05-24 02:39:18 +02:00
|
|
|
end
|