10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-23 03:07:34 +02:00

Truncate CISD coefs to 1.e-12

This commit is contained in:
Anthony Scemama 2018-07-30 19:27:41 +02:00
parent df90b9fe98
commit 6caf7a2353
2 changed files with 21 additions and 1 deletions

View File

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

View File

@ -454,6 +454,26 @@ end
subroutine save_wavefunction_truncated(thr)
implicit none
double precision, intent(in) :: thr
use bitmasks
BEGIN_DOC
! Save the wave function into the EZFIO file
END_DOC
integer :: N_det_save,i
N_det_save = N_det
do i=1,N_det
if (psi_average_norm_contrib_sorted(i) < thr) then
N_det_save = i
exit
endif
enddo
if (mpi_master) then
call save_wavefunction_general(N_det_save,min(N_states,N_det_save),psi_det_sorted,size(psi_coef_sorted,1),psi_coef_sorted)
endif
end
subroutine save_wavefunction
implicit none
use bitmasks