10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2025-04-10 10:41:34 +02:00

Stabilize PT2 when expected accuracy is low

This commit is contained in:
Anthony Scemama 2025-01-31 17:14:49 +01:00
parent e1523c4929
commit c285aaca49
2 changed files with 2 additions and 2 deletions
external
src/cipsi_utils

2
external/ezfio vendored

@ -1 +1 @@
Subproject commit d02132ea79217c16fd24242e8f8b8a6c3ff68091
Subproject commit dba01c4fe0ff7b84c5ecfb1c7c77ec68781311b3

@ -530,7 +530,7 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2_data, pt2_data_
avg = E0 + pt2_data_S(t) % pt2(pt2_stoch_istate) / dble(c)
avg2 = v0 + pt2_data_S(t) % variance(pt2_stoch_istate) / dble(c)
avg3(:) = n0(:) + pt2_data_S(t) % overlap(:,pt2_stoch_istate) / dble(c)
if ((avg /= 0.d0) .or. (n == N_det_generators) ) then
if (((c>=10).and.(avg /= 0.d0)) .or. (n == N_det_generators) ) then
do_exit = .true.
endif
if (qp_stop()) then