10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-05 05:33:56 +01:00
quantum_package/plugins/Full_CI_ZMQ/pt2_stoch.irp.f

42 lines
1.1 KiB
Fortran
Raw Normal View History

2017-01-16 18:51:01 +01:00
program pt2_stoch
implicit none
read_wf = .True.
2017-04-12 15:05:48 +02:00
SOFT_TOUCH read_wf
2017-01-16 18:51:01 +01:00
PROVIDE mo_bielec_integrals_in_map
2018-07-03 14:49:23 +02:00
PROVIDE psi_energy
2017-01-16 18:51:01 +01:00
call run
end
subroutine run
implicit none
integer :: i,j,k
logical, external :: detEq
double precision, allocatable :: pt2(:)
integer :: degree
integer :: n_det_before, to_select
double precision :: threshold_davidson_in
2017-10-27 12:20:00 +02:00
double precision :: E_CI_before, relative_error, absolute_error, eqt
2017-01-16 18:51:01 +01:00
allocate (pt2(N_states))
2018-05-23 10:26:02 +02:00
pt2(:) = 0.d0
2017-01-16 18:51:01 +01:00
2018-05-23 10:26:02 +02:00
E_CI_before = psi_energy(1) + nuclear_repulsion
2017-01-16 18:51:01 +01:00
threshold_selectors = 1.d0
2018-05-23 10:26:02 +02:00
threshold_generators = 1.d0
2018-06-09 14:35:33 +02:00
relative_error=PT2_relative_error
absolute_error=PT2_absolute_error
2017-10-27 12:20:00 +02:00
call ZMQ_pt2(E_CI_before, pt2, relative_error, absolute_error, eqt)
2017-01-16 18:51:01 +01:00
print *, 'Final step'
print *, 'N_det = ', N_det
2017-04-12 15:11:47 +02:00
print *, 'PT2 = ', pt2
print *, 'E = ', E_CI_before
2017-10-27 12:20:00 +02:00
print *, 'E+PT2 = ', E_CI_before+pt2, ' +/- ', eqt
2017-04-12 15:11:47 +02:00
print *, '-----'
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before+pt2(1))
2017-01-16 18:51:01 +01:00
end