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

30 lines
797 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
N_st = N_states
allocate (pt2(N_st), norm_pert(N_st))
pt2 = 1.d0
2014-05-27 00:19:03 +02:00
! davidson_criterion = 'wall_time'
! davidson_threshold = 1.d0
do while (maxval(abs(pt2(1:N_st))) > 1.d-6)
2014-05-26 13:09:32 +02:00
E_old = CI_energy(1)
call H_apply_cisd_selection(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