mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Memory allocation bug in Huckel guess corrected
This commit is contained in:
parent
8b8946f1e3
commit
f04e6619a5
@ -73,19 +73,19 @@ BEGIN_PROVIDER [double precision, diagonal_Fock_matrix_mo_sum, (mo_tot_num)]
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
double precision :: accu
|
||||
do i = 1,elec_alpha_num
|
||||
do j = 1,elec_alpha_num
|
||||
accu = 0.d0
|
||||
do j = 1, elec_alpha_num
|
||||
do i = 1, elec_alpha_num
|
||||
accu += 2.d0 * mo_bielec_integral_jj_from_ao(i,j) - mo_bielec_integral_jj_exchange_from_ao(i,j)
|
||||
enddo
|
||||
diagonal_Fock_matrix_mo_sum(i) = accu + mo_mono_elec_integral(i,i)
|
||||
diagonal_Fock_matrix_mo_sum(j) = accu + mo_mono_elec_integral(j,j)
|
||||
enddo
|
||||
do i = elec_alpha_num+1,mo_tot_num
|
||||
do j = elec_alpha_num+1,mo_tot_num
|
||||
accu = 0.d0
|
||||
do j = 1, elec_alpha_num
|
||||
do i = 1, elec_alpha_num
|
||||
accu += 2.d0 * mo_bielec_integral_jj_from_ao(i,j) - mo_bielec_integral_jj_exchange_from_ao(i,j)
|
||||
enddo
|
||||
diagonal_Fock_matrix_mo_sum(i) = accu + mo_mono_elec_integral(i,i)
|
||||
diagonal_Fock_matrix_mo_sum(j) = accu + mo_mono_elec_integral(j,j)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -4,7 +4,7 @@ subroutine huckel_guess
|
||||
! Build the MOs using the extended Huckel model
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
double precision :: tmp_matrix(ao_num_align,ao_num),accu
|
||||
double precision :: accu
|
||||
double precision :: c
|
||||
character*(64) :: label
|
||||
|
||||
@ -19,18 +19,19 @@ subroutine huckel_guess
|
||||
c = 0.5d0 * 1.75d0
|
||||
|
||||
do j=1,ao_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i=1,ao_num
|
||||
if (i.ne.j) then
|
||||
Fock_matrix_ao(i,j) = c*ao_overlap(i,j)*(ao_mono_elec_integral(i,i) + &
|
||||
ao_mono_elec_integral(j,j))
|
||||
else
|
||||
Fock_matrix_ao(i,j) = Fock_matrix_alpha_ao(i,j)
|
||||
endif
|
||||
Fock_matrix_ao(i,j) = c*ao_overlap(i,j)*(ao_mono_elec_integral_diag(i) + &
|
||||
ao_mono_elec_integral_diag(j))
|
||||
enddo
|
||||
Fock_matrix_ao(j,j) = Fock_matrix_alpha_ao(j,j)
|
||||
enddo
|
||||
TOUCH Fock_matrix_ao
|
||||
print *, "Huckel matrix computed"
|
||||
mo_coef = eigenvectors_fock_matrix_mo
|
||||
SOFT_TOUCH mo_coef
|
||||
print *, "Saving MOs"
|
||||
call save_mos
|
||||
print *, "Saving MOs saved"
|
||||
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
BEGIN_PROVIDER [ double precision, ao_mono_elec_integral,(ao_num_align,ao_num)]
|
||||
BEGIN_PROVIDER [ double precision, ao_mono_elec_integral,(ao_num_align,ao_num)]
|
||||
&BEGIN_PROVIDER [ double precision, ao_mono_elec_integral_diag,(ao_num)]
|
||||
implicit none
|
||||
integer :: i,j,n,l
|
||||
BEGIN_DOC
|
||||
@ -6,9 +7,11 @@ BEGIN_PROVIDER [ double precision, ao_mono_elec_integral,(ao_num_align,ao_num)]
|
||||
! : sum of the kinetic and nuclear electronic potential
|
||||
END_DOC
|
||||
do j = 1, ao_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do i = 1, ao_num
|
||||
ao_mono_elec_integral(i,j) = ao_nucl_elec_integral(i,j) + ao_kinetic_integral(i,j) + ao_pseudo_integral(i,j)
|
||||
enddo
|
||||
ao_mono_elec_integral_diag(j) = ao_mono_elec_integral(j,j)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user