10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-11 13:53:44 +02:00

Better convergence of MRCC

This commit is contained in:
Anthony Scemama 2016-11-08 23:03:11 +01:00
parent 9bfe41aa87
commit 2d1f40cae7

View File

@ -884,10 +884,9 @@ END_PROVIDER
!$OMP END PARALLEL !$OMP END PARALLEL
res = 0.d0 res = 0.d0
if (res < resold) then
do a_coll=1,nactive ! nex do a_coll=1,nactive ! nex
a_col = active_pp_idx(a_coll) a_col = active_pp_idx(a_coll)
do j=1,N_det_non_ref do j=1,N_det_non_ref
@ -898,14 +897,13 @@ END_PROVIDER
res = res + (X_new(a_col) - X(a_col))*(X_new(a_col) - X(a_col)) res = res + (X_new(a_col) - X(a_col))*(X_new(a_col) - X(a_col))
X(a_col) = X_new(a_col) X(a_col) = X_new(a_col)
end do end do
factor = 1.d0 if (res > resold) then
else
factor = -factor * 0.5d0 factor = -factor * 0.5d0
endif endif
resold = res resold = res
if(mod(k, 100) == 0) then if(mod(k, 100) == 0) then
print *, "res ", k, res print *, "res ", k, res, factor
end if end if
if(res < 1d-9) exit if(res < 1d-9) exit