2014-05-24 02:39:18 +02:00
|
|
|
use bitmasks
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ integer, N_det_generators ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! For Single reference wave functions, the number of generators is 1 : the
|
|
|
|
! Hartree-Fock determinant
|
|
|
|
END_DOC
|
|
|
|
N_det_generators = 1
|
|
|
|
END_PROVIDER
|
|
|
|
|
2015-04-02 10:26:45 +02:00
|
|
|
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
2015-04-02 11:40:16 +02:00
|
|
|
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (psi_det_size,N_states) ]
|
2014-05-24 02:39:18 +02:00
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! For Single reference wave functions, the generator is the
|
|
|
|
! Hartree-Fock determinant
|
|
|
|
END_DOC
|
2015-04-02 10:26:45 +02:00
|
|
|
psi_det_generators = 0_bit_kind
|
2014-05-27 17:30:44 +02:00
|
|
|
integer :: i,j,k
|
|
|
|
integer :: degree
|
2014-05-24 02:39:18 +02:00
|
|
|
|
|
|
|
do i=1,N_int
|
2015-04-02 10:26:45 +02:00
|
|
|
psi_det_generators(i,1,1) = HF_bitmask(i,1)
|
|
|
|
psi_det_generators(i,2,1) = HF_bitmask(i,2)
|
2014-05-24 02:39:18 +02:00
|
|
|
enddo
|
|
|
|
|
2014-05-27 17:30:44 +02:00
|
|
|
do j=1,N_det
|
|
|
|
call get_excitation_degree(HF_bitmask,psi_det(1,1,j),degree,N_int)
|
|
|
|
if (degree == 0) then
|
|
|
|
k = j
|
2014-06-25 14:58:58 +02:00
|
|
|
exit
|
2014-05-27 17:30:44 +02:00
|
|
|
endif
|
|
|
|
end do
|
|
|
|
|
2015-04-02 10:26:45 +02:00
|
|
|
psi_det_generators(:,:,1) = psi_det(:,:,j)
|
|
|
|
psi_coef_generators(1,:) = psi_coef_generators(j,:)
|
2014-05-27 17:30:44 +02:00
|
|
|
|
2014-05-24 02:39:18 +02:00
|
|
|
END_PROVIDER
|
|
|
|
|
2014-06-02 21:47:13 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, select_max, (1) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Memo to skip useless selectors
|
|
|
|
END_DOC
|
|
|
|
select_max(1) = huge(1.d0)
|
|
|
|
END_PROVIDER
|
2014-07-10 02:33:46 +02:00
|
|
|
|
|
|
|
BEGIN_PROVIDER [ integer, size_select_max ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Size of select_max
|
|
|
|
END_DOC
|
|
|
|
size_select_max = 1
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
|