10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-06-02 11:25:18 +02:00
qmcchem/src/svd.irp.f

43 lines
1.1 KiB
FortranFixed
Raw Normal View History

2021-06-21 14:30:29 +02:00
BEGIN_PROVIDER [ logical, use_svd ]
&BEGIN_PROVIDER [ integer, n_svd_coefs_full ]
implicit none
BEGIN_DOC
! If true, use SVD wave function
END_DOC
n_svd_coefs_full = -1
call get_spindeterminants_n_svd_coefs(n_svd_coefs_full)
use_svd = n_svd_coefs_full > 0
if (.not.use_SVD) then
n_svd_coefs_full = 1
endif
END_PROVIDER
BEGIN_PROVIDER [ integer, n_svd_coefs ]
implicit none
BEGIN_DOC
! If true, use SVD wave function
END_DOC
integer :: i
do i=1,n_svd_coefs_full
2021-06-29 15:55:53 +02:00
if (psi_svd_coefs(i) < ci_threshold) then
2021-06-21 14:30:29 +02:00
exit
endif
2021-06-29 15:55:53 +02:00
print *, i, psi_svd_coefs(i)
2021-06-21 14:30:29 +02:00
n_svd_coefs = n_svd_coefs+1
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, psi_svd_coefs, ( n_svd_coefs_full) ]
&BEGIN_PROVIDER [ double precision, psi_svd_alpha, (det_alpha_num, n_svd_coefs_full) ]
&BEGIN_PROVIDER [ double precision, psi_svd_beta , (det_beta_num , n_svd_coefs_full) ]
implicit none
BEGIN_DOC
! !!!
! truncated SVD
END_DOC
call get_spindeterminants_psi_svd_coefs(psi_svd_coefs)
call get_spindeterminants_psi_svd_alpha(psi_svd_alpha)
call get_spindeterminants_psi_svd_beta(psi_svd_beta)
END_PROVIDER