mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Renamed psi_generators in psi_det_generators
This commit is contained in:
parent
a95adca2c7
commit
c8c64a76ff
@ -62,17 +62,17 @@ program full_ci
|
||||
print *, 'CAS determinants'
|
||||
do i=1,N_det_generators
|
||||
do k=i,N_det_generators
|
||||
call get_excitation_degree(psi_generators(1,1,k),psi_det(1,1,i),degree,N_int)
|
||||
call get_excitation_degree(psi_det_generators(1,1,k),psi_det_generators(1,1,i),degree,N_int)
|
||||
exc_max = max(exc_max,degree)
|
||||
enddo
|
||||
call debug_det(psi_generators(1,1,i),N_int)
|
||||
call debug_det(psi_det_generators(1,1,i),N_int)
|
||||
print *, ''
|
||||
enddo
|
||||
print *, 'Max excitation degree in the CAS :', exc_max
|
||||
do i=1,N_det
|
||||
in_cas = .False.
|
||||
do k=1,N_det_generators
|
||||
call get_excitation_degree(psi_generators(1,1,k),psi_det(1,1,i),degree,N_int)
|
||||
call get_excitation_degree(psi_det_generators(1,1,k),psi_det(1,1,i),degree,N_int)
|
||||
if (degree == 0) then
|
||||
in_cas = .True.
|
||||
exit
|
||||
|
@ -421,32 +421,32 @@ subroutine $subroutine($params_main)
|
||||
do k=1,N_int
|
||||
mask(k,ispin,s_hole) = &
|
||||
iand(generators_bitmask(k,ispin,s_hole,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,s_part) = &
|
||||
iand(generators_bitmask(k,ispin,s_part,i_bitmask_gen), &
|
||||
not(psi_generators(k,ispin,i_generator)) )
|
||||
not(psi_det_generators(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole1) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole1,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part1) = &
|
||||
iand(generators_bitmask(k,ispin,d_part1,i_bitmask_gen), &
|
||||
not(psi_generators(k,ispin,i_generator)) )
|
||||
not(psi_det_generators(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole2) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole2,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part2) = &
|
||||
iand(generators_bitmask(k,ispin,d_part2,i_bitmask_gen), &
|
||||
not(psi_generators(k,ispin,i_generator)) )
|
||||
not(psi_det_generators(k,ispin,i_generator)) )
|
||||
enddo
|
||||
enddo
|
||||
if($do_double_excitations)then
|
||||
call $subroutine_diexc(psi_generators(1,1,i_generator), &
|
||||
call $subroutine_diexc(psi_det_generators(1,1,i_generator), &
|
||||
mask(1,1,d_hole1), mask(1,1,d_part1), &
|
||||
mask(1,1,d_hole2), mask(1,1,d_part2), &
|
||||
i_generator, 0 $params_post)
|
||||
endif
|
||||
if($do_mono_excitations)then
|
||||
call $subroutine_monoexc(psi_generators(1,1,i_generator), &
|
||||
call $subroutine_monoexc(psi_det_generators(1,1,i_generator), &
|
||||
mask(1,1,s_hole ), mask(1,1,s_part ), &
|
||||
i_generator, 0 $params_post)
|
||||
endif
|
||||
@ -481,33 +481,33 @@ subroutine $subroutine($params_main)
|
||||
do k=1,N_int
|
||||
mask(k,ispin,s_hole) = &
|
||||
iand(generators_bitmask(k,ispin,s_hole,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,s_part) = &
|
||||
iand(generators_bitmask(k,ispin,s_part,i_bitmask_gen), &
|
||||
not(psi_generators(k,ispin,i_generator)) )
|
||||
not(psi_det_generators(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole1) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole1,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part1) = &
|
||||
iand(generators_bitmask(k,ispin,d_part1,i_bitmask_gen), &
|
||||
not(psi_generators(k,ispin,i_generator)) )
|
||||
not(psi_det_generators(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole2) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole2,i_bitmask_gen), &
|
||||
psi_generators(k,ispin,i_generator) )
|
||||
psi_det_generators(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part2) = &
|
||||
iand(generators_bitmask(k,ispin,d_part2,i_bitmask_gen), &
|
||||
not (psi_generators(k,ispin,i_generator)) )
|
||||
not (psi_det_generators(k,ispin,i_generator)) )
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if($do_double_excitations)then
|
||||
call $subroutine_diexc(psi_generators(1,1,i_generator), &
|
||||
call $subroutine_diexc(psi_det_generators(1,1,i_generator), &
|
||||
mask(1,1,d_hole1), mask(1,1,d_part1), &
|
||||
mask(1,1,d_hole2), mask(1,1,d_part2), &
|
||||
i_generator, iproc $params_post)
|
||||
endif
|
||||
if($do_mono_excitations)then
|
||||
call $subroutine_monoexc(psi_generators(1,1,i_generator), &
|
||||
call $subroutine_monoexc(psi_det_generators(1,1,i_generator), &
|
||||
mask(1,1,s_hole ), mask(1,1,s_part ), &
|
||||
i_generator, iproc $params_post)
|
||||
endif
|
||||
|
@ -31,7 +31,7 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
call write_int(output_dets,N_det_generators,'Number of generators')
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
@ -57,10 +57,10 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
if (good) then
|
||||
m = m+1
|
||||
do k=1,N_int
|
||||
psi_generators(k,1,m) = psi_det(k,1,i)
|
||||
psi_generators(k,2,m) = psi_det(k,2,i)
|
||||
psi_det_generators(k,1,m) = psi_det(k,1,i)
|
||||
psi_det_generators(k,2,m) = psi_det(k,2,i)
|
||||
enddo
|
||||
! call debug_det(psi_generators(1,1,m),N_int)
|
||||
! call debug_det(psi_det_generators(1,1,m),N_int)
|
||||
endif
|
||||
enddo
|
||||
|
||||
|
@ -34,7 +34,7 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
call write_int(output_dets,N_det_generators,'Number of generators')
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
@ -43,8 +43,8 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
integer :: i, k
|
||||
do i=1,N_det
|
||||
do k=1,N_int
|
||||
psi_generators(k,1,i) = psi_det_sorted(k,1,i)
|
||||
psi_generators(k,2,i) = psi_det_sorted(k,2,i)
|
||||
psi_det_generators(k,1,i) = psi_det_sorted(k,1,i)
|
||||
psi_det_generators(k,2,i) = psi_det_sorted(k,2,i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
@ -58,7 +58,7 @@ BEGIN_PROVIDER [integer, degree_max_generators]
|
||||
integer :: i,degree
|
||||
degree_max_generators = 0
|
||||
do i = 1, N_det_generators
|
||||
call get_excitation_degree(HF_bitmask,psi_generators(1,1,i),degree,N_int)
|
||||
call get_excitation_degree(HF_bitmask,psi_det_generators(1,1,i),degree,N_int)
|
||||
if(degree .gt. degree_max_generators)then
|
||||
degree_max_generators = degree
|
||||
endif
|
||||
|
@ -17,8 +17,8 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,N_det_generators) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_generators_coef, (N_det_generators,N_states)
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det_generators) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det_generators,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! read wf
|
||||
@ -29,11 +29,11 @@ END_PROVIDER
|
||||
if(ifirst == 0)then
|
||||
do i=1,N_det_generators
|
||||
do k=1,N_int
|
||||
psi_generators(k,1,i) = psi_det(k,1,i)
|
||||
psi_generators(k,2,i) = psi_det(k,2,i)
|
||||
psi_det_generators(k,1,i) = psi_det(k,1,i)
|
||||
psi_det_generators(k,2,i) = psi_det(k,2,i)
|
||||
enddo
|
||||
do k = 1, N_states
|
||||
psi_generators_coef(i,k) = psi_coef(i,k)
|
||||
psi_coef_generators(i,k) = psi_coef(i,k)
|
||||
enddo
|
||||
enddo
|
||||
ifirst = 1
|
||||
|
@ -20,7 +20,7 @@ subroutine mrcc_dress(delta_ij_sd_,Ndet_sd,i_generator,n_selected,det_buffer,Nin
|
||||
|
||||
N_tq = 0
|
||||
do i=1,N_selected
|
||||
c_ref = connected_to_ref(det_buffer(1,1,i),psi_generators,Nint, &
|
||||
c_ref = connected_to_ref(det_buffer(1,1,i),psi_det_generators,Nint, &
|
||||
i_generator,N_det_generators)
|
||||
|
||||
if (c_ref /= 0) then
|
||||
|
@ -25,7 +25,7 @@ subroutine perturb_buffer_$PERT(i_generator,buffer,buffer_size,e_2_pert_buffer,c
|
||||
ASSERT (N_st > 0)
|
||||
do i = 1,buffer_size
|
||||
|
||||
c_ref = connected_to_ref(buffer(1,1,i),psi_generators,Nint,i_generator,N_det_generators)
|
||||
c_ref = connected_to_ref(buffer(1,1,i),psi_det_generators,Nint,i_generator,N_det_generators)
|
||||
|
||||
if (c_ref /= 0) then
|
||||
cycle
|
||||
@ -76,7 +76,7 @@ subroutine perturb_buffer_by_mono_$PERT(i_generator,buffer,buffer_size,e_2_pert_
|
||||
ASSERT (N_st > 0)
|
||||
do i = 1,buffer_size
|
||||
|
||||
c_ref = connected_to_ref_by_mono(buffer(1,1,i),psi_generators,Nint,i_generator,N_det)
|
||||
c_ref = connected_to_ref_by_mono(buffer(1,1,i),psi_det_generators,Nint,i_generator,N_det)
|
||||
|
||||
if (c_ref /= 0) then
|
||||
cycle
|
||||
|
@ -9,19 +9,20 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
N_det_generators = 1
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer(bit_kind), psi_coef_generators, (1,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
! Hartree-Fock determinant
|
||||
END_DOC
|
||||
psi_generators = 0_bit_kind
|
||||
psi_det_generators = 0_bit_kind
|
||||
integer :: i,j,k
|
||||
integer :: degree
|
||||
|
||||
do i=1,N_int
|
||||
psi_generators(i,1,1) = HF_bitmask(i,1)
|
||||
psi_generators(i,2,1) = HF_bitmask(i,2)
|
||||
psi_det_generators(i,1,1) = HF_bitmask(i,1)
|
||||
psi_det_generators(i,2,1) = HF_bitmask(i,2)
|
||||
enddo
|
||||
|
||||
do j=1,N_det
|
||||
@ -32,12 +33,8 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,psi_det_size) ]
|
||||
endif
|
||||
end do
|
||||
|
||||
do j=2,k
|
||||
psi_generators(:,:,j) = psi_det(:,:,j-1)
|
||||
enddo
|
||||
do j=k+1,N_det
|
||||
psi_generators(:,:,j) = psi_det(:,:,j)
|
||||
enddo
|
||||
psi_det_generators(:,:,1) = psi_det(:,:,j)
|
||||
psi_coef_generators(1,:) = psi_coef_generators(j,:)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user