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))
|
2014-06-03 19:14:12 +02:00
|
|
|
character*(64) :: perturbation
|
2014-05-28 23:12:00 +02:00
|
|
|
|
|
|
|
pt2 = 1.d0
|
|
|
|
diag_algorithm = "Lapack"
|
2014-06-26 15:02:33 +02:00
|
|
|
do while (maxval(abs(pt2(1:N_st))) > 1.d-5)
|
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
|
2014-06-26 15:02:33 +02:00
|
|
|
call H_apply_FCI_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
|
|
|
|
|
|
|
print *, 'Final step'
|
2014-06-20 18:35:26 +02:00
|
|
|
! call remove_small_contributions
|
|
|
|
! call diagonalize_CI
|
2014-06-26 15:02:33 +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
|
|
|
|
print *, '-----'
|
2014-05-28 23:12:00 +02:00
|
|
|
deallocate(pt2,norm_pert)
|
|
|
|
end
|