mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 14:01:46 +02:00
Truncate CISD coefs to 1.e-12
This commit is contained in:
parent
df90b9fe98
commit
6caf7a2353
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user