mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 05:51:46 +02:00
Corrected bug in pseudo
This commit is contained in:
parent
c2ccbad730
commit
8c8a571399
@ -53,7 +53,6 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Nstates, Ndet_non_ref, Ndet_ref,i_ge
|
|||||||
integer :: mobiles(2), smallerlist
|
integer :: mobiles(2), smallerlist
|
||||||
logical, external :: is_generable
|
logical, external :: is_generable
|
||||||
|
|
||||||
print *, i_generator
|
|
||||||
leng = max(N_det_generators, N_det_non_ref)
|
leng = max(N_det_generators, N_det_non_ref)
|
||||||
allocate(miniList(Nint, 2, leng), idx_minilist(leng), hij_cache(N_det_non_ref))
|
allocate(miniList(Nint, 2, leng), idx_minilist(leng), hij_cache(N_det_non_ref))
|
||||||
|
|
||||||
|
@ -282,8 +282,7 @@ if(ac.eq.0.d0.and.bc.eq.0.d0)then
|
|||||||
if (prod == 0.d0) cycle
|
if (prod == 0.d0) cycle
|
||||||
prodp=bigI(0,0,l,m,n_b(1),n_b(2),n_b(3))
|
prodp=bigI(0,0,l,m,n_b(1),n_b(2),n_b(3))
|
||||||
if (prodp == 0.d0) cycle
|
if (prodp == 0.d0) cycle
|
||||||
accu=accu+prod*prodp*v_kl(k,l)*int_prod_bessel(ktot+2,g_a+g_b+dz_kl(k,l),0,0,areal,breal,arg)
|
accu=accu+prod*prodp*v_kl(k,l)*int_prod_bessel(ktot+2,g_a+g_b+dz_kl(k,l),0,0,areal,breal,arg)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
@ -1829,13 +1828,15 @@ end
|
|||||||
|
|
||||||
double precision function coef_nk(n,k)
|
double precision function coef_nk(n,k)
|
||||||
implicit none
|
implicit none
|
||||||
integer n,k, ISHFT
|
integer n,k
|
||||||
|
|
||||||
double precision gam,dble_fact,fact
|
double precision gam,dble_fact,fact
|
||||||
|
|
||||||
|
if (k<0) stop 'pseudopot.f90 : coef_nk'
|
||||||
|
if (k>63) stop 'pseudopot.f90 : coef_nk'
|
||||||
gam=dble_fact(n+n+k+k+1)
|
gam=dble_fact(n+n+k+k+1)
|
||||||
! coef_nk=1.d0/(2.d0**k*fact(k)*gam)
|
! coef_nk=1.d0/(2.d0**k*fact(k)*gam)
|
||||||
coef_nk=1.d0/(dble(ibset(0,k))*fact(k)*gam)
|
coef_nk=1.d0/(dble(ibset(0_8,k))*fact(k)*gam)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -156,12 +156,19 @@ double precision function dble_fact_even(n) result(fact2)
|
|||||||
! n!!
|
! n!!
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: n,k
|
integer :: n,k
|
||||||
double precision, save :: memo(1:100)
|
double precision, save :: memo(0:100)
|
||||||
integer, save :: memomax = 2
|
integer, save :: memomax = 0
|
||||||
double precision :: prod
|
double precision :: prod
|
||||||
|
|
||||||
ASSERT (iand(n,1) /= 1)
|
ASSERT (iand(n,1) /= 1)
|
||||||
|
|
||||||
|
! prod=1.d0
|
||||||
|
! do k=2,n,2
|
||||||
|
! prod=prod*dfloat(k)
|
||||||
|
! enddo
|
||||||
|
! fact2=prod
|
||||||
|
! return
|
||||||
|
!
|
||||||
if (n <= memomax) then
|
if (n <= memomax) then
|
||||||
if (n < 2) then
|
if (n < 2) then
|
||||||
fact2 = 1.d0
|
fact2 = 1.d0
|
||||||
@ -172,6 +179,7 @@ double precision function dble_fact_even(n) result(fact2)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
integer :: i
|
integer :: i
|
||||||
|
memo(0)=1.d0
|
||||||
memo(1)=1.d0
|
memo(1)=1.d0
|
||||||
do i=memomax+2,min(n,100),2
|
do i=memomax+2,min(n,100),2
|
||||||
memo(i) = memo(i-2)* dble(i)
|
memo(i) = memo(i-2)* dble(i)
|
||||||
|
Loading…
Reference in New Issue
Block a user