10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2025-04-05 16:31:40 +02:00

update two_rdm_routines

This commit is contained in:
Anthony Scemama 2025-02-26 14:42:39 +01:00
parent ed1253f629
commit 62c13860ba
4 changed files with 854 additions and 835 deletions

View File

@ -283,33 +283,16 @@ subroutine print_det_one_dimension(string,Nint)
end end
logical function is_integer_in_string(bite,string,Nint) logical function is_integer_in_string(orb,bitmask,Nint)
use bitmasks use bitmasks
implicit none implicit none
integer, intent(in) :: bite,Nint BEGIN_DOC
integer(bit_kind), intent(in) :: string(Nint) ! Checks is the orbital orb is set to 1 in the bit string
integer(bit_kind) :: string_bite(Nint) END_DOC
integer :: i,itot,itot_and integer, intent(in) :: orb, Nint
character*(2048) :: output(1) integer(bit_kind), intent(in) :: bitmask(Nint)
string_bite = 0_bit_kind integer :: j, k
call set_bit_to_integer(bite,string_bite,Nint) k = ishft(orb-1,-bit_kind_shift)+1
itot = 0 j = orb-ishft(k-1,bit_kind_shift)-1
itot_and = 0 is_integer_in_string = iand(bitmask(k), ibset(0_bit_kind, j)) /= 0_bit_kind
is_integer_in_string = .False.
!print*,''
!print*,''
!print*,'bite = ',bite
!call bitstring_to_str( output(1), string_bite, Nint )
! print *, trim(output(1))
!call bitstring_to_str( output(1), string, Nint )
! print *, trim(output(1))
do i = 1, Nint
itot += popcnt(string(i))
itot_and += popcnt(ior(string(i),string_bite(i)))
enddo
!print*,'itot,itot_and',itot,itot_and
if(itot == itot_and)then
is_integer_in_string = .True.
endif
!pause
end end

View File

@ -145,6 +145,7 @@
print*,'' print*,''
print*,'Providing act_2_rdm_spin_trace_mo ' print*,'Providing act_2_rdm_spin_trace_mo '
character*(128) :: name_file character*(128) :: name_file
PROVIDE all_mo_integrals
name_file = 'act_2_rdm_spin_trace_mo' name_file = 'act_2_rdm_spin_trace_mo'
ispin = 4 ispin = 4
act_2_rdm_spin_trace_mo = 0.d0 act_2_rdm_spin_trace_mo = 0.d0

View File

@ -194,6 +194,7 @@ subroutine orb_range_2_rdm_openmp_work_$N_int(big_array,dim1,norb,list_orb,ispin
!$OMP DO SCHEDULE(dynamic) !$OMP DO SCHEDULE(dynamic)
do k_a=istart+ishift,iend,istep do k_a=istart+ishift,iend,istep
!print *, 'aa', k_a, '/', iend
krow = psi_bilinear_matrix_rows(k_a) krow = psi_bilinear_matrix_rows(k_a)
ASSERT (krow <= N_det_alpha_unique) ASSERT (krow <= N_det_alpha_unique)
@ -282,6 +283,7 @@ subroutine orb_range_2_rdm_openmp_work_$N_int(big_array,dim1,norb,list_orb,ispin
!$OMP DO SCHEDULE(dynamic) !$OMP DO SCHEDULE(dynamic)
do k_a=istart+ishift,iend,istep do k_a=istart+ishift,iend,istep
!print *, 'ab', k_a, '/', iend
! Single and double alpha exitations ! Single and double alpha exitations

File diff suppressed because it is too large Load Diff