mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
a14e69bdb7
@ -13,6 +13,8 @@ BEGIN_PROVIDER [ double precision, mrcc_E0_denominator, (N_states) ]
|
||||
END_DOC
|
||||
if (initialize_mrcc_E0_denominator) then
|
||||
mrcc_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||
! mrcc_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||
! mrcc_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||
call write_double(6,mrcc_E0_denominator(1)+nuclear_repulsion, 'mrcc Energy denominator')
|
||||
else
|
||||
mrcc_E0_denominator = -huge(1.d0)
|
||||
|
80
plugins/mrcepa0/ezfio_interface.irp.f
Normal file
80
plugins/mrcepa0/ezfio_interface.irp.f
Normal file
@ -0,0 +1,80 @@
|
||||
! DO NOT MODIFY BY HAND
|
||||
! Created by $QP_ROOT/scripts/ezfio_interface/ei_handler.py
|
||||
! from file /home/garniron/quantum_package/src/mrcepa0/EZFIO.cfg
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ logical, perturbative_triples ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Compute perturbative contribution of the Triples
|
||||
END_DOC
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_mrcepa0_perturbative_triples(has)
|
||||
if (has) then
|
||||
call ezfio_get_mrcepa0_perturbative_triples(perturbative_triples)
|
||||
else
|
||||
print *, 'mrcepa0/perturbative_triples not found in EZFIO file'
|
||||
stop 1
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, thresh_dressed_ci ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Threshold on the convergence of the dressed CI energy
|
||||
END_DOC
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_mrcepa0_thresh_dressed_ci(has)
|
||||
if (has) then
|
||||
call ezfio_get_mrcepa0_thresh_dressed_ci(thresh_dressed_ci)
|
||||
else
|
||||
print *, 'mrcepa0/thresh_dressed_ci not found in EZFIO file'
|
||||
stop 1
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, n_it_max_dressed_ci ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Maximum number of dressed CI iterations
|
||||
END_DOC
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_mrcepa0_n_it_max_dressed_ci(has)
|
||||
if (has) then
|
||||
call ezfio_get_mrcepa0_n_it_max_dressed_ci(n_it_max_dressed_ci)
|
||||
else
|
||||
print *, 'mrcepa0/n_it_max_dressed_ci not found in EZFIO file'
|
||||
stop 1
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, lambda_type ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! lambda type
|
||||
END_DOC
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_mrcepa0_lambda_type(has)
|
||||
if (has) then
|
||||
call ezfio_get_mrcepa0_lambda_type(lambda_type)
|
||||
else
|
||||
print *, 'mrcepa0/lambda_type not found in EZFIO file'
|
||||
stop 1
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
@ -11,6 +11,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
implicit none
|
||||
|
||||
character(len=64000) :: task
|
||||
|
||||
integer(ZMQ_PTR) :: zmq_to_qp_run_socket, zmq_socket_pull
|
||||
integer, external :: omp_get_thread_num
|
||||
double precision, intent(in) :: relative_error, E
|
||||
@ -40,6 +41,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
print *, ' Samples Energy Stat. Error Seconds '
|
||||
print *, '========== ================= ================= ================='
|
||||
|
||||
|
||||
call new_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull, 'mrcc')
|
||||
|
||||
integer, external :: zmq_put_psi
|
||||
@ -63,7 +65,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
! do i=1,comb_teeth
|
||||
! print *, "TOOTH", first_det_of_teeth(i+1) - first_det_of_teeth(i)
|
||||
! end do
|
||||
|
||||
|
||||
integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket
|
||||
integer :: ipos
|
||||
ipos=1
|
||||
@ -75,6 +77,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
if (add_task_to_taskserver(zmq_to_qp_run_socket,trim(task(1:ipos))) == -1) then
|
||||
stop 'Unable to add task to task server'
|
||||
endif
|
||||
|
||||
ipos=1
|
||||
endif
|
||||
else
|
||||
@ -105,6 +108,7 @@ subroutine ZMQ_mrcc(E, mrcc, delta, delta_s2, relative_error)
|
||||
i = omp_get_thread_num()
|
||||
if (i==0) then
|
||||
call mrcc_collector(zmq_socket_pull,E(mrcc_stoch_istate), relative_error, delta, delta_s2, mrcc)
|
||||
|
||||
else
|
||||
call mrcc_slave_inproc(i)
|
||||
endif
|
||||
@ -123,14 +127,18 @@ subroutine mrcc_slave_inproc(i)
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, mrcc)
|
||||
|
||||
use dress_types
|
||||
use f77_zmq
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
|
||||
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
||||
|
||||
double precision, intent(in) :: relative_error, E
|
||||
double precision, intent(out) :: mrcc(N_states)
|
||||
double precision, allocatable :: cp(:,:,:,:)
|
||||
@ -236,11 +244,13 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
end if
|
||||
end do
|
||||
|
||||
|
||||
integer, external :: zmq_delete_tasks
|
||||
if (zmq_delete_tasks(zmq_to_qp_run_socket,zmq_socket_pull,task_id,ntask,more) == -1) then
|
||||
stop 'Unable to delete tasks'
|
||||
endif
|
||||
|
||||
|
||||
time = omp_get_wtime()
|
||||
|
||||
|
||||
@ -262,6 +272,7 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
!!!!!!!!!!!!
|
||||
double precision :: su, su2, eqt, avg, E0, val
|
||||
integer, external :: zmq_abort
|
||||
|
||||
su = 0d0
|
||||
su2 = 0d0
|
||||
|
||||
@ -284,6 +295,7 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then
|
||||
! Termination
|
||||
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, ''
|
||||
|
||||
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed
|
||||
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
|
||||
call sleep(1)
|
||||
@ -296,6 +308,7 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
if (cur_cp > old_cur_cp) then
|
||||
old_cur_cp = cur_cp
|
||||
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed
|
||||
|
||||
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, ''
|
||||
endif
|
||||
endif
|
||||
@ -326,6 +339,8 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
|
||||
mrcc(1) = E
|
||||
|
||||
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
|
||||
call end_zmq_pull_socket(zmq_socket_pull)
|
||||
end subroutine
|
||||
|
||||
|
||||
|
@ -47,6 +47,10 @@ subroutine run(N_st,energy)
|
||||
enddo
|
||||
call diagonalize_ci_dressed(lambda)
|
||||
E_new = mrcc_e0_denominator(1) !sum(ci_energy_dressed(1:N_states))
|
||||
|
||||
! if (.true.) then
|
||||
! provide delta_ij_mrcc_pouet
|
||||
! endif
|
||||
delta_E = (E_new - E_old)/dble(N_states)
|
||||
print *, ''
|
||||
call write_double(6,thresh_mrcc,"thresh_mrcc")
|
||||
|
Loading…
Reference in New Issue
Block a user