mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-08 20:33:26 +01:00
Fixed Travis
This commit is contained in:
parent
afcac055ca
commit
bc1e564f17
@ -5,11 +5,15 @@ program fci_zmq
|
|||||||
|
|
||||||
double precision, allocatable :: pt2(:)
|
double precision, allocatable :: pt2(:)
|
||||||
integer :: degree
|
integer :: degree
|
||||||
|
double precision :: threshold_davidson_in
|
||||||
|
|
||||||
allocate (pt2(N_states))
|
allocate (pt2(N_states))
|
||||||
|
|
||||||
pt2 = 1.d0
|
pt2 = 1.d0
|
||||||
diag_algorithm = "Lapack"
|
threshold_davidson_in = threshold_davidson
|
||||||
|
threshold_davidson = 1.d-5
|
||||||
|
SOFT_TOUCH threshold_davidson
|
||||||
|
|
||||||
|
|
||||||
if (N_det > N_det_max) then
|
if (N_det > N_det_max) then
|
||||||
call diagonalize_CI
|
call diagonalize_CI
|
||||||
@ -33,20 +37,11 @@ program fci_zmq
|
|||||||
double precision :: E_CI_before(N_states)
|
double precision :: E_CI_before(N_states)
|
||||||
|
|
||||||
|
|
||||||
integer :: n_det_before
|
integer :: n_det_before, to_select
|
||||||
print*,'Beginning the selection ...'
|
print*,'Beginning the selection ...'
|
||||||
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
||||||
|
|
||||||
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
||||||
n_det_before = N_det
|
|
||||||
call ZMQ_selection(max(256-N_det, N_det), pt2)
|
|
||||||
|
|
||||||
PROVIDE psi_coef
|
|
||||||
PROVIDE psi_det
|
|
||||||
PROVIDE psi_det_sorted
|
|
||||||
|
|
||||||
call diagonalize_CI
|
|
||||||
call save_wavefunction
|
|
||||||
|
|
||||||
print *, 'N_det = ', N_det
|
print *, 'N_det = ', N_det
|
||||||
print *, 'N_states = ', N_states
|
print *, 'N_states = ', N_states
|
||||||
@ -71,12 +66,38 @@ program fci_zmq
|
|||||||
endif
|
endif
|
||||||
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
||||||
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
||||||
|
|
||||||
|
n_det_before = N_det
|
||||||
|
to_select = 3*N_det
|
||||||
|
to_select = max(256-to_select, to_select)
|
||||||
|
to_select = min(to_select,N_det_max-n_det_before)
|
||||||
|
call ZMQ_selection(to_select, pt2)
|
||||||
|
|
||||||
|
PROVIDE psi_coef
|
||||||
|
PROVIDE psi_det
|
||||||
|
PROVIDE psi_det_sorted
|
||||||
|
|
||||||
|
if (N_det == N_det_max) then
|
||||||
|
threshold_davidson = threshold_davidson_in
|
||||||
|
TOUCH threshold_davidson
|
||||||
|
endif
|
||||||
|
call diagonalize_CI
|
||||||
|
call save_wavefunction
|
||||||
|
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
if (N_det < N_det_max) then
|
||||||
|
threshold_davidson = threshold_davidson_in
|
||||||
|
TOUCH threshold_davidson
|
||||||
|
call diagonalize_CI
|
||||||
|
call save_wavefunction
|
||||||
|
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
||||||
|
endif
|
||||||
|
|
||||||
integer :: exc_max, degree_min
|
integer :: exc_max, degree_min
|
||||||
exc_max = 0
|
exc_max = 0
|
||||||
print *, 'CAS determinants : ', N_det_cas
|
print *, 'CAS determinants : ', N_det_cas
|
||||||
do i=1,min(N_det_cas,10)
|
do i=1,min(N_det_cas,20)
|
||||||
do k=i,N_det_cas
|
do k=i,N_det_cas
|
||||||
call get_excitation_degree(psi_cas(1,1,k),psi_cas(1,1,i),degree,N_int)
|
call get_excitation_degree(psi_cas(1,1,k),psi_cas(1,1,i),degree,N_int)
|
||||||
exc_max = max(exc_max,degree)
|
exc_max = max(exc_max,degree)
|
||||||
@ -108,7 +129,7 @@ program fci_zmq
|
|||||||
endif
|
endif
|
||||||
call save_wavefunction
|
call save_wavefunction
|
||||||
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
call ezfio_set_cas_sd_zmq_energy(CI_energy(1))
|
||||||
call ezfio_set_cas_sd_zmq_energy_pt2(E_CI_before+pt2)
|
call ezfio_set_cas_sd_zmq_energy_pt2(E_CI_before(1)+pt2(1))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,10 +11,9 @@ program fci_zmq
|
|||||||
allocate (pt2(N_states))
|
allocate (pt2(N_states))
|
||||||
|
|
||||||
pt2 = 1.d0
|
pt2 = 1.d0
|
||||||
diag_algorithm = "Lapack"
|
|
||||||
threshold_davidson_in = threshold_davidson
|
threshold_davidson_in = threshold_davidson
|
||||||
|
threshold_davidson = 1.d-5
|
||||||
SOFT_TOUCH threshold_davidson
|
SOFT_TOUCH threshold_davidson
|
||||||
threshold_davidson = 1.d-4
|
|
||||||
|
|
||||||
if (N_det > N_det_max) then
|
if (N_det > N_det_max) then
|
||||||
call diagonalize_CI
|
call diagonalize_CI
|
||||||
@ -43,31 +42,6 @@ program fci_zmq
|
|||||||
n_det_before = 0
|
n_det_before = 0
|
||||||
|
|
||||||
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
||||||
n_det_before = N_det
|
|
||||||
to_select = 3*N_det
|
|
||||||
to_select = max(1024-to_select, to_select)
|
|
||||||
to_select = min(to_select, N_det_max-n_det_before)
|
|
||||||
call ZMQ_selection(to_select, pt2)
|
|
||||||
|
|
||||||
PROVIDE psi_coef
|
|
||||||
PROVIDE psi_det
|
|
||||||
PROVIDE psi_det_sorted
|
|
||||||
|
|
||||||
if (N_det == N_det_max) then
|
|
||||||
threshold_davidson = threshold_davidson_in
|
|
||||||
SOFT_TOUCH threshold_davidson
|
|
||||||
endif
|
|
||||||
call diagonalize_CI
|
|
||||||
call save_wavefunction
|
|
||||||
|
|
||||||
! if (N_det > N_det_max) then
|
|
||||||
! psi_det = psi_det_sorted
|
|
||||||
! psi_coef = psi_coef_sorted
|
|
||||||
! N_det = N_det_max
|
|
||||||
! soft_touch N_det psi_det psi_coef
|
|
||||||
! call diagonalize_CI
|
|
||||||
! call save_wavefunction
|
|
||||||
! endif
|
|
||||||
|
|
||||||
print *, 'N_det = ', N_det
|
print *, 'N_det = ', N_det
|
||||||
print *, 'N_states = ', N_states
|
print *, 'N_states = ', N_states
|
||||||
@ -91,9 +65,35 @@ program fci_zmq
|
|||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
||||||
call ezfio_set_full_ci_zmq_energy(CI_energy)
|
call ezfio_set_full_ci_zmq_energy(CI_energy(1))
|
||||||
|
|
||||||
|
n_det_before = N_det
|
||||||
|
to_select = 3*N_det
|
||||||
|
to_select = max(1024-to_select, to_select)
|
||||||
|
to_select = min(to_select, N_det_max-n_det_before)
|
||||||
|
call ZMQ_selection(to_select, pt2)
|
||||||
|
|
||||||
|
PROVIDE psi_coef
|
||||||
|
PROVIDE psi_det
|
||||||
|
PROVIDE psi_det_sorted
|
||||||
|
|
||||||
|
if (N_det == N_det_max) then
|
||||||
|
threshold_davidson = threshold_davidson_in
|
||||||
|
TOUCH threshold_davidson
|
||||||
|
endif
|
||||||
|
call diagonalize_CI
|
||||||
|
call save_wavefunction
|
||||||
|
call ezfio_set_full_ci_zmq_energy(CI_energy(1))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
if (N_det < N_det_max) then
|
||||||
|
threshold_davidson = threshold_davidson_in
|
||||||
|
SOFT_TOUCH threshold_davidson
|
||||||
|
call diagonalize_CI
|
||||||
|
call save_wavefunction
|
||||||
|
call ezfio_set_full_ci_zmq_energy(CI_energy(1))
|
||||||
|
endif
|
||||||
|
|
||||||
if(do_pt2_end)then
|
if(do_pt2_end)then
|
||||||
print*,'Last iteration only to compute the PT2'
|
print*,'Last iteration only to compute the PT2'
|
||||||
threshold_selectors = max(threshold_selectors,threshold_selectors_pt2)
|
threshold_selectors = max(threshold_selectors,threshold_selectors_pt2)
|
||||||
@ -111,9 +111,11 @@ program fci_zmq
|
|||||||
print *, 'E+PT2 = ', E_CI_before+pt2
|
print *, 'E+PT2 = ', E_CI_before+pt2
|
||||||
print *, '-----'
|
print *, '-----'
|
||||||
enddo
|
enddo
|
||||||
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before+pt2)
|
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before(1)+pt2(1))
|
||||||
endif
|
endif
|
||||||
call save_wavefunction
|
call save_wavefunction
|
||||||
|
call ezfio_set_full_ci_zmq_energy(CI_energy(1))
|
||||||
|
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before(1)+pt2(1))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ END_PROVIDER
|
|||||||
double precision, allocatable :: e_array(:)
|
double precision, allocatable :: e_array(:)
|
||||||
integer, allocatable :: iorder(:)
|
integer, allocatable :: iorder(:)
|
||||||
|
|
||||||
|
PROVIDE threshold_davidson
|
||||||
! Guess values for the "N_states" states of the CI_eigenvectors
|
! Guess values for the "N_states" states of the CI_eigenvectors
|
||||||
do j=1,min(N_states,N_det)
|
do j=1,min(N_states,N_det)
|
||||||
do i=1,N_det
|
do i=1,N_det
|
||||||
|
@ -13,7 +13,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
|
|||||||
qp_set_mo_class $INPUT -core "[1]" -inact "[2,5]" -act "[3,4,6,7]" -virt "[8-24]"
|
qp_set_mo_class $INPUT -core "[1]" -inact "[2,5]" -act "[3,4,6,7]" -virt "[8-24]"
|
||||||
qp_run cassd_zmq $INPUT
|
qp_run cassd_zmq $INPUT
|
||||||
energy="$(ezfio get cas_sd_zmq energy_pt2)"
|
energy="$(ezfio get cas_sd_zmq energy_pt2)"
|
||||||
eq $energy -76.23109 2.E-5
|
eq $energy -76.231196 2.E-5
|
||||||
|
|
||||||
ezfio set determinants n_det_max 2048
|
ezfio set determinants n_det_max 2048
|
||||||
ezfio set determinants read_wf True
|
ezfio set determinants read_wf True
|
||||||
|
@ -16,7 +16,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
|
|||||||
ezfio set mrcepa0 n_it_max_dressed_ci 3
|
ezfio set mrcepa0 n_it_max_dressed_ci 3
|
||||||
qp_run $EXE $INPUT
|
qp_run $EXE $INPUT
|
||||||
energy="$(ezfio get mrcepa0 energy_pt2)"
|
energy="$(ezfio get mrcepa0 energy_pt2)"
|
||||||
eq $energy -76.238562120457431 1.e-4
|
eq $energy -76.238562192068 1.e-4
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "MRCC H2O cc-pVDZ" {
|
@test "MRCC H2O cc-pVDZ" {
|
||||||
|
@ -48,6 +48,6 @@ function run_FCI_ZMQ() {
|
|||||||
|
|
||||||
@test "FCI H2O VDZ pseudo" {
|
@test "FCI H2O VDZ pseudo" {
|
||||||
qp_set_mo_class h2o_pseudo.ezfio -core "[1]" -act "[2-12]" -del "[13-23]"
|
qp_set_mo_class h2o_pseudo.ezfio -core "[1]" -act "[2-12]" -del "[13-23]"
|
||||||
run_FCI_ZMQ h2o_pseudo.ezfio 2000 -0.170399597228904E+02 -0.170400168816800E+02
|
run_FCI_ZMQ h2o_pseudo.ezfio 2000 -17.0399584106077 -17.0400170044515
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user