10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-26 15:12:19 +02:00

Set zeros in CIS wave functions

This commit is contained in:
Anthony Scemama 2020-11-11 01:27:33 +01:00
parent 6c930b70f5
commit 50bc1b0d3c
2 changed files with 4 additions and 2 deletions

View File

@ -79,6 +79,6 @@ subroutine run
call ezfio_set_cis_energy(CI_energy)
psi_coef = ci_eigenvectors
SOFT_TOUCH psi_coef
call save_wavefunction
call save_wavefunction_truncated(1.d-12)
end

View File

@ -459,10 +459,12 @@ subroutine save_wavefunction_truncated(thr)
! Save the wave function into the |EZFIO| file
END_DOC
integer :: N_det_save,i
call nullify_small_elements(N_det,N_states,psi_coef,size(psi_coef,1),thr)
TOUCH psi_coef
N_det_save = N_det
do i=1,N_det
if (psi_average_norm_contrib_sorted(i) < thr) then
N_det_save = i
N_det_save = i-1
exit
endif
enddo