mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-30 16:13:42 +02:00
No more SVD in spindeterminants
This commit is contained in:
parent
2b4f760e34
commit
b2a6161083
@ -141,7 +141,7 @@ class H_apply(object):
|
|||||||
def set_filter_2h_2p(self):
|
def set_filter_2h_2p(self):
|
||||||
self["filter2h2p"] = """
|
self["filter2h2p"] = """
|
||||||
! ! DIR$ FORCEINLINE
|
! ! DIR$ FORCEINLINE
|
||||||
if(is_a_two_holes_two_particles(key))cycle
|
if (is_a_two_holes_two_particles(key)) cycle
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Documentation
|
|||||||
integral of the AO basis <ik|jl> or (ij|kl)
|
integral of the AO basis <ik|jl> or (ij|kl)
|
||||||
i(r1) j(r1) 1/r12 k(r2) l(r2)
|
i(r1) j(r1) 1/r12 k(r2) l(r2)
|
||||||
|
|
||||||
`ao_bielec_integral_schwartz <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L490>`_
|
`ao_bielec_integral_schwartz <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L491>`_
|
||||||
Needed to compute Schwartz inequalities
|
Needed to compute Schwartz inequalities
|
||||||
|
|
||||||
`ao_bielec_integral_schwartz_accel <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L107>`_
|
`ao_bielec_integral_schwartz_accel <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L107>`_
|
||||||
@ -53,48 +53,48 @@ Documentation
|
|||||||
`compute_ao_bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L290>`_
|
`compute_ao_bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L290>`_
|
||||||
Compute AO 1/r12 integrals for all i and fixed j,k,l
|
Compute AO 1/r12 integrals for all i and fixed j,k,l
|
||||||
|
|
||||||
`eri <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L653>`_
|
`eri <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L654>`_
|
||||||
ATOMIC PRIMTIVE bielectronic integral between the 4 primitives ::
|
ATOMIC PRIMTIVE bielectronic integral between the 4 primitives ::
|
||||||
primitive_1 = x1**(a_x) y1**(a_y) z1**(a_z) exp(-alpha * r1**2)
|
primitive_1 = x1**(a_x) y1**(a_y) z1**(a_z) exp(-alpha * r1**2)
|
||||||
primitive_2 = x1**(b_x) y1**(b_y) z1**(b_z) exp(- beta * r1**2)
|
primitive_2 = x1**(b_x) y1**(b_y) z1**(b_z) exp(- beta * r1**2)
|
||||||
primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2)
|
primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2)
|
||||||
primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2)
|
primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2)
|
||||||
|
|
||||||
`general_primitive_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L515>`_
|
`general_primitive_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L516>`_
|
||||||
Computes the integral <pq|rs> where p,q,r,s are Gaussian primitives
|
Computes the integral <pq|rs> where p,q,r,s are Gaussian primitives
|
||||||
|
|
||||||
`give_polynom_mult_center_x <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L851>`_
|
`give_polynom_mult_center_x <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L852>`_
|
||||||
subroutine that returns the explicit polynom in term of the "t"
|
subroutine that returns the explicit polynom in term of the "t"
|
||||||
variable of the following polynomw :
|
variable of the following polynomw :
|
||||||
I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)
|
I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)
|
||||||
|
|
||||||
`i_x1_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L772>`_
|
`i_x1_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L773>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x1_pol_mult <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L914>`_
|
`i_x1_pol_mult <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L915>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x1_pol_mult_a1 <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1034>`_
|
`i_x1_pol_mult_a1 <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1035>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x1_pol_mult_a2 <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1088>`_
|
`i_x1_pol_mult_a2 <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1089>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x1_pol_mult_recurs <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L948>`_
|
`i_x1_pol_mult_recurs <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L949>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x2_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L807>`_
|
`i_x2_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L808>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`i_x2_pol_mult <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1150>`_
|
`i_x2_pol_mult <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L1151>`_
|
||||||
recursive function involved in the bielectronic integral
|
recursive function involved in the bielectronic integral
|
||||||
|
|
||||||
`integrale_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L698>`_
|
`integrale_new <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L699>`_
|
||||||
calculate the integral of the polynom ::
|
calculate the integral of the polynom ::
|
||||||
I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q)
|
I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q)
|
||||||
between ( 0 ; 1)
|
between ( 0 ; 1)
|
||||||
|
|
||||||
`n_pt_sup <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L837>`_
|
`n_pt_sup <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/ao_bi_integrals.irp.f#L838>`_
|
||||||
Returns the upper boundary of the degree of the polynomial involved in the
|
Returns the upper boundary of the degree of the polynomial involved in the
|
||||||
bielctronic integral :
|
bielctronic integral :
|
||||||
Ix(a_x,b_x,c_x,d_x) * Iy(a_y,b_y,c_y,d_y) * Iz(a_z,b_z,c_z,d_z)
|
Ix(a_x,b_x,c_x,d_x) * Iy(a_y,b_y,c_y,d_y) * Iz(a_z,b_z,c_z,d_z)
|
||||||
@ -172,32 +172,32 @@ Documentation
|
|||||||
`add_integrals_to_map <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L42>`_
|
`add_integrals_to_map <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L42>`_
|
||||||
Adds integrals to tha MO map according to some bitmask
|
Adds integrals to tha MO map according to some bitmask
|
||||||
|
|
||||||
`mo_bielec_integral_jj <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L464>`_
|
`mo_bielec_integral_jj <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L465>`_
|
||||||
mo_bielec_integral_jj(i,j) = J_ij
|
mo_bielec_integral_jj(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
||||||
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||||
|
|
||||||
`mo_bielec_integral_jj_anti <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L466>`_
|
`mo_bielec_integral_jj_anti <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L467>`_
|
||||||
mo_bielec_integral_jj(i,j) = J_ij
|
mo_bielec_integral_jj(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
||||||
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||||
|
|
||||||
`mo_bielec_integral_jj_anti_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L326>`_
|
`mo_bielec_integral_jj_anti_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L327>`_
|
||||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||||
|
|
||||||
`mo_bielec_integral_jj_exchange <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L465>`_
|
`mo_bielec_integral_jj_exchange <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L466>`_
|
||||||
mo_bielec_integral_jj(i,j) = J_ij
|
mo_bielec_integral_jj(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
mo_bielec_integral_jj_exchange(i,j) = K_ij
|
||||||
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||||
|
|
||||||
`mo_bielec_integral_jj_exchange_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L325>`_
|
`mo_bielec_integral_jj_exchange_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L326>`_
|
||||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||||
|
|
||||||
`mo_bielec_integral_jj_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L324>`_
|
`mo_bielec_integral_jj_from_ao <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals/mo_bi_integrals.irp.f#L325>`_
|
||||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij
|
||||||
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||||
|
@ -481,6 +481,7 @@ IRP_ENDIF COARRAY
|
|||||||
ao_bielec_integrals_in_map = .True.
|
ao_bielec_integrals_in_map = .True.
|
||||||
if (write_ao_integrals) then
|
if (write_ao_integrals) then
|
||||||
call dump_ao_integrals(trim(ezfio_filename)//'/work/ao_integrals.bin')
|
call dump_ao_integrals(trim(ezfio_filename)//'/work/ao_integrals.bin')
|
||||||
|
call ezfio_set_bielec_integrals_disk_access_ao_integrals(.True.)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
@ -312,6 +312,7 @@ IRP_ENDIF
|
|||||||
|
|
||||||
if (write_mo_integrals) then
|
if (write_mo_integrals) then
|
||||||
call dump_mo_integrals(trim(ezfio_filename)//'/work/mo_integrals.bin')
|
call dump_mo_integrals(trim(ezfio_filename)//'/work/mo_integrals.bin')
|
||||||
|
call ezfio_set_bielec_integrals_disk_access_mo_integrals(.True.)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -337,52 +337,52 @@ subroutine write_spindeterminants
|
|||||||
call ezfio_set_spindeterminants_psi_coef_matrix_rows(psi_svd_matrix_rows)
|
call ezfio_set_spindeterminants_psi_coef_matrix_rows(psi_svd_matrix_rows)
|
||||||
call ezfio_set_spindeterminants_psi_coef_matrix_columns(psi_svd_matrix_columns)
|
call ezfio_set_spindeterminants_psi_coef_matrix_columns(psi_svd_matrix_columns)
|
||||||
|
|
||||||
integer :: n_svd_coefs
|
! integer :: n_svd_coefs
|
||||||
double precision :: norm, f
|
! double precision :: norm, f
|
||||||
f = 1.d0/dble(N_states)
|
! f = 1.d0/dble(N_states)
|
||||||
norm = 1.d0
|
! norm = 1.d0
|
||||||
do n_svd_coefs=1,N_det_alpha_unique
|
! do n_svd_coefs=1,N_det_alpha_unique
|
||||||
do k=1,N_states
|
! do k=1,N_states
|
||||||
norm -= psi_svd_coefs(n_svd_coefs,k)*psi_svd_coefs(n_svd_coefs,k)
|
! norm -= psi_svd_coefs(n_svd_coefs,k)*psi_svd_coefs(n_svd_coefs,k)
|
||||||
enddo
|
! enddo
|
||||||
if (norm < 1.d-4) then
|
! if (norm < 1.d-4) then
|
||||||
exit
|
! exit
|
||||||
endif
|
! endif
|
||||||
enddo
|
! enddo
|
||||||
n_svd_coefs -= 1
|
! n_svd_coefs -= 1
|
||||||
call ezfio_set_spindeterminants_n_svd_coefs(n_svd_coefs)
|
! call ezfio_set_spindeterminants_n_svd_coefs(n_svd_coefs)
|
||||||
|
!
|
||||||
double precision, allocatable :: dtmp(:,:,:)
|
! double precision, allocatable :: dtmp(:,:,:)
|
||||||
allocate(dtmp(N_det_alpha_unique,n_svd_coefs,N_states))
|
! allocate(dtmp(N_det_alpha_unique,n_svd_coefs,N_states))
|
||||||
do k=1,N_states
|
! do k=1,N_states
|
||||||
do j=1,n_svd_coefs
|
! do j=1,n_svd_coefs
|
||||||
do i=1,N_det_alpha_unique
|
! do i=1,N_det_alpha_unique
|
||||||
dtmp(i,j,k) = psi_svd_alpha(i,j,k)
|
! dtmp(i,j,k) = psi_svd_alpha(i,j,k)
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
call ezfio_set_spindeterminants_psi_svd_alpha(dtmp)
|
! call ezfio_set_spindeterminants_psi_svd_alpha(dtmp)
|
||||||
deallocate(dtmp)
|
! deallocate(dtmp)
|
||||||
|
!
|
||||||
allocate(dtmp(N_det_beta_unique,n_svd_coefs,N_states))
|
! allocate(dtmp(N_det_beta_unique,n_svd_coefs,N_states))
|
||||||
do k=1,N_states
|
! do k=1,N_states
|
||||||
do j=1,n_svd_coefs
|
! do j=1,n_svd_coefs
|
||||||
do i=1,N_det_beta_unique
|
! do i=1,N_det_beta_unique
|
||||||
dtmp(i,j,k) = psi_svd_beta(i,j,k)
|
! dtmp(i,j,k) = psi_svd_beta(i,j,k)
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
call ezfio_set_spindeterminants_psi_svd_beta(dtmp)
|
! call ezfio_set_spindeterminants_psi_svd_beta(dtmp)
|
||||||
deallocate(dtmp)
|
! deallocate(dtmp)
|
||||||
|
!
|
||||||
allocate(dtmp(n_svd_coefs,N_states,1))
|
! allocate(dtmp(n_svd_coefs,N_states,1))
|
||||||
do k=1,N_states
|
! do k=1,N_states
|
||||||
do j=1,n_svd_coefs
|
! do j=1,n_svd_coefs
|
||||||
dtmp(j,k,1) = psi_svd_coefs(j,k)
|
! dtmp(j,k,1) = psi_svd_coefs(j,k)
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
call ezfio_set_spindeterminants_psi_svd_coefs(dtmp)
|
! call ezfio_set_spindeterminants_psi_svd_coefs(dtmp)
|
||||||
deallocate(dtmp)
|
! deallocate(dtmp)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user