mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-10 13:08:23 +01:00
Better convergence of MRCC
This commit is contained in:
parent
9bfe41aa87
commit
2d1f40cae7
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user