mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-05 11:00:10 +01:00
Working on Slater dressing
This commit is contained in:
parent
ddcc1a5e51
commit
5f357ee68b
@ -14,7 +14,13 @@ interface: ezfio, provider
|
|||||||
type: double precision
|
type: double precision
|
||||||
doc: Orthogonal AO basis
|
doc: Orthogonal AO basis
|
||||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||||
interface: ezfio, provider
|
interface: ezfio
|
||||||
|
|
||||||
|
[ao_orthoSlaOverlap]
|
||||||
|
type: double precision
|
||||||
|
doc: Orthogonal AO basis
|
||||||
|
size: (ao_basis.ao_num,nuclei.nucl_num)
|
||||||
|
interface: ezfio
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ BEGIN_PROVIDER [ double precision, cusp_A, (nucl_num, nucl_num) ]
|
|||||||
! Projector
|
! Projector
|
||||||
do mu=1,mo_tot_num
|
do mu=1,mo_tot_num
|
||||||
cusp_A(A,B) += AO_orthoSlaOverlap_matrix(mu,B) * ao_ortho_value_at_nucl(mu,A)
|
cusp_A(A,B) += AO_orthoSlaOverlap_matrix(mu,B) * ao_ortho_value_at_nucl(mu,A)
|
||||||
! cusp_A(A,B) += MOSlaOverlap_matrix(mu,B) * mo_value_at_nucl(mu,A)
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
@ -60,6 +59,5 @@ BEGIN_PROVIDER [ double precision, cusp_C, (nucl_num, mo_tot_num) ]
|
|||||||
stop 'dgetrs failed'
|
stop 'dgetrs failed'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
@ -86,8 +86,10 @@ subroutine run
|
|||||||
enddo
|
enddo
|
||||||
mo_coef(1:ao_num,1:mo_tot_num) = cusp_corrected_mos(1:ao_num,1:mo_tot_num)
|
mo_coef(1:ao_num,1:mo_tot_num) = cusp_corrected_mos(1:ao_num,1:mo_tot_num)
|
||||||
SOFT_TOUCH mo_coef slater_coef
|
SOFT_TOUCH mo_coef slater_coef
|
||||||
! call ezfio_set_Hartree_Fock_SlaterDressed_slater_coef_ezfio(slater_coef)
|
call ezfio_set_Hartree_Fock_SlaterDressed_slater_coef_ezfio(slater_coef)
|
||||||
! call save_mos
|
call ezfio_set_Hartree_Fock_SlaterDressed_projector(ao_ortho_canonical_coef(1:ao_num,1:ao_num))
|
||||||
|
call ezfio_set_Hartree_Fock_SlaterDressed_ao_orthoSlaOverlap(AO_orthoSlaOverlap_matrix)
|
||||||
|
call save_mos
|
||||||
print *, 'ci'
|
print *, 'ci'
|
||||||
print *, mo_coef(1:ao_num,1)
|
print *, mo_coef(1:ao_num,1)
|
||||||
print *, 'cAi'
|
print *, 'cAi'
|
||||||
|
@ -91,7 +91,9 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
cusp_corrected_mos(1:ao_num,1:mo_tot_num) = mo_coef(1:ao_num,1:mo_tot_num)
|
cusp_corrected_mos(1:ao_num,1:mo_tot_num) = mo_coef(1:ao_num,1:mo_tot_num)
|
||||||
slater_coef(1:nucl_num,1:mo_tot_num) = cusp_C(1:nucl_num,1:mo_tot_num)
|
slater_coef(1:nucl_num,1:mo_tot_num) = cusp_C(1:nucl_num,1:mo_tot_num)
|
||||||
return
|
return
|
||||||
endif
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
do idx_dressing=1,mo_tot_num
|
do idx_dressing=1,mo_tot_num
|
||||||
|
|
||||||
@ -114,6 +116,7 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
integer :: it
|
integer :: it
|
||||||
do it=1,128
|
do it=1,128
|
||||||
|
|
||||||
|
! print *, 'X', ao_ortho_canonical_coef(1:ao_num,1:ao_num)
|
||||||
! print *, 'C', mo_coef(1:ao_num,1:mo_tot_num)
|
! print *, 'C', mo_coef(1:ao_num,1:mo_tot_num)
|
||||||
! print *, 'Cp', mo_coef_in_ao_ortho_basis(1:ao_num,1:mo_tot_num)
|
! print *, 'Cp', mo_coef_in_ao_ortho_basis(1:ao_num,1:mo_tot_num)
|
||||||
! print *, 'cAi', cusp_C(1:nucl_num,1:mo_tot_num)
|
! print *, 'cAi', cusp_C(1:nucl_num,1:mo_tot_num)
|
||||||
@ -125,6 +128,7 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
! print *, 'AO_orthoSlaOverlap_matrix', AO_orthoSlaOverlap_matrix(1:ao_num,1:nucl_num)
|
! print *, 'AO_orthoSlaOverlap_matrix', AO_orthoSlaOverlap_matrix(1:ao_num,1:nucl_num)
|
||||||
! print *, 'AO_orthoSlaH_matrix', AO_orthoSlaH_matrix(1:ao_num,1:nucl_num)
|
! print *, 'AO_orthoSlaH_matrix', AO_orthoSlaH_matrix(1:ao_num,1:nucl_num)
|
||||||
! print *, 'ao_ortho_mono_elec_integral', ao_ortho_mono_elec_integral(1:ao_num,1:ao_num)
|
! print *, 'ao_ortho_mono_elec_integral', ao_ortho_mono_elec_integral(1:ao_num,1:ao_num)
|
||||||
|
! print *, 'Fock MO:', Fock_matrix_mo(1:mo_tot_num,1:mo_tot_num)
|
||||||
do j=1,mo_tot_num
|
do j=1,mo_tot_num
|
||||||
do i=1,mo_tot_num
|
do i=1,mo_tot_num
|
||||||
Fock_matrix_mo(i,j) += mo_mono_elec_integral_dressing(i,j)
|
Fock_matrix_mo(i,j) += mo_mono_elec_integral_dressing(i,j)
|
||||||
@ -133,6 +137,7 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
do i=1,mo_tot_num
|
do i=1,mo_tot_num
|
||||||
Fock_matrix_diag_mo(i) = Fock_matrix_mo(i,i)
|
Fock_matrix_diag_mo(i) = Fock_matrix_mo(i,i)
|
||||||
enddo
|
enddo
|
||||||
|
! print *, 'Dressed Fock MO:', Fock_matrix_mo(1:mo_tot_num,1:mo_tot_num)
|
||||||
double precision :: conv
|
double precision :: conv
|
||||||
conv = 0.d0
|
conv = 0.d0
|
||||||
do j=1,mo_tot_num
|
do j=1,mo_tot_num
|
||||||
@ -149,6 +154,7 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
!print *, '-----'
|
!print *, '-----'
|
||||||
print *, idx_dressing, it, real(mo_coef(1,idx_dressing)), real(conv)
|
print *, idx_dressing, it, real(mo_coef(1,idx_dressing)), real(conv)
|
||||||
if (conv < 1.d-5) exit
|
if (conv < 1.d-5) exit
|
||||||
|
!stop
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
cusp_corrected_mos(1:ao_num,idx_dressing) = mo_coef(1:ao_num,idx_dressing)
|
cusp_corrected_mos(1:ao_num,idx_dressing) = mo_coef(1:ao_num,idx_dressing)
|
||||||
@ -159,6 +165,8 @@ BEGIN_PROVIDER [ double precision, cusp_corrected_mos, (ao_num_align,mo_tot_num)
|
|||||||
mo_coef(1:ao_num,1:mo_tot_num) = M(1:ao_num,1:mo_tot_num)
|
mo_coef(1:ao_num,1:mo_tot_num) = M(1:ao_num,1:mo_tot_num)
|
||||||
soft_TOUCH mo_coef idx_dressing slater_coef
|
soft_TOUCH mo_coef idx_dressing slater_coef
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ subroutine GauSlaNuclear(expGau,cGau,aGau,expSla,cSla,ZNuc,cNuc,result)
|
|||||||
ss = k*ss
|
ss = k*ss
|
||||||
|
|
||||||
! Print result
|
! Print result
|
||||||
write(*,*) ss
|
! write(*,*) ss
|
||||||
result = 0.d0
|
result = 0.d0
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -520,6 +520,7 @@ BEGIN_PROVIDER [ double precision, AO_orthoSla$X_matrix, (ao_num, nucl_num) ]
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
SUBST [ X ]
|
SUBST [ X ]
|
||||||
|
|
||||||
Overlap ;;
|
Overlap ;;
|
||||||
|
@ -8,7 +8,10 @@ BEGIN_PROVIDER [ double precision, slater_expo, (nucl_num) ]
|
|||||||
if (exists) then
|
if (exists) then
|
||||||
slater_expo(1:nucl_num) = slater_expo_ezfio(1:nucl_num)
|
slater_expo(1:nucl_num) = slater_expo_ezfio(1:nucl_num)
|
||||||
else
|
else
|
||||||
slater_expo(1:nucl_num) = nucl_charge(1:nucl_num)
|
integer :: i
|
||||||
|
do i=1,nucl_num
|
||||||
|
slater_expo(i) = nucl_charge(i)
|
||||||
|
enddo
|
||||||
call ezfio_set_Hartree_Fock_SlaterDressed_slater_expo_ezfio(slater_expo)
|
call ezfio_set_Hartree_Fock_SlaterDressed_slater_expo_ezfio(slater_expo)
|
||||||
endif
|
endif
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
@ -106,9 +106,9 @@ END_PROVIDER
|
|||||||
ao_ortho_canonical_coef(i,i) = 1.d0
|
ao_ortho_canonical_coef(i,i) = 1.d0
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
!call ortho_lowdin(ao_overlap,size(ao_overlap,1),ao_num,ao_ortho_canonical_coef,size(ao_ortho_canonical_coef,1),ao_num)
|
call ortho_lowdin(ao_overlap,size(ao_overlap,1),ao_num,ao_ortho_canonical_coef,size(ao_ortho_canonical_coef,1),ao_num)
|
||||||
!ao_ortho_canonical_num=ao_num
|
ao_ortho_canonical_num=ao_num
|
||||||
!return
|
return
|
||||||
|
|
||||||
if (ao_cartesian) then
|
if (ao_cartesian) then
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ BEGIN_PROVIDER [ double precision, mo_coef_in_ao_ortho_basis, (ao_num_align, mo_
|
|||||||
!
|
!
|
||||||
! C^(-1).C_mo
|
! C^(-1).C_mo
|
||||||
END_DOC
|
END_DOC
|
||||||
call dgemm('T','N',ao_num,mo_tot_num,ao_num,1.d0, &
|
call dgemm('N','N',ao_num,mo_tot_num,ao_num,1.d0, &
|
||||||
ao_ortho_canonical_coef_inv, size(ao_ortho_canonical_coef_inv,1),&
|
ao_ortho_canonical_coef_inv, size(ao_ortho_canonical_coef_inv,1),&
|
||||||
mo_coef, size(mo_coef,1), 0.d0, &
|
mo_coef, size(mo_coef,1), 0.d0, &
|
||||||
mo_coef_in_ao_ortho_basis, size(mo_coef_in_ao_ortho_basis,1))
|
mo_coef_in_ao_ortho_basis, size(mo_coef_in_ao_ortho_basis,1))
|
||||||
@ -290,13 +290,13 @@ subroutine ao_ortho_cano_to_ao(A_ao,LDA_ao,A,LDA)
|
|||||||
allocate ( T(ao_num_align,ao_num) )
|
allocate ( T(ao_num_align,ao_num) )
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T
|
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T
|
||||||
|
|
||||||
call dgemm('N','N', ao_num, ao_num, ao_num, &
|
call dgemm('T','N', ao_num, ao_num, ao_num, &
|
||||||
1.d0, &
|
1.d0, &
|
||||||
ao_ortho_canonical_coef_inv, size(ao_ortho_canonical_coef_inv,1), &
|
ao_ortho_canonical_coef_inv, size(ao_ortho_canonical_coef_inv,1), &
|
||||||
A_ao,LDA_ao, &
|
A_ao,LDA_ao, &
|
||||||
0.d0, T, ao_num_align)
|
0.d0, T, ao_num_align)
|
||||||
|
|
||||||
call dgemm('N','T', ao_num, ao_num, ao_num, 1.d0, &
|
call dgemm('N','N', ao_num, ao_num, ao_num, 1.d0, &
|
||||||
T, size(T,1), &
|
T, size(T,1), &
|
||||||
ao_ortho_canonical_coef_inv,size(ao_ortho_canonical_coef_inv,1),&
|
ao_ortho_canonical_coef_inv,size(ao_ortho_canonical_coef_inv,1),&
|
||||||
0.d0, A, LDA)
|
0.d0, A, LDA)
|
||||||
|
Loading…
Reference in New Issue
Block a user