9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2025-01-03 09:05:39 +01:00

all one-body potentials are OK

This commit is contained in:
eginer 2024-12-06 15:47:48 +01:00
parent 7bce3135aa
commit bb8ecd90e8
3 changed files with 222 additions and 3 deletions

View File

@ -5,7 +5,12 @@ program extra_basis_int
END_DOC
! call test_overlap
! call routine_test_pot_ne
call routine_test_pot_ne_mixed
! call routine_test_pot_ne_mixed
! call routine_pot_ne_extra
! call routine_test_pot_ne_mixed
! call routine_pot_ne
call routine_test_pot_ne_extra_mixed
end
subroutine test_overlap
@ -50,7 +55,7 @@ subroutine routine_test_pot_ne
end
subroutine routine_test_pot_ne_mixed
subroutine routine_test_pot_mixed
implicit none
integer :: i,j
double precision :: integral, C_center(3), mu_in
@ -67,3 +72,53 @@ subroutine routine_test_pot_ne_mixed
enddo
end
subroutine routine_pot_ne_extra
implicit none
integer :: i,j
double precision :: v_extra_nucl_extra_ao
do i = 1, ao_extra_num
do j = 1, ao_extra_num
write(33,*)v_extra_nucl_extra_ao(i,j)
enddo
enddo
end
subroutine routine_pot_ne
implicit none
integer :: i,j
double precision :: v_nucl_extra_ao
do i = 1, ao_extra_num
do j = 1, ao_extra_num
write(33,*)v_nucl_extra_ao(i,j)
enddo
enddo
end
subroutine routine_test_pot_ne_mixed
implicit none
integer :: i,j
double precision :: integral,v_extra_nucl_mixed_ao
do j = 1, ao_num
do i = 1, ao_extra_num
integral = v_extra_nucl_mixed_ao(i,j)
write(33,*)integral
enddo
enddo
end
subroutine routine_test_pot_ne_extra_mixed
implicit none
integer :: i,j
double precision :: integral,v_nucl_mixed_ao
do j = 1, ao_num
do i = 1, ao_extra_num
integral = v_nucl_mixed_ao(i,j)
write(33,*)integral
enddo
enddo
end

View File

@ -2,7 +2,11 @@ program pouet
implicit none
! call ref_overlap
! call ref_pot
call ref_pot_mixed
! call ref_pot_mixed
! call routine_pot_ne_extra
! call ref_pot_ne_mixed
! call ref_pot_ne
call ref_pot_ne_extra_mixed
end
@ -51,3 +55,61 @@ subroutine ref_pot_mixed
enddo
end
subroutine routine_pot_ne_extra
implicit none
integer :: i,j
double precision :: v_extra_nucl_extra_ao
do i = 1, ao_num
do j = 1, ao_num
write(34,*)ao_integrals_n_e(i,j)
enddo
enddo
end
subroutine ref_pot_ne_mixed
implicit none
integer ::i,j,k
double precision :: integral
do i=1, 5
do j = 6, ao_num
integral = 0.d0
do k = 2,2
integral += ao_integrals_n_e_per_atom(i,j,k) * nucl_charge(k)
enddo
write(34,*)integral
enddo
enddo
end
subroutine ref_pot_ne
implicit none
integer ::i,j,k
double precision :: integral
do i=6,ao_num
do j = 6, ao_num
integral = 0.d0
do k = 1,1
integral += ao_integrals_n_e_per_atom(i,j,k) * nucl_charge(k)
enddo
write(34,*)integral
enddo
enddo
end
subroutine ref_pot_ne_extra_mixed
implicit none
integer ::i,j,k
double precision :: integral
do i=1, 5
do j = 6, ao_num
integral = 0.d0
do k = 1,1
integral += ao_integrals_n_e_per_atom(i,j,k) * nucl_charge(k)
enddo
write(34,*)integral
enddo
enddo
end

View File

@ -0,0 +1,102 @@
double precision function v_extra_nucl_extra_ao(i_ao,j_ao)
implicit none
BEGIN_DOC
!
! Computes the following integral :
! $\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) v_ne^{extra}(r)$.
!
!
! where BOTH $\chi_i(r)$ AND $\chi_j(r)$ belongs to the EXTRA basis
!
! and v_ne^{extra}(r) is the Coulomb potential coming from the EXTRA nuclei
END_DOC
integer, intent(in) ::i_ao,j_ao
double precision :: mu_in,charge,coord(3)
double precision :: NAI_pol_mult_erf_ao_extra
mu_in = 1.d10
integer :: i
v_extra_nucl_extra_ao = 0.d0
do i = 1, extra_nucl_num
charge = extra_nucl_charge(i)
coord(1:3) = extra_nucl_coord_transp(1:3,i)
v_extra_nucl_extra_ao -= charge * NAI_pol_mult_erf_ao_extra(i_ao, j_ao, mu_in, coord)
enddo
end
double precision function v_nucl_extra_ao(i_ao,j_ao)
implicit none
BEGIN_DOC
!
! Computes the following integral :
! $\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) v_ne(r)$.
!
!
! where BOTH $\chi_i(r)$ AND $\chi_j(r)$ belongs to the EXTRA basis
!
! and v_ne(r) is the Coulomb potential coming from the REGULAR nuclei
END_DOC
integer, intent(in) ::i_ao,j_ao
double precision :: mu_in,charge,coord(3)
double precision :: NAI_pol_mult_erf_ao_extra
mu_in = 1.d10
integer :: i
v_nucl_extra_ao = 0.d0
do i = 1, nucl_num
charge = nucl_charge(i)
coord(1:3) = nucl_coord_transp(1:3,i)
v_nucl_extra_ao -= charge * NAI_pol_mult_erf_ao_extra(i_ao, j_ao, mu_in, coord)
enddo
end
double precision function v_extra_nucl_mixed_ao(i_ao,j_ao)
implicit none
BEGIN_DOC
!
! Computes the following integral :
! $\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) v_ne^{extra}(r)$.
!
!
! where $\chi_i(r)$ belongs to the EXTRA basis and $\chi_j(r)$ to the REGULAR basis
!
! and v_ne^{extra}(r) is the Coulomb potential coming from the EXTRA nuclei
END_DOC
integer, intent(in) ::i_ao,j_ao
double precision :: mu_in,charge,coord(3)
double precision :: NAI_pol_mult_erf_ao_extra_mixed
mu_in = 1.d10
integer :: i
v_extra_nucl_mixed_ao = 0.d0
do i = 1, extra_nucl_num
charge = extra_nucl_charge(i)
coord(1:3) = extra_nucl_coord_transp(1:3,i)
v_extra_nucl_mixed_ao -= charge * NAI_pol_mult_erf_ao_extra_mixed(i_ao, j_ao, mu_in, coord)
enddo
end
double precision function v_nucl_mixed_ao(i_ao,j_ao)
implicit none
BEGIN_DOC
!
! Computes the following integral :
! $\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) v_ne(r)$.
!
!
! where $\chi_i(r)$ belongs to the EXTRA basis and $\chi_j(r)$ to the REGULAR basis
!
! and v_ne(r) is the Coulomb potential coming from the REGULAR nuclei
END_DOC
integer, intent(in) ::i_ao,j_ao
double precision :: mu_in,charge,coord(3)
double precision :: NAI_pol_mult_erf_ao_extra_mixed
mu_in = 1.d10
integer :: i
v_nucl_mixed_ao = 0.d0
do i = 1, nucl_num
charge = nucl_charge(i)
coord(1:3) = nucl_coord_transp(1:3,i)
v_nucl_mixed_ao -= charge * NAI_pol_mult_erf_ao_extra_mixed(i_ao, j_ao, mu_in, coord)
enddo
end