mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Add correlation_energy_ratio_max as an exit criterion
This commit is contained in:
parent
068d9d5542
commit
b79ff2ee6b
@ -9,7 +9,13 @@ program fci_zmq
|
||||
double precision :: threshold_davidson_in
|
||||
|
||||
allocate (pt2(N_states))
|
||||
|
||||
|
||||
IF (correlation_energy_ratio_max .NE. 1.d0) THEN
|
||||
|
||||
DOUBLE PRECISION :: hf_energy_ref
|
||||
CALL ezfio_get_hartree_fock_energy(hf_energy_ref)
|
||||
END IF
|
||||
|
||||
pt2 = 1.d0
|
||||
threshold_davidson_in = threshold_davidson
|
||||
threshold_davidson = threshold_davidson_in * 100.d0
|
||||
@ -41,8 +47,23 @@ program fci_zmq
|
||||
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
||||
n_det_before = 0
|
||||
|
||||
|
||||
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
||||
|
||||
|
||||
IF (correlation_energy_ratio_max .NE. 1.d0) THEN
|
||||
DOUBLE PRECISION :: correlation_energy_var, correlation_energy_var_ratio
|
||||
|
||||
correlation_energy_var = MAXVAL(E_CI_before) - hf_energy_ref
|
||||
correlation_energy_var_ratio = correlation_energy_var / (correlation_energy_var + MAXVAL(pt2(:)))
|
||||
|
||||
IF (correlation_energy_ratio_max < correlation_energy_var_ratio) THEN
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
|
||||
print *, 'N_det = ', N_det
|
||||
print *, 'N_states = ', N_states
|
||||
do k=1, N_states
|
||||
|
@ -14,10 +14,18 @@ default: 0.0001
|
||||
[var_pt2_ratio]
|
||||
type: Normalized_float
|
||||
doc: The selection process stops when the energy ratio variational/(variational+PT2)
|
||||
is equal to var_pt2_ratio
|
||||
is equal to var_pt2_ratio. (Obsolete. Need to be removed)
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.75
|
||||
|
||||
[correlation_energy_ratio_max]
|
||||
type: Normalized_float
|
||||
doc: The selection process stops at a fixed correlation ratio (usefull for getting same accuracy between molecules)
|
||||
Defined as (E_CI-E_HF)/ (E_CI+PT2 - E_HF)
|
||||
If Ratio==1 it will not be used. (E_HF) is not required.
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 1.00
|
||||
|
||||
[threshold_generators_pt2]
|
||||
type: Threshold
|
||||
doc: Thresholds on generators (fraction of the norm) for final PT2 calculation
|
||||
|
Loading…
Reference in New Issue
Block a user