mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-26 10:14:45 +02:00
ao_two_e_ints compiles vi NEED
This commit is contained in:
parent
97d041b17f
commit
8ce2be608c
@ -1,7 +1,7 @@
|
|||||||
hamiltonian
|
hamiltonian
|
||||||
ao_one_e_ints
|
ao_one_e_ints
|
||||||
pseudo
|
pseudo
|
||||||
bitmask
|
|
||||||
ao_basis
|
ao_basis
|
||||||
|
bitmask_mod
|
||||||
two_e_ints_keywords
|
two_e_ints_keywords
|
||||||
ao_cart_two_e_ints
|
ao_cart_two_e_ints
|
||||||
|
@ -131,7 +131,7 @@ subroutine add_integrals$_erf_to_map_cholesky_ao
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subroutine clear_ao_map
|
subroutine clear_ao$_erf_map
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Frees the meaory of the AO map
|
! Frees the meaory of the AO map
|
||||||
|
@ -78,9 +78,9 @@ double precision function get_ao_two_e_integral$_erf(i, j, k, l) result(result)
|
|||||||
logical, external :: ao_two_e_integral_zero
|
logical, external :: ao_two_e_integral_zero
|
||||||
PROVIDE ao_two_e_integrals$_erf_in_map ao_integrals$_erf_cache ao_integrals$_erf_cache_min
|
PROVIDE ao_two_e_integrals$_erf_in_map ao_integrals$_erf_cache ao_integrals$_erf_cache_min
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
if (ao_two_e_integral_zero(i,j,k,l)) then
|
! if (ao_two_e_integral_zero(i,j,k,l)) then
|
||||||
tmp = 0.d0
|
! tmp = 0.d0
|
||||||
else
|
! else
|
||||||
ii = l-ao_integrals$_erf_cache_min
|
ii = l-ao_integrals$_erf_cache_min
|
||||||
ii = ior(ii, k-ao_integrals$_erf_cache_min)
|
ii = ior(ii, k-ao_integrals$_erf_cache_min)
|
||||||
ii = ior(ii, j-ao_integrals$_erf_cache_min)
|
ii = ior(ii, j-ao_integrals$_erf_cache_min)
|
||||||
@ -89,7 +89,7 @@ double precision function get_ao_two_e_integral$_erf(i, j, k, l) result(result)
|
|||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
call two_e_integrals_index(i,j,k,l,idx)
|
call two_e_integrals_index(i,j,k,l,idx)
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
call map_get(map,idx,tmp)
|
call map_get(ao_integrals$_erf_map,idx,tmp)
|
||||||
else
|
else
|
||||||
ii = l-ao_integrals$_erf_cache_min
|
ii = l-ao_integrals$_erf_cache_min
|
||||||
ii = ior( shiftl(ii,6), k-ao_integrals$_erf_cache_min)
|
ii = ior( shiftl(ii,6), k-ao_integrals$_erf_cache_min)
|
||||||
@ -97,7 +97,7 @@ double precision function get_ao_two_e_integral$_erf(i, j, k, l) result(result)
|
|||||||
ii = ior( shiftl(ii,6), i-ao_integrals$_erf_cache_min)
|
ii = ior( shiftl(ii,6), i-ao_integrals$_erf_cache_min)
|
||||||
tmp = ao_integrals$_erf_cache(ii)
|
tmp = ao_integrals$_erf_cache(ii)
|
||||||
endif
|
endif
|
||||||
endif
|
! endif
|
||||||
result = tmp
|
result = tmp
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -203,9 +203,9 @@ subroutine get_ao_two_e_integrals$_erf_non_zero_jl(j,l,thresh,sze_max,sze,out_va
|
|||||||
integer, external :: ao_l4
|
integer, external :: ao_l4
|
||||||
double precision, external :: ao_two_e_integral
|
double precision, external :: ao_two_e_integral
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
if (ao_two_e_integral_zero(i,j,k,l)) then
|
! if (ao_two_e_integral_zero(i,j,k,l)) then
|
||||||
cycle
|
! cycle
|
||||||
endif
|
! endif
|
||||||
call two_e_integrals_index(i,j,k,l,hash)
|
call two_e_integrals_index(i,j,k,l,hash)
|
||||||
call map_get(ao_integrals$_erf_map, hash,tmp)
|
call map_get(ao_integrals$_erf_map, hash,tmp)
|
||||||
if (dabs(tmp) < thresh ) cycle
|
if (dabs(tmp) < thresh ) cycle
|
||||||
@ -253,9 +253,9 @@ subroutine get_ao_two_e_integrals$_erf_non_zero_jl_from_list(j,l,thresh,list,n_l
|
|||||||
integer, external :: ao_l4
|
integer, external :: ao_l4
|
||||||
double precision, external :: ao_two_e_integral
|
double precision, external :: ao_two_e_integral
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
if (ao_two_e_integral_zero(i,j,k,l)) then
|
! if (ao_two_e_integral_zero(i,j,k,l)) then
|
||||||
cycle
|
! cycle
|
||||||
endif
|
! endif
|
||||||
call two_e_integrals_index(i,j,k,l,hash)
|
call two_e_integrals_index(i,j,k,l,hash)
|
||||||
call map_get(ao_integrals$_erf_map, hash,tmp)
|
call map_get(ao_integrals$_erf_map, hash,tmp)
|
||||||
if (dabs(tmp) < thresh ) cycle
|
if (dabs(tmp) < thresh ) cycle
|
||||||
@ -272,11 +272,11 @@ end
|
|||||||
|
|
||||||
function get_ao$_erf_map_size()
|
function get_ao$_erf_map_size()
|
||||||
implicit none
|
implicit none
|
||||||
integer (map_size_kind) :: get_ao_map_size
|
integer (map_size_kind) :: get_ao$_erf_map_size
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Returns the number of elements in the AO map
|
! Returns the number of elements in the AO map
|
||||||
END_DOC
|
END_DOC
|
||||||
get_ao_map$_erf_size = ao_integrals$_erf_map % n_elements
|
get_ao$_erf_map_size = ao_integrals$_erf_map % n_elements
|
||||||
end
|
end
|
||||||
|
|
||||||
subroutine clear_ao$_erf_map
|
subroutine clear_ao$_erf_map
|
||||||
@ -316,7 +316,7 @@ subroutine dump_ao_integrals$_erf(filename)
|
|||||||
call ezfio_set_work_empty(.False.)
|
call ezfio_set_work_empty(.False.)
|
||||||
open(unit=66,file=filename,FORM='unformatted')
|
open(unit=66,file=filename,FORM='unformatted')
|
||||||
write(66) integral_kind, key_kind
|
write(66) integral_kind, key_kind
|
||||||
write(66) ao_integral$s_erf_map%sorted, ao_integrals$_erf_map%map_size, &
|
write(66) ao_integrals$_erf_map%sorted, ao_integrals$_erf_map%map_size, &
|
||||||
ao_integrals$_erf_map%n_elements
|
ao_integrals$_erf_map%n_elements
|
||||||
do i=0_8,ao_integrals$_erf_map%map_size
|
do i=0_8,ao_integrals$_erf_map%map_size
|
||||||
write(66) ao_integrals$_erf_map%map(i)%sorted, ao_integrals$_erf_map%map(i)%map_size,&
|
write(66) ao_integrals$_erf_map%map(i)%sorted, ao_integrals$_erf_map%map(i)%map_size,&
|
||||||
|
@ -1 +1,2 @@
|
|||||||
|
bitmask_mod
|
||||||
mo_basis
|
mo_basis
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
bitmasks
|
|
||||||
N_int integer
|
|
||||||
bit_kind integer
|
|
||||||
|
|
@ -1,49 +1,5 @@
|
|||||||
use bitmasks
|
use bitmasks
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer, N_int ]
|
|
||||||
implicit none
|
|
||||||
include 'utils/constants.include.F'
|
|
||||||
BEGIN_DOC
|
|
||||||
! Number of 64-bit integers needed to represent determinants as binary strings
|
|
||||||
END_DOC
|
|
||||||
N_int = (mo_num-1)/bit_kind_size + 1
|
|
||||||
call write_int(6,N_int, 'N_int')
|
|
||||||
if (N_int > N_int_max) then
|
|
||||||
stop 'N_int > N_int_max'
|
|
||||||
endif
|
|
||||||
|
|
||||||
END_PROVIDER
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer(bit_kind), full_ijkl_bitmask, (N_int) ]
|
|
||||||
implicit none
|
|
||||||
BEGIN_DOC
|
|
||||||
! Bitmask to include all possible MOs
|
|
||||||
END_DOC
|
|
||||||
|
|
||||||
integer :: i,j,k
|
|
||||||
k=0
|
|
||||||
do j=1,N_int
|
|
||||||
full_ijkl_bitmask(j) = 0_bit_kind
|
|
||||||
do i=0,bit_kind_size-1
|
|
||||||
k=k+1
|
|
||||||
full_ijkl_bitmask(j) = ibset(full_ijkl_bitmask(j),i)
|
|
||||||
if (k == mo_num) exit
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
END_PROVIDER
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer(bit_kind), full_ijkl_bitmask_4, (N_int,4) ]
|
|
||||||
implicit none
|
|
||||||
integer :: i
|
|
||||||
do i=1,N_int
|
|
||||||
full_ijkl_bitmask_4(i,1) = full_ijkl_bitmask(i)
|
|
||||||
full_ijkl_bitmask_4(i,2) = full_ijkl_bitmask(i)
|
|
||||||
full_ijkl_bitmask_4(i,3) = full_ijkl_bitmask(i)
|
|
||||||
full_ijkl_bitmask_4(i,4) = full_ijkl_bitmask(i)
|
|
||||||
enddo
|
|
||||||
END_PROVIDER
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer(bit_kind), core_inact_act_bitmask_4, (N_int,4) ]
|
BEGIN_PROVIDER [ integer(bit_kind), core_inact_act_bitmask_4, (N_int,4) ]
|
||||||
implicit none
|
implicit none
|
||||||
integer :: i
|
integer :: i
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
module bitmasks
|
|
||||||
integer, parameter :: bit_kind_shift = 6 ! 5: 32 bits, 6: 64 bits
|
|
||||||
integer, parameter :: bit_kind_size = 64
|
|
||||||
integer, parameter :: bit_kind = 8
|
|
||||||
integer, parameter :: d_hole1 = 1
|
|
||||||
integer, parameter :: d_part1 = 2
|
|
||||||
integer, parameter :: d_hole2 = 3
|
|
||||||
integer, parameter :: d_part2 = 4
|
|
||||||
integer, parameter :: s_hole = 5
|
|
||||||
integer, parameter :: s_part = 6
|
|
||||||
end module bitmasks
|
|
Loading…
x
Reference in New Issue
Block a user