mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-25 17:54:44 +02:00
Added jastrow_jast_qmckl_spin_independent
This commit is contained in:
parent
6c1b5cb770
commit
c12693fc9f
@ -95,6 +95,12 @@ type: double precision
|
|||||||
size: (jastrow.jast_qmckl_c_vector_size)
|
size: (jastrow.jast_qmckl_c_vector_size)
|
||||||
interface: ezfio, provider
|
interface: ezfio, provider
|
||||||
|
|
||||||
|
[jast_qmckl_spin_independent]
|
||||||
|
doc: If True, cusp is 0.25 for same-spin pairs and 0.5 for opposite. Otherwise, 0.5 for both
|
||||||
|
type: logical
|
||||||
|
interface: ezfio, provider
|
||||||
|
default: True
|
||||||
|
|
||||||
[j1e_size]
|
[j1e_size]
|
||||||
type: integer
|
type: integer
|
||||||
doc: number of functions per atom in 1e-Jastrow
|
doc: number of functions per atom in 1e-Jastrow
|
||||||
|
@ -9,7 +9,10 @@ BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
|
|||||||
|
|
||||||
qmckl_ctx_jastrow = qmckl_context_create()
|
qmckl_ctx_jastrow = qmckl_context_create()
|
||||||
|
|
||||||
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, 1)
|
if (.not.jast_qmckl_spin_independent) then
|
||||||
|
print *, 'WARNING: In QMCkl Jastrow, jast_qmckl_spin_independent should to be set to True'
|
||||||
|
endif
|
||||||
|
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, jast_qmckl_spin_independent)
|
||||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||||
if (rc /= QMCKL_SUCCESS) stop -1
|
if (rc /= QMCKL_SUCCESS) stop -1
|
||||||
|
|
||||||
|
@ -66,4 +66,5 @@ if __name__ == '__main__':
|
|||||||
ezfio.set_jastrow_jast_qmckl_a_vector(jastrow['vec_a'])
|
ezfio.set_jastrow_jast_qmckl_a_vector(jastrow['vec_a'])
|
||||||
ezfio.set_jastrow_jast_qmckl_b_vector(jastrow['vec_b'])
|
ezfio.set_jastrow_jast_qmckl_b_vector(jastrow['vec_b'])
|
||||||
ezfio.set_jastrow_jast_qmckl_c_vector(jastrow['vec_c'])
|
ezfio.set_jastrow_jast_qmckl_c_vector(jastrow['vec_c'])
|
||||||
|
ezfio.set_jastrow_jast_qmckl_spin_independent(True)
|
||||||
|
|
||||||
|
@ -805,3 +805,74 @@ END_PROVIDER
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_coef, (ao_num,ao_num)]
|
||||||
|
&BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_normalization, (ao_num)]
|
||||||
|
implicit none
|
||||||
|
BEGIN_DOC
|
||||||
|
! Coefficients to go from cartesian to spherical coordinates in the current
|
||||||
|
! basis set
|
||||||
|
!
|
||||||
|
! S_cart^-1 <cart|sphe>
|
||||||
|
END_DOC
|
||||||
|
integer :: i
|
||||||
|
integer, external :: ao_power_index
|
||||||
|
integer :: ibegin,j,k
|
||||||
|
integer :: prev, ao_sphe_count
|
||||||
|
prev = 0
|
||||||
|
ao_cart_to_sphe_coef(:,:) = 0.d0
|
||||||
|
ao_cart_to_sphe_normalization(:) = 1.d0
|
||||||
|
|
||||||
|
if (ao_cartesian) then
|
||||||
|
! Identity matrix
|
||||||
|
do i=1,ao_sphe_num
|
||||||
|
ao_cart_to_sphe_coef(i,i) = 1.d0
|
||||||
|
enddo
|
||||||
|
|
||||||
|
else
|
||||||
|
! Assume order provided by ao_power_index
|
||||||
|
i = 1
|
||||||
|
ao_sphe_count = 0
|
||||||
|
do while (i <= ao_num)
|
||||||
|
select case ( ao_l(i) )
|
||||||
|
case (0)
|
||||||
|
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
|
||||||
|
case ($SHELL)
|
||||||
|
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_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_count += size(cart_to_sphe_$SHELL,2)
|
||||||
|
endif
|
||||||
|
SUBST [ SHELL ]
|
||||||
|
1;;
|
||||||
|
2;;
|
||||||
|
3;;
|
||||||
|
4;;
|
||||||
|
5;;
|
||||||
|
6;;
|
||||||
|
7;;
|
||||||
|
8;;
|
||||||
|
9;;
|
||||||
|
END_TEMPLATE
|
||||||
|
case default
|
||||||
|
stop 'Error in ao_cart_to_sphe : angular momentum too high'
|
||||||
|
end select
|
||||||
|
enddo
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
@ -1,74 +1,3 @@
|
|||||||
BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_coef, (ao_num,ao_num)]
|
|
||||||
&BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_normalization, (ao_num)]
|
|
||||||
implicit none
|
|
||||||
BEGIN_DOC
|
|
||||||
! Coefficients to go from cartesian to spherical coordinates in the current
|
|
||||||
! basis set
|
|
||||||
!
|
|
||||||
! S_cart^-1 <cart|sphe>
|
|
||||||
END_DOC
|
|
||||||
integer :: i
|
|
||||||
integer, external :: ao_power_index
|
|
||||||
integer :: ibegin,j,k
|
|
||||||
integer :: prev, ao_sphe_count
|
|
||||||
prev = 0
|
|
||||||
ao_cart_to_sphe_coef(:,:) = 0.d0
|
|
||||||
ao_cart_to_sphe_normalization(:) = 1.d0
|
|
||||||
|
|
||||||
if (ao_cartesian) then
|
|
||||||
! Identity matrix
|
|
||||||
do i=1,ao_sphe_num
|
|
||||||
ao_cart_to_sphe_coef(i,i) = 1.d0
|
|
||||||
enddo
|
|
||||||
|
|
||||||
else
|
|
||||||
! Assume order provided by ao_power_index
|
|
||||||
i = 1
|
|
||||||
ao_sphe_count = 0
|
|
||||||
do while (i <= ao_num)
|
|
||||||
select case ( ao_l(i) )
|
|
||||||
case (0)
|
|
||||||
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
|
|
||||||
case ($SHELL)
|
|
||||||
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_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_count += size(cart_to_sphe_$SHELL,2)
|
|
||||||
endif
|
|
||||||
SUBST [ SHELL ]
|
|
||||||
1;;
|
|
||||||
2;;
|
|
||||||
3;;
|
|
||||||
4;;
|
|
||||||
5;;
|
|
||||||
6;;
|
|
||||||
7;;
|
|
||||||
8;;
|
|
||||||
9;;
|
|
||||||
END_TEMPLATE
|
|
||||||
case default
|
|
||||||
stop 'Error in ao_cart_to_sphe : angular momentum too high'
|
|
||||||
end select
|
|
||||||
enddo
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
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_overlap, (ao_sphe_num,ao_sphe_num) ]
|
BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_overlap, (ao_sphe_num,ao_sphe_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user