mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-25 17:54:44 +02:00
Introduced ao_sphe_num
This commit is contained in:
parent
aa70f6fada
commit
b5543cb37a
2
external/irpf90
vendored
2
external/irpf90
vendored
@ -1 +1 @@
|
||||
Subproject commit 4ab1b175fc7ed0d96c1912f13dc53579b24157a6
|
||||
Subproject commit 43160c60d88d9f61fb97cc0b35477c8eb0df862b
|
@ -22,6 +22,19 @@ BEGIN_PROVIDER [ integer, ao_shell, (ao_num) ]
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, ao_sphe_num ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Number of spherical AOs
|
||||
END_DOC
|
||||
integer :: n, i
|
||||
ao_sphe_num=0
|
||||
do i=1,shell_num
|
||||
n = shell_ang_mom(i)
|
||||
ao_sphe_num += 2*n+1
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, ao_sphe_shell, (ao_sphe_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
@ -1,6 +1,5 @@
|
||||
BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_coef, (ao_num,ao_num)]
|
||||
&BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_normalization, (ao_num)]
|
||||
&BEGIN_PROVIDER [ integer, ao_sphe_num ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Coefficients to go from cartesian to spherical coordinates in the current
|
||||
@ -11,18 +10,18 @@
|
||||
integer :: i
|
||||
integer, external :: ao_power_index
|
||||
integer :: ibegin,j,k
|
||||
integer :: prev
|
||||
integer :: prev, ao_sphe_count
|
||||
prev = 0
|
||||
ao_cart_to_sphe_coef(:,:) = 0.d0
|
||||
ao_cart_to_sphe_normalization(:) = 1.d0
|
||||
! Assume order provided by ao_power_index
|
||||
i = 1
|
||||
ao_sphe_num = 0
|
||||
ao_sphe_count = 0
|
||||
do while (i <= ao_num)
|
||||
select case ( ao_l(i) )
|
||||
case (0)
|
||||
ao_sphe_num += 1
|
||||
ao_cart_to_sphe_coef(i,ao_sphe_num) = 1.d0
|
||||
ao_sphe_count += 1
|
||||
ao_cart_to_sphe_coef(i,ao_sphe_count) = 1.d0
|
||||
ao_cart_to_sphe_normalization(i) = 1.d0
|
||||
i += 1
|
||||
BEGIN_TEMPLATE
|
||||
@ -30,14 +29,14 @@
|
||||
if (ao_power(i,1) == $SHELL) then
|
||||
do k=1,size(cart_to_sphe_$SHELL,2)
|
||||
do j=1,size(cart_to_sphe_$SHELL,1)
|
||||
ao_cart_to_sphe_coef(i+j-1,ao_sphe_num+k) = cart_to_sphe_$SHELL(j,k)
|
||||
ao_cart_to_sphe_coef(i+j-1,ao_sphe_count+k) = cart_to_sphe_$SHELL(j,k)
|
||||
enddo
|
||||
enddo
|
||||
do j=1,size(cart_to_sphe_$SHELL,1)
|
||||
ao_cart_to_sphe_normalization(i+j-1) = cart_to_sphe_norm_$SHELL(j)
|
||||
enddo
|
||||
i += size(cart_to_sphe_$SHELL,1)
|
||||
ao_sphe_num += size(cart_to_sphe_$SHELL,2)
|
||||
ao_sphe_count += size(cart_to_sphe_$SHELL,2)
|
||||
endif
|
||||
SUBST [ SHELL ]
|
||||
1;;
|
||||
@ -55,7 +54,9 @@
|
||||
end select
|
||||
enddo
|
||||
|
||||
print *, ao_cart_to_sphe_normalization(:)
|
||||
if (ao_sphe_count /= ao_sphe_num) then
|
||||
call qp_bug(irp_here, ao_sphe_count, "ao_sphe_count /= ao_sphe_num")
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_inv, (ao_sphe_num,ao_num) ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user