10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-08-07 21:10:03 +02:00

Merge branch 'master' into macos

This commit is contained in:
Anthony Scemama 2023-05-05 13:52:47 +02:00
commit d22670ffb8
5 changed files with 20 additions and 21 deletions

@ -1 +1 @@
Subproject commit b9e877d9a9444a2aac23ec94b4a174caa4a10dd2 Subproject commit e0d0e02e9f5ece138d1520106954a881ab0b8db2

View File

@ -130,13 +130,13 @@ subroutine run_cipsi
if (qp_stop()) exit if (qp_stop()) exit
enddo enddo
if (.not.qp_stop()) then ! If stopped because N_det > N_det_max, do an extra iteration to compute the PT2
if (N_det < N_det_max) then if ((.not.qp_stop()).and. &
call diagonalize_CI (N_det > N_det_max) .and. &
call save_wavefunction (maxval(abs(pt2_data % pt2(1:N_states))) > pt2_max) .and. &
call save_energy(psi_energy_with_nucl_rep, zeros) (maxval(abs(pt2_data % variance(1:N_states))) > variance_max) .and.&
endif (correlation_energy_ratio <= correlation_energy_ratio_max) &
) then
if (do_pt2) then if (do_pt2) then
call pt2_dealloc(pt2_data) call pt2_dealloc(pt2_data)
call pt2_dealloc(pt2_data_err) call pt2_dealloc(pt2_data_err)

View File

@ -119,13 +119,13 @@ subroutine run_stochastic_cipsi
if (qp_stop()) exit if (qp_stop()) exit
enddo enddo
if (.not.qp_stop()) then ! If stopped because N_det > N_det_max, do an extra iteration to compute the PT2
if (N_det < N_det_max) then if ((.not.qp_stop()).and. &
call diagonalize_CI (N_det > N_det_max) .and. &
call save_wavefunction (maxval(abs(pt2_data % pt2(1:N_states))) > pt2_max) .and. &
call save_energy(psi_energy_with_nucl_rep, zeros) (maxval(abs(pt2_data % variance(1:N_states))) > variance_max) .and.&
endif (correlation_energy_ratio <= correlation_energy_ratio_max) &
) then
call pt2_dealloc(pt2_data) call pt2_dealloc(pt2_data)
call pt2_dealloc(pt2_data_err) call pt2_dealloc(pt2_data_err)
call pt2_alloc(pt2_data, N_states) call pt2_alloc(pt2_data, N_states)

View File

@ -465,8 +465,7 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
integer :: lwork, info integer :: lwork, info
double precision, allocatable :: work(:) double precision, allocatable :: work(:)
! y = h y = h
y = h_p
lwork = -1 lwork = -1
allocate(work(1)) allocate(work(1))
call dsygv(1,'V','U',shift2,y,size(y,1), & call dsygv(1,'V','U',shift2,y,size(y,1), &

View File

@ -16,13 +16,13 @@ BEGIN_PROVIDER [double precision, two_e_dm_mo, (mo_num,mo_num,mo_num,mo_num)]
two_e_dm_mo = 0.d0 two_e_dm_mo = 0.d0
integer :: i,j,k,l,iorb,jorb,korb,lorb,istate integer :: i,j,k,l,iorb,jorb,korb,lorb,istate
do l=1,mo_num do l=1,n_core_inact_act_orb
lorb = list_core_inact_act(l) lorb = list_core_inact_act(l)
do k=1,mo_num do k=1,n_core_inact_act_orb
korb = list_core_inact_act(k) korb = list_core_inact_act(k)
do j=1,mo_num do j=1,n_core_inact_act_orb
jorb = list_core_inact_act(j) jorb = list_core_inact_act(j)
do i=1,mo_num do i=1,n_core_inact_act_orb
iorb = list_core_inact_act(i) iorb = list_core_inact_act(i)
two_e_dm_mo(iorb,jorb,korb,lorb) = state_av_full_occ_2_rdm_spin_trace_mo(i,j,k,l) two_e_dm_mo(iorb,jorb,korb,lorb) = state_av_full_occ_2_rdm_spin_trace_mo(i,j,k,l)
enddo enddo