10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2025-03-29 03:51:37 +01:00

Symmetrize pseudo one_e integrals

This commit is contained in:
Anthony Scemama 2025-03-25 17:17:37 +01:00
parent 68a48e137f
commit 989fcb81b0
3 changed files with 22 additions and 8 deletions

View File

@ -43,7 +43,8 @@ subroutine print_basis_correction
else if(mu_of_r_potential.EQ."cas_full".or. &
mu_of_r_potential.EQ."cas_truncated".or. &
mu_of_r_potential.EQ."pure_act") then
mu_of_r_potential.EQ."pure_act".or. &
mu_of_r_potential.EQ."proj_cas") then
print*, ''
print*,'Using a CAS-like two-body density to define mu(r)'
print*,'This assumes that the CAS is a qualitative representation of the wave function '

View File

@ -116,13 +116,14 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integrals_local, (ao_num,ao_num)]
alpha = ao_expo_ordered_transp(l,j)
do m=1,ao_prim_num(i)
beta = ao_expo_ordered_transp(m,i)
c = 0.d0
if (dabs(ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i))&
< thresh) then
cycle
endif
beta = ao_expo_ordered_transp(m,i)
c = 0.d0
do k = 1, nucl_num
Z = nucl_charge(k)
@ -154,6 +155,12 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integrals_local, (ao_num,ao_num)]
!$OMP END DO
!$OMP END PARALLEL
do i=1,ao_num
do j=1,i
ao_pseudo_integrals_local(j,i) = 0.5d0*(ao_pseudo_integrals_local(i,j) + ao_pseudo_integrals_local(i,j))
ao_pseudo_integrals_local(i,j) = ao_pseudo_integrals_local(i,j)
enddo
enddo
END_PROVIDER
@ -216,14 +223,14 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integrals_local, (ao_num,ao_num)]
alpha = ao_expo_ordered_transp(l,j)
do m=1,ao_prim_num(i)
beta = ao_expo_ordered_transp(m,i)
c = 0.d0
if (dabs(ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i))&
< thresh) then
cycle
endif
beta = ao_expo_ordered_transp(m,i)
c = 0.d0
do k = 1, nucl_num
Z = nucl_charge(k)
@ -256,6 +263,12 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integrals_local, (ao_num,ao_num)]
!$OMP END PARALLEL
do i=1,ao_num
do j=1,i
ao_pseudo_integrals_non_local(j,i) = 0.5d0*(ao_pseudo_integrals_non_local(i,j) + ao_pseudo_integrals_non_local(i,j))
ao_pseudo_integrals_non_local(i,j) = ao_pseudo_integrals_non_local(i,j)
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, pseudo_v_k_transp, (pseudo_klocmax,nucl_num) ]

View File

@ -38,7 +38,7 @@
do ipoint = 1, n_points_final_grid
mu_of_r_prov(ipoint,istate) = mu_of_r_psi_cas(ipoint,istate)
enddo
else if(mu_of_r_potential.EQ."proj")then
else if((mu_of_r_potential.EQ."proj").or.(mu_of_r_potential.EQ."proj_cas"))then
do ipoint = 1, n_points_final_grid
mu_of_r_prov(ipoint,istate) = mu_of_r_projector_mo(ipoint)
enddo