10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-18 20:13:07 +01:00
quantum_package/plugins/SingleRefMethod/generators.irp.f

59 lines
1.2 KiB
Fortran
Raw Normal View History

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
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) ]
implicit none
BEGIN_DOC
! For Single reference wave functions, the generator is the
! Hartree-Fock determinant
END_DOC
psi_det_generators = 0_bit_kind
2014-05-27 17:30:44 +02:00
integer :: i,j,k
integer :: degree
do i=1,N_int
psi_det_generators(i,1,1) = HF_bitmask(i,1)
psi_det_generators(i,2,1) = HF_bitmask(i,2)
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
psi_det_generators(:,:,1) = psi_det(:,:,j)
psi_coef_generators(1,:) = psi_coef_generators(j,:)
2014-05-27 17:30:44 +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
BEGIN_PROVIDER [ integer, size_select_max ]
implicit none
BEGIN_DOC
! Size of select_max
END_DOC
size_select_max = 1
END_PROVIDER