mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-18 11:23:38 +01:00
changed mapping
This commit is contained in:
parent
9ee697e567
commit
91a86c3b2f
@ -199,8 +199,8 @@ subroutine ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
|||||||
! | <ij|kj> | T0T | 0TF | F0T | 0FF | | | | |
|
! | <ij|kj> | T0T | 0TF | F0T | 0FF | | | | |
|
||||||
! | <ii|jj> | TT0 | | FF0 | | FT0(r) | TF0(r) | | |
|
! | <ii|jj> | TT0 | | FF0 | | FT0(r) | TF0(r) | | |
|
||||||
! +---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
! +---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||||
! | <ij|ij> | 00T | 00F | | | | | | |
|
! | <ij|ij> | | | | | 00T(r) | 00F(r) | | |
|
||||||
! | <ii|ii> | 000 | | | | | | | |
|
! | <ii|ii> | | | | | 000 | | | |
|
||||||
! +---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
! +---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: i,j,k,l
|
integer, intent(in) :: i,j,k,l
|
||||||
@ -221,11 +221,7 @@ subroutine ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
|||||||
|
|
||||||
if (ij==kl) then !real, J -> map1, K -> map2
|
if (ij==kl) then !real, J -> map1, K -> map2
|
||||||
sign=0.d0
|
sign=0.d0
|
||||||
if (i==k) then
|
use_map1=.False.
|
||||||
use_map1=.True.
|
|
||||||
else
|
|
||||||
use_map1=.False.
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
if (ik.eq.jl) then
|
if (ik.eq.jl) then
|
||||||
if (i.lt.k) then !TT0
|
if (i.lt.k) then !TT0
|
||||||
@ -292,12 +288,8 @@ complex*16 function get_ao_two_e_integral_periodic_simple(i,j,k,l,map,map2) resu
|
|||||||
call ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
call ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
||||||
if (use_map1) then
|
if (use_map1) then
|
||||||
call map_get(map,idx,tmp_re)
|
call map_get(map,idx,tmp_re)
|
||||||
if (sign/=0.d0) then
|
call map_get(map,idx+1,tmp_im)
|
||||||
call map_get(map,idx+1,tmp_im)
|
tmp_im *= sign
|
||||||
tmp_im *= sign
|
|
||||||
else
|
|
||||||
tmp_im=0.d0
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
call map_get(map2,idx,tmp_re)
|
call map_get(map2,idx,tmp_re)
|
||||||
if (sign/=0.d0) then
|
if (sign/=0.d0) then
|
||||||
|
@ -73,12 +73,8 @@ complex*16 function get_two_e_integral_periodic_simple(i,j,k,l,map,map2) result(
|
|||||||
call ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
call ao_two_e_integral_periodic_map_idx_sign(i,j,k,l,use_map1,idx,sign)
|
||||||
if (use_map1) then
|
if (use_map1) then
|
||||||
call map_get(map,idx,tmp_re)
|
call map_get(map,idx,tmp_re)
|
||||||
if (sign/=0.d0) then
|
call map_get(map,idx+1,tmp_im)
|
||||||
call map_get(map,idx+1,tmp_im)
|
tmp_im *= sign
|
||||||
tmp_im *= sign
|
|
||||||
else
|
|
||||||
tmp_im=0.d0
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
call map_get(map2,idx,tmp_re)
|
call map_get(map2,idx,tmp_re)
|
||||||
if (sign/=0.d0) then
|
if (sign/=0.d0) then
|
||||||
@ -291,20 +287,22 @@ end
|
|||||||
! deallocate(pairs,hash,iorder,tmp_val)
|
! deallocate(pairs,hash,iorder,tmp_val)
|
||||||
!end
|
!end
|
||||||
|
|
||||||
subroutine get_mo_two_e_integrals_coulomb_ii_periodic(k,l,sze,out_val,map)
|
subroutine get_mo_two_e_integrals_coulomb_ii_periodic(k,l,sze,out_val,map,map2)
|
||||||
use map_module
|
use map_module
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Returns multiple integrals <ki|li>
|
! Returns multiple integrals <ki|li>
|
||||||
! k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1)
|
! k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1)
|
||||||
! for k,l fixed.
|
! for k,l fixed.
|
||||||
! always in map1, take conjugate if k>l, real if k==l
|
! real and in map2 if k==l
|
||||||
|
! complex and in map1 otherwise
|
||||||
|
! take conjugate if k>l
|
||||||
! TODO: determine best way to structure code
|
! TODO: determine best way to structure code
|
||||||
! to account for single/double integral_kind, real/complex, and +/- imag part
|
! to account for single/double integral_kind, real/complex, and +/- imag part
|
||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: k,l, sze
|
integer, intent(in) :: k,l, sze
|
||||||
complex*16, intent(out) :: out_val(sze)
|
complex*16, intent(out) :: out_val(sze)
|
||||||
type(map_type), intent(inout) :: map
|
type(map_type), intent(inout) :: map,map2
|
||||||
integer :: i
|
integer :: i
|
||||||
integer(key_kind) :: hash(sze),hash_re(sze),hash_im(sze)
|
integer(key_kind) :: hash(sze),hash_re(sze),hash_im(sze)
|
||||||
real(integral_kind) :: tmp_re(sze),tmp_im(sze)
|
real(integral_kind) :: tmp_re(sze),tmp_im(sze)
|
||||||
@ -313,7 +311,7 @@ subroutine get_mo_two_e_integrals_coulomb_ii_periodic(k,l,sze,out_val,map)
|
|||||||
PROVIDE mo_two_e_integrals_in_map
|
PROVIDE mo_two_e_integrals_in_map
|
||||||
|
|
||||||
if (k.eq.l) then ! real, call other function
|
if (k.eq.l) then ! real, call other function
|
||||||
call get_mo_two_e_integrals_coulomb_ijij_periodic(k,sze,out_re,map)
|
call get_mo_two_e_integrals_coulomb_ijij_periodic(k,sze,out_re,map2)
|
||||||
do i=1,sze
|
do i=1,sze
|
||||||
out_val(i) = dcmplx(out_re(i),0.d0)
|
out_val(i) = dcmplx(out_re(i),0.d0)
|
||||||
enddo
|
enddo
|
||||||
@ -349,18 +347,18 @@ subroutine get_mo_two_e_integrals_coulomb_ii_periodic(k,l,sze,out_val,map)
|
|||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
|
||||||
subroutine get_mo_two_e_integrals_coulomb_ijij_periodic(j,sze,out_val,map)
|
subroutine get_mo_two_e_integrals_coulomb_ijij_periodic(j,sze,out_val,map2)
|
||||||
use map_module
|
use map_module
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Returns multiple integrals <ij|ij>
|
! Returns multiple integrals <ij|ij>
|
||||||
! i*(1)j*(2) 1/r12 i(1)j(2) :: out_val(i)
|
! i*(1)j*(2) 1/r12 i(1)j(2) :: out_val(i)
|
||||||
! for j fixed.
|
! for j fixed.
|
||||||
! always in map1, always real
|
! always in map2, always real
|
||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: j, sze
|
integer, intent(in) :: j, sze
|
||||||
double precision, intent(out) :: out_val(sze)
|
double precision, intent(out) :: out_val(sze)
|
||||||
type(map_type), intent(inout) :: map
|
type(map_type), intent(inout) :: map2
|
||||||
integer :: i
|
integer :: i
|
||||||
integer(key_kind) :: hash(sze),hash_re(sze)
|
integer(key_kind) :: hash(sze),hash_re(sze)
|
||||||
real(integral_kind) :: tmp_re(sze)
|
real(integral_kind) :: tmp_re(sze)
|
||||||
@ -374,9 +372,9 @@ subroutine get_mo_two_e_integrals_coulomb_ijij_periodic(j,sze,out_val,map)
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (integral_kind == 8) then
|
if (integral_kind == 8) then
|
||||||
call map_get_many(map, hash_re, out_val, sze)
|
call map_get_many(map2, hash_re, out_val, sze)
|
||||||
else
|
else
|
||||||
call map_get_many(map, hash_re, tmp_re, sze)
|
call map_get_many(map2, hash_re, tmp_re, sze)
|
||||||
! Conversion to double complex
|
! Conversion to double complex
|
||||||
do i=1,sze
|
do i=1,sze
|
||||||
out_val(i) = dble(tmp_re(i))
|
out_val(i) = dble(tmp_re(i))
|
||||||
@ -401,7 +399,7 @@ subroutine get_mo_two_e_integrals_exch_ii_periodic(k,l,sze,out_val,map,map2)
|
|||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: k,l, sze
|
integer, intent(in) :: k,l, sze
|
||||||
double precision, intent(out) :: out_val(sze)
|
double precision, intent(out) :: out_val(sze)
|
||||||
type(map_type), intent(inout) :: map
|
type(map_type), intent(inout) :: map,map2
|
||||||
integer :: i
|
integer :: i
|
||||||
integer(key_kind) :: hash(sze),hash_re(sze),hash_im(sze)
|
integer(key_kind) :: hash(sze),hash_re(sze),hash_im(sze)
|
||||||
real(integral_kind) :: tmp_re(sze),tmp_im(sze)
|
real(integral_kind) :: tmp_re(sze),tmp_im(sze)
|
||||||
@ -466,7 +464,7 @@ subroutine get_mo_two_e_integrals_exch_ijji_periodic(j,sze,out_val,map,map2)
|
|||||||
! Returns multiple integrals <ij|ji>
|
! Returns multiple integrals <ij|ji>
|
||||||
! i*(1)j*(2) 1/r12 j(1)i(2) :: out_val(i)
|
! i*(1)j*(2) 1/r12 j(1)i(2) :: out_val(i)
|
||||||
! for j fixed.
|
! for j fixed.
|
||||||
! always real, always in map2 (except when j==i, then in map1)
|
! always real, always in map2
|
||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: j, sze
|
integer, intent(in) :: j, sze
|
||||||
double precision, intent(out) :: out_val(sze)
|
double precision, intent(out) :: out_val(sze)
|
||||||
@ -485,10 +483,8 @@ subroutine get_mo_two_e_integrals_exch_ijji_periodic(j,sze,out_val,map,map2)
|
|||||||
|
|
||||||
if (integral_kind == 8) then
|
if (integral_kind == 8) then
|
||||||
call map_get_many(map2, hash_re, out_val, sze)
|
call map_get_many(map2, hash_re, out_val, sze)
|
||||||
call map_get(map,hash_re(j), out_val(j))
|
|
||||||
else
|
else
|
||||||
call map_get_many(map2, hash_re, tmp_val, sze)
|
call map_get_many(map2, hash_re, tmp_val, sze)
|
||||||
call map_get(map, hash_re(j), tmp_val(j))
|
|
||||||
! Conversion to double precision
|
! Conversion to double precision
|
||||||
do i=1,sze
|
do i=1,sze
|
||||||
out_val(i) = dble(tmp_val(i))
|
out_val(i) = dble(tmp_val(i))
|
||||||
|
@ -28,8 +28,8 @@ MO 2e ints:
|
|||||||
maybe good idea to make map_get for two neighboring vals? (re/im parts)
|
maybe good idea to make map_get for two neighboring vals? (re/im parts)
|
||||||
|
|
||||||
mapping:
|
mapping:
|
||||||
should change so that all of the real ints are in map2
|
changed so that all real ints (Jij, Kij, Jii) are in map2
|
||||||
(will make some things simpler when retrieving exchange ints <ij|ji> (currently, all of these are in map2 except when i==j))
|
<ij|ij>, <ij|ji>, <ii|ii>
|
||||||
|
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
Loading…
Reference in New Issue
Block a user