mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-28 19:25:02 +02:00
adapted rs_ks_scf
This commit is contained in:
parent
160468e99f
commit
29603f9d91
@ -49,6 +49,18 @@ program fci_tc_bi
|
|||||||
|
|
||||||
pruning = -1.d0
|
pruning = -1.d0
|
||||||
touch pruning
|
touch pruning
|
||||||
|
call write_int(6, my_n_pt_r_grid, 'radial external grid over')
|
||||||
|
call write_int(6, my_n_pt_a_grid, 'angular external grid over')
|
||||||
|
if(tc_integ_type .eq. "numeric") then
|
||||||
|
my_extra_grid_becke = .True.
|
||||||
|
PROVIDE tc_grid2_a tc_grid2_r
|
||||||
|
my_n_pt_r_extra_grid = tc_grid2_r
|
||||||
|
my_n_pt_a_extra_grid = tc_grid2_a
|
||||||
|
touch my_extra_grid_becke my_n_pt_r_extra_grid my_n_pt_a_extra_grid
|
||||||
|
|
||||||
|
call write_int(6, my_n_pt_r_extra_grid, 'radial internal grid over')
|
||||||
|
call write_int(6, my_n_pt_a_extra_grid, 'angular internal grid over')
|
||||||
|
endif
|
||||||
|
|
||||||
! pt2_relative_error = 0.01d0
|
! pt2_relative_error = 0.01d0
|
||||||
! touch pt2_relative_error
|
! touch pt2_relative_error
|
||||||
|
@ -17,6 +17,10 @@ program tc_bi_ortho
|
|||||||
my_n_pt_a_grid = tc_grid1_a
|
my_n_pt_a_grid = tc_grid1_a
|
||||||
touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
|
touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
|
||||||
|
|
||||||
|
pruning = -1.d0
|
||||||
|
touch pruning
|
||||||
|
call write_int(6, my_n_pt_r_grid, 'radial external grid over')
|
||||||
|
call write_int(6, my_n_pt_a_grid, 'angular external grid over')
|
||||||
if(tc_integ_type .eq. "numeric") then
|
if(tc_integ_type .eq. "numeric") then
|
||||||
my_extra_grid_becke = .True.
|
my_extra_grid_becke = .True.
|
||||||
PROVIDE tc_grid2_a tc_grid2_r
|
PROVIDE tc_grid2_a tc_grid2_r
|
||||||
|
@ -14,6 +14,8 @@ program tc_scf
|
|||||||
my_n_pt_a_grid = tc_grid1_a
|
my_n_pt_a_grid = tc_grid1_a
|
||||||
touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
|
touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
|
||||||
|
|
||||||
|
pruning = -1.d0
|
||||||
|
touch pruning
|
||||||
call write_int(6, my_n_pt_r_grid, 'radial external grid over')
|
call write_int(6, my_n_pt_r_grid, 'radial external grid over')
|
||||||
call write_int(6, my_n_pt_a_grid, 'angular external grid over')
|
call write_int(6, my_n_pt_a_grid, 'angular external grid over')
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/home/scemama/qp2/plugins/qp_plugins_lct/stable/rsdft_cipsi/qp_cipsi_rsh_mu_of_r
|
|
@ -14,5 +14,6 @@ subroutine save_erf_two_e_ints_ao_into_ints_ao
|
|||||||
call ezfio_set_work_empty(.False.)
|
call ezfio_set_work_empty(.False.)
|
||||||
call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints',ao_integrals_erf_map)
|
call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints',ao_integrals_erf_map)
|
||||||
call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals('Read')
|
call ezfio_set_ao_two_e_ints_io_ao_two_e_integrals('Read')
|
||||||
|
call ezfio_set_ao_two_e_ints_do_ao_cholesky('Read')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,6 +30,16 @@
|
|||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
BEGIN_PROVIDER [double precision, ref_vhxc]
|
||||||
|
implicit none
|
||||||
|
integer :: i
|
||||||
|
do i = 1, elec_beta_num
|
||||||
|
ref_vhxc += effective_one_e_potential(i,i,1)*2.d0
|
||||||
|
enddo
|
||||||
|
do i = elec_beta_num+1, elec_beta_num
|
||||||
|
ref_vhxc += effective_one_e_potential(i,i,1)*1.d0
|
||||||
|
enddo
|
||||||
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [double precision, effective_one_e_potential_sa, (mo_num, mo_num)]
|
BEGIN_PROVIDER [double precision, effective_one_e_potential_sa, (mo_num, mo_num)]
|
||||||
&BEGIN_PROVIDER [double precision, effective_one_e_potential_without_kin_sa, (mo_num, mo_num)]
|
&BEGIN_PROVIDER [double precision, effective_one_e_potential_without_kin_sa, (mo_num, mo_num)]
|
||||||
|
@ -18,86 +18,6 @@
|
|||||||
|
|
||||||
ao_two_e_integral_alpha = 0.d0
|
ao_two_e_integral_alpha = 0.d0
|
||||||
ao_two_e_integral_beta = 0.d0
|
ao_two_e_integral_beta = 0.d0
|
||||||
if (do_direct_integrals) then
|
|
||||||
|
|
||||||
!$OMP PARALLEL DEFAULT(NONE) &
|
|
||||||
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,p,q,r,s,i0,j0,k0,l0, &
|
|
||||||
!$OMP ao_two_e_integral_alpha_tmp,ao_two_e_integral_beta_tmp, c0, c1, c2, &
|
|
||||||
!$OMP local_threshold)&
|
|
||||||
!$OMP SHARED(ao_num,SCF_density_matrix_ao_alpha,SCF_density_matrix_ao_beta,&
|
|
||||||
!$OMP ao_integrals_map,ao_integrals_threshold, ao_two_e_integral_schwartz, &
|
|
||||||
!$OMP ao_two_e_integral_alpha, ao_two_e_integral_beta)
|
|
||||||
|
|
||||||
allocate(keys(1), values(1))
|
|
||||||
allocate(ao_two_e_integral_alpha_tmp(ao_num,ao_num), &
|
|
||||||
ao_two_e_integral_beta_tmp(ao_num,ao_num))
|
|
||||||
ao_two_e_integral_alpha_tmp = 0.d0
|
|
||||||
ao_two_e_integral_beta_tmp = 0.d0
|
|
||||||
|
|
||||||
q = ao_num*ao_num*ao_num*ao_num
|
|
||||||
!$OMP DO SCHEDULE(dynamic)
|
|
||||||
do p=1_8,q
|
|
||||||
call two_e_integrals_index_reverse(kk,ii,ll,jj,p)
|
|
||||||
if ( (kk(1)>ao_num).or. &
|
|
||||||
(ii(1)>ao_num).or. &
|
|
||||||
(jj(1)>ao_num).or. &
|
|
||||||
(ll(1)>ao_num) ) then
|
|
||||||
cycle
|
|
||||||
endif
|
|
||||||
k = kk(1)
|
|
||||||
i = ii(1)
|
|
||||||
l = ll(1)
|
|
||||||
j = jj(1)
|
|
||||||
|
|
||||||
logical, external :: ao_two_e_integral_zero
|
|
||||||
if (ao_two_e_integral_zero(i,k,j,l)) then
|
|
||||||
cycle
|
|
||||||
endif
|
|
||||||
local_threshold = ao_two_e_integral_schwartz(k,l)*ao_two_e_integral_schwartz(i,j)
|
|
||||||
if (local_threshold < ao_integrals_threshold) then
|
|
||||||
cycle
|
|
||||||
endif
|
|
||||||
i0 = i
|
|
||||||
j0 = j
|
|
||||||
k0 = k
|
|
||||||
l0 = l
|
|
||||||
values(1) = 0.d0
|
|
||||||
local_threshold = ao_integrals_threshold/local_threshold
|
|
||||||
do k2=1,8
|
|
||||||
if (kk(k2)==0) then
|
|
||||||
cycle
|
|
||||||
endif
|
|
||||||
i = ii(k2)
|
|
||||||
j = jj(k2)
|
|
||||||
k = kk(k2)
|
|
||||||
l = ll(k2)
|
|
||||||
c0 = SCF_density_matrix_ao_alpha(k,l)+SCF_density_matrix_ao_beta(k,l)
|
|
||||||
c1 = SCF_density_matrix_ao_alpha(k,i)
|
|
||||||
c2 = SCF_density_matrix_ao_beta(k,i)
|
|
||||||
if ( dabs(c0)+dabs(c1)+dabs(c2) < local_threshold) then
|
|
||||||
cycle
|
|
||||||
endif
|
|
||||||
if (values(1) == 0.d0) then
|
|
||||||
values(1) = ao_two_e_integral(k0,l0,i0,j0)
|
|
||||||
endif
|
|
||||||
integral = c0 * values(1)
|
|
||||||
ao_two_e_integral_alpha_tmp(i,j) += integral
|
|
||||||
ao_two_e_integral_beta_tmp (i,j) += integral
|
|
||||||
integral = values(1)
|
|
||||||
ao_two_e_integral_alpha_tmp(l,j) -= c1 * integral
|
|
||||||
ao_two_e_integral_beta_tmp (l,j) -= c2 * integral
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
!$OMP END DO NOWAIT
|
|
||||||
!$OMP CRITICAL
|
|
||||||
ao_two_e_integral_alpha += ao_two_e_integral_alpha_tmp
|
|
||||||
!$OMP END CRITICAL
|
|
||||||
!$OMP CRITICAL
|
|
||||||
ao_two_e_integral_beta += ao_two_e_integral_beta_tmp
|
|
||||||
!$OMP END CRITICAL
|
|
||||||
deallocate(keys,values,ao_two_e_integral_alpha_tmp,ao_two_e_integral_beta_tmp)
|
|
||||||
!$OMP END PARALLEL
|
|
||||||
else
|
|
||||||
PROVIDE ao_two_e_integrals_in_map
|
PROVIDE ao_two_e_integrals_in_map
|
||||||
PROVIDE ao_two_e_integrals_erf_in_map
|
PROVIDE ao_two_e_integrals_erf_in_map
|
||||||
|
|
||||||
@ -201,7 +121,6 @@
|
|||||||
deallocate(keys_erf,values_erf)
|
deallocate(keys_erf,values_erf)
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user