10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Fixed bugs with correlation_energy_ratio

This commit is contained in:
Anthony Scemama 2017-05-02 16:46:31 +02:00
parent 963097e5d6
commit 592f978e62
2 changed files with 12 additions and 11 deletions

View File

@ -51,17 +51,18 @@ program fci_zmq
E_CI_before(1:N_states) = CI_energy(1:N_states) E_CI_before(1:N_states) = CI_energy(1:N_states)
double precision :: correlation_energy_ratio double precision :: correlation_energy_ratio
correlation_energy_ratio = E_CI_before(1) - hf_energy_ref correlation_energy_ratio = 0.d0
correlation_energy_ratio = correlation_energy_ratio / (correlation_energy_ratio + pt2(1))
do while ( & do while ( &
(N_det < N_det_max) .and. & (N_det < N_det_max) .and. &
(maxval(abs(pt2(1:N_states))) > pt2_max) .and. & (maxval(abs(pt2(1:N_states))) > pt2_max) .and. &
(correlation_energy_ratio < correlation_energy_ratio_max) & (correlation_energy_ratio <= correlation_energy_ratio_max) &
) )
correlation_energy_ratio = E_CI_before(1) - hf_energy_ref correlation_energy_ratio = (CI_energy(1) - hf_energy_ref) / &
correlation_energy_ratio = correlation_energy_ratio / (correlation_energy_ratio + pt2(1)) (E_CI_before(1) + pt2(1) - hf_energy_ref)
correlation_energy_ratio = min(1.d0,correlation_energy_ratio)
print *, 'N_det = ', N_det print *, 'N_det = ', N_det
print *, 'N_states = ', N_states print *, 'N_states = ', N_states

View File

@ -19,7 +19,7 @@ program fci_zmq
hf_energy_ref = ref_bitmask_energy hf_energy_ref = ref_bitmask_energy
endif endif
pt2 = 1.d0 pt2 = -huge(1.d0)
threshold_davidson_in = threshold_davidson threshold_davidson_in = threshold_davidson
threshold_davidson = threshold_davidson_in * 100.d0 threshold_davidson = threshold_davidson_in * 100.d0
SOFT_TOUCH threshold_davidson SOFT_TOUCH threshold_davidson
@ -51,17 +51,17 @@ program fci_zmq
n_det_before = 0 n_det_before = 0
double precision :: correlation_energy_ratio double precision :: correlation_energy_ratio
correlation_energy_ratio = E_CI_before(1) - hf_energy_ref correlation_energy_ratio = 0.d0
correlation_energy_ratio = correlation_energy_ratio / (correlation_energy_ratio + pt2(1))
do while ( & do while ( &
(N_det < N_det_max) .and. & (N_det < N_det_max) .and. &
(maxval(abs(pt2(1:N_states))) > pt2_max) .and. & (maxval(abs(pt2(1:N_states))) > pt2_max) .and. &
(correlation_energy_ratio < correlation_energy_ratio_max) & (correlation_energy_ratio <= correlation_energy_ratio_max) &
) )
correlation_energy_ratio = E_CI_before(1) - hf_energy_ref correlation_energy_ratio = (CI_energy(1) - hf_energy_ref) / &
correlation_energy_ratio = correlation_energy_ratio / (correlation_energy_ratio + pt2(1)) (E_CI_before(1) + pt2(1) - hf_energy_ref)
correlation_energy_ratio = min(1.d0,correlation_energy_ratio)
print *, 'N_det = ', N_det print *, 'N_det = ', N_det
print *, 'N_states = ', N_states print *, 'N_states = ', N_states