mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-19 20:02:20 +01:00
devide BH jast coeff by 2 direct
This commit is contained in:
parent
e20d44c6af
commit
dee440747f
@ -232,6 +232,14 @@
|
||||
|
||||
! ---
|
||||
|
||||
do i_nucl = 1, nucl_num
|
||||
do p = 1, jBH_size
|
||||
if(jBH_m(p,i_nucl) .eq. jBH_n(p,i_nucl)) then
|
||||
jBH_c(p,i_nucl) = 0.5d0 * jBH_c(p,i_nucl)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
print *, ' parameters for Boys-Handy Jastrow'
|
||||
print *, ' nb of terms per nucleus = ', jBH_size
|
||||
|
||||
|
@ -335,9 +335,6 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
|
||||
npA = jBH_n(p,i_nucl)
|
||||
opA = jBH_o(p,i_nucl)
|
||||
tmp = jBH_c(p,i_nucl)
|
||||
if(mpA .eq. npA) then
|
||||
tmp = tmp * 0.5d0
|
||||
endif
|
||||
|
||||
tmp1 = double_p(mpA) * f1A_power(mpA-1) * f2A_power(npA) + double_p(npA) * f1A_power(npA-1) * f2A_power(mpA)
|
||||
tmp1 = tmp1 * g12_power(opA) * tmp
|
||||
|
@ -204,7 +204,7 @@ BEGIN_PROVIDER [double precision, int2_grad1_u12_ao, (ao_num, ao_num, n_points_f
|
||||
print*, ' Writing int2_grad1_u12_ao in ', trim(ezfio_filename) // '/work/int2_grad1_u12_ao'
|
||||
|
||||
open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao', action="write")
|
||||
call ezfio_set_work_empty(.False.)
|
||||
call ezfio_set_work_empty(.False.)
|
||||
write(11) int2_grad1_u12_ao
|
||||
close(11)
|
||||
call ezfio_set_tc_keywords_io_tc_integ('Read')
|
||||
|
@ -200,7 +200,7 @@ subroutine provide_int2_grad1_u12_ao()
|
||||
do k = 1, ao_num
|
||||
do ipoint = 1, n_points_final_grid
|
||||
|
||||
weight1 = 0.5d0 * final_weight_at_r_vector(ipoint)
|
||||
weight1 = final_weight_at_r_vector(ipoint)
|
||||
ao_i_r = aos_in_r_array_transp(ipoint,i)
|
||||
ao_k_r = aos_in_r_array_transp(ipoint,k)
|
||||
|
||||
@ -211,7 +211,7 @@ subroutine provide_int2_grad1_u12_ao()
|
||||
!$OMP END DO
|
||||
!$OMP END PARALLEL
|
||||
|
||||
call dgemm( "N", "N", ao_num*ao_num, ao_num*ao_num, n_points_final_grid, -1.d0 &
|
||||
call dgemm( "N", "N", ao_num*ao_num, ao_num*ao_num, n_points_final_grid, -0.5d0 &
|
||||
, int2_grad1_u12_ao(1,1,1,m), ao_num*ao_num, c_mat(1,1,1), n_points_final_grid &
|
||||
, 1.d0, tc_int_2e_ao(1,1,1,1), ao_num*ao_num)
|
||||
enddo
|
||||
|
@ -34,7 +34,7 @@ module cutc_module
|
||||
integer(c_int), intent(in) :: m_bh(size_bh,n_nuc)
|
||||
integer(c_int), intent(in) :: n_bh(size_bh,n_nuc)
|
||||
integer(c_int), intent(in) :: o_bh(size_bh,n_nuc)
|
||||
real(c_double), intent(out) :: int2_grad1_u12_ao(n_ao,n_ao,n_grid1,4)
|
||||
real(c_double), intent(out) :: int2_grad1_u12_ao(n_ao,n_ao,n_grid1,3)
|
||||
real(c_double), intent(out) :: int_2e_ao(n_ao,n_ao,n_ao,n_ao)
|
||||
|
||||
end subroutine tc_int_c
|
||||
@ -66,7 +66,7 @@ module cutc_module
|
||||
integer(c_int), intent(in) :: m_bh(size_bh,n_nuc)
|
||||
integer(c_int), intent(in) :: n_bh(size_bh,n_nuc)
|
||||
integer(c_int), intent(in) :: o_bh(size_bh,n_nuc)
|
||||
real(c_double), intent(out) :: int2_grad1_u12_ao(n_ao,n_ao,n_grid1,4)
|
||||
real(c_double), intent(out) :: int2_grad1_u12_ao(n_ao,n_ao,n_grid1,3)
|
||||
real(c_double), intent(out) :: int_2e_ao(n_ao,n_ao,n_ao,n_ao)
|
||||
|
||||
end subroutine deb_int_2e_ao
|
||||
|
@ -119,7 +119,7 @@ subroutine deb_int_2e_ao_gpu()
|
||||
call ezfio_set_tc_int_blockxSize(sB)
|
||||
call ezfio_set_tc_int_nxBlocks(nB)
|
||||
|
||||
allocate(int2_grad1_u12_ao_gpu(ao_num,ao_num,n_points_final_grid,4))
|
||||
allocate(int2_grad1_u12_ao_gpu(ao_num,ao_num,n_points_final_grid,3))
|
||||
allocate(int_2e_ao_gpu(ao_num,ao_num,ao_num,ao_num))
|
||||
|
||||
call deb_int_2e_ao(nxBlocks, nyBlocks, nzBlocks, blockxSize, blockySize, blockzSize, &
|
||||
@ -268,7 +268,7 @@ subroutine deb_int_2e_ao_gpu()
|
||||
print *, ' precision on int2_grad1_u12_ao '
|
||||
err_tot = 0.d0
|
||||
nrm_tot = 0.d0
|
||||
do m = 1, 4
|
||||
do m = 1, 3
|
||||
do ipoint = 1, n_points_final_grid
|
||||
do j = 1, ao_num
|
||||
do i = 1, ao_num
|
||||
@ -310,23 +310,6 @@ subroutine deb_int_2e_ao_gpu()
|
||||
enddo
|
||||
print *, ' absolute accuracy on int_2e_ao (%) =', 100.d0 * err_tot / nrm_tot
|
||||
|
||||
|
||||
! ---
|
||||
|
||||
print*, ' Writing int2_grad1_u12_ao in ', trim(ezfio_filename) // '/work/int2_grad1_u12_ao'
|
||||
open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao', action="write")
|
||||
call ezfio_set_work_empty(.False.)
|
||||
write(11) int2_grad1_u12_ao_gpu(:,:,:,1:3)
|
||||
close(11)
|
||||
|
||||
print*, ' Saving tc_int_2e_ao in ', trim(ezfio_filename) // '/work/ao_two_e_tc_tot'
|
||||
open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/ao_two_e_tc_tot', action="write")
|
||||
call ezfio_set_work_empty(.False.)
|
||||
do k = 1, ao_num
|
||||
write(11) int_2e_ao_gpu(:,:,:,k)
|
||||
enddo
|
||||
close(11)
|
||||
|
||||
! ---
|
||||
|
||||
deallocate(int_fct_long_range, grad1_u12, c_mat)
|
||||
|
@ -170,11 +170,6 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
|
||||
npA = jBH_n(p,i_nucl)
|
||||
opA = jBH_o(p,i_nucl)
|
||||
|
||||
! TODO to it when reading the parameters
|
||||
if(mpA .eq. npA) then
|
||||
tmp = tmp * 0.5d0
|
||||
endif
|
||||
|
||||
tmp1 = double_p(mpA) * f1A_power(mpA-1) * f2A_power(npA) + double_p(npA) * f1A_power(npA-1) * f2A_power(mpA)
|
||||
tmp1 = tmp1 * g12_power(opA) * tmp
|
||||
tmp2 = double_p(opA) * g12_power(opA-1) * (f1A_power(mpA) * f2A_power(npA) + f1A_power(npA) * f2A_power(mpA)) * tmp
|
||||
|
@ -75,7 +75,7 @@ subroutine do_work_on_gpu()
|
||||
allocate(rn(3,nucl_num))
|
||||
allocate(aos_data1(n_points_final_grid,ao_num,4))
|
||||
allocate(aos_data2(n_points_extra_final_grid,ao_num,4))
|
||||
allocate(int2_grad1_u12_ao(ao_num,ao_num,n_points_final_grid,4))
|
||||
allocate(int2_grad1_u12_ao(ao_num,ao_num,n_points_final_grid,3))
|
||||
allocate(int_2e_ao(ao_num,ao_num,ao_num,ao_num))
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ subroutine do_work_on_gpu()
|
||||
print*, ' Writing int2_grad1_u12_ao in ', trim(ezfio_filename) // '/work/int2_grad1_u12_ao'
|
||||
open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao', action="write")
|
||||
call ezfio_set_work_empty(.False.)
|
||||
write(11) int2_grad1_u12_ao(:,:,:,1:3)
|
||||
write(11) int2_grad1_u12_ao
|
||||
close(11)
|
||||
deallocate(int2_grad1_u12_ao)
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if((three_body_h_tc .eq. .False.) .and. (.not. noL_standard)) then
|
||||
if((three_body_h_tc .eqv. .False.) .and. (.not. noL_standard)) then
|
||||
TC_HF_three_e_energy = 0.d0
|
||||
else
|
||||
TC_HF_three_e_energy = noL_0e
|
||||
|
Loading…
Reference in New Issue
Block a user