mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Removed align
This commit is contained in:
parent
113f0757ee
commit
4e894dc393
@ -19,7 +19,7 @@ BEGIN_PROVIDER [double precision, FPS_SPF_Matrix_AO, (AO_num, AO_num)]
|
|||||||
END_DOC
|
END_DOC
|
||||||
double precision, allocatable :: scratch(:,:)
|
double precision, allocatable :: scratch(:,:)
|
||||||
allocate( &
|
allocate( &
|
||||||
scratch(AO_num_align, AO_num) &
|
scratch(AO_num, AO_num) &
|
||||||
)
|
)
|
||||||
|
|
||||||
! Compute FP
|
! Compute FP
|
||||||
@ -71,7 +71,7 @@ END_PROVIDER
|
|||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, eigenvalues_Fock_matrix_AO, (AO_num) ]
|
BEGIN_PROVIDER [ double precision, eigenvalues_Fock_matrix_AO, (AO_num) ]
|
||||||
&BEGIN_PROVIDER [ double precision, eigenvectors_Fock_matrix_AO, (AO_num_align,AO_num) ]
|
&BEGIN_PROVIDER [ double precision, eigenvectors_Fock_matrix_AO, (AO_num,AO_num) ]
|
||||||
|
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
! Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
||||||
@ -85,7 +85,7 @@ END_PROVIDER
|
|||||||
|
|
||||||
lwork = 3*AO_num - 1
|
lwork = 3*AO_num - 1
|
||||||
allocate( &
|
allocate( &
|
||||||
scratch(AO_num_align,AO_num), &
|
scratch(AO_num,AO_num), &
|
||||||
work(lwork), &
|
work(lwork), &
|
||||||
Xt(AO_num,AO_num) &
|
Xt(AO_num,AO_num) &
|
||||||
)
|
)
|
||||||
@ -137,7 +137,7 @@ END_PROVIDER
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, X_matrix_AO, (AO_num_align,AO_num) ]
|
BEGIN_PROVIDER [ double precision, X_matrix_AO, (AO_num,AO_num) ]
|
||||||
|
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Matrix X = S^{-1/2} obtained by SVD
|
! Matrix X = S^{-1/2} obtained by SVD
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
BEGIN_PROVIDER [ double precision, Fock_matrix_mo, (mo_tot_num_align,mo_tot_num) ]
|
BEGIN_PROVIDER [ double precision, Fock_matrix_mo, (mo_tot_num,mo_tot_num) ]
|
||||||
&BEGIN_PROVIDER [ double precision, Fock_matrix_diag_mo, (mo_tot_num)]
|
&BEGIN_PROVIDER [ double precision, Fock_matrix_diag_mo, (mo_tot_num)]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -81,8 +81,8 @@ END_PROVIDER
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, Fock_matrix_ao_alpha, (ao_num_align, ao_num) ]
|
BEGIN_PROVIDER [ double precision, Fock_matrix_ao_alpha, (ao_num, ao_num) ]
|
||||||
&BEGIN_PROVIDER [ double precision, Fock_matrix_ao_beta, (ao_num_align, ao_num) ]
|
&BEGIN_PROVIDER [ double precision, Fock_matrix_ao_beta, (ao_num, ao_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Alpha Fock matrix in AO basis set
|
! Alpha Fock matrix in AO basis set
|
||||||
@ -90,7 +90,6 @@ END_PROVIDER
|
|||||||
|
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
do j=1,ao_num
|
do j=1,ao_num
|
||||||
!DIR$ VECTOR ALIGNED
|
|
||||||
do i=1,ao_num
|
do i=1,ao_num
|
||||||
Fock_matrix_ao_alpha(i,j) = ao_mono_elec_integral(i,j) + ao_bi_elec_integral_alpha(i,j)
|
Fock_matrix_ao_alpha(i,j) = ao_mono_elec_integral(i,j) + ao_bi_elec_integral_alpha(i,j)
|
||||||
Fock_matrix_ao_beta (i,j) = ao_mono_elec_integral(i,j) + ao_bi_elec_integral_beta (i,j)
|
Fock_matrix_ao_beta (i,j) = ao_mono_elec_integral(i,j) + ao_bi_elec_integral_beta (i,j)
|
||||||
@ -100,8 +99,8 @@ END_PROVIDER
|
|||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, ao_bi_elec_integral_alpha, (ao_num_align, ao_num) ]
|
BEGIN_PROVIDER [ double precision, ao_bi_elec_integral_alpha, (ao_num, ao_num) ]
|
||||||
&BEGIN_PROVIDER [ double precision, ao_bi_elec_integral_beta , (ao_num_align, ao_num) ]
|
&BEGIN_PROVIDER [ double precision, ao_bi_elec_integral_beta , (ao_num, ao_num) ]
|
||||||
use map_module
|
use map_module
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -115,8 +114,6 @@ END_PROVIDER
|
|||||||
double precision :: ao_bielec_integral, local_threshold
|
double precision :: ao_bielec_integral, local_threshold
|
||||||
double precision, allocatable :: ao_bi_elec_integral_alpha_tmp(:,:)
|
double precision, allocatable :: ao_bi_elec_integral_alpha_tmp(:,:)
|
||||||
double precision, allocatable :: ao_bi_elec_integral_beta_tmp(:,:)
|
double precision, allocatable :: ao_bi_elec_integral_beta_tmp(:,:)
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: ao_bi_elec_integral_beta_tmp
|
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: ao_bi_elec_integral_alpha_tmp
|
|
||||||
|
|
||||||
ao_bi_elec_integral_alpha = 0.d0
|
ao_bi_elec_integral_alpha = 0.d0
|
||||||
ao_bi_elec_integral_beta = 0.d0
|
ao_bi_elec_integral_beta = 0.d0
|
||||||
@ -126,13 +123,13 @@ END_PROVIDER
|
|||||||
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,p,q,r,s,i0,j0,k0,l0, &
|
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,p,q,r,s,i0,j0,k0,l0, &
|
||||||
!$OMP ao_bi_elec_integral_alpha_tmp,ao_bi_elec_integral_beta_tmp, c0, c1, c2, &
|
!$OMP ao_bi_elec_integral_alpha_tmp,ao_bi_elec_integral_beta_tmp, c0, c1, c2, &
|
||||||
!$OMP local_threshold)&
|
!$OMP local_threshold)&
|
||||||
!$OMP SHARED(ao_num,ao_num_align,HF_density_matrix_ao_alpha,HF_density_matrix_ao_beta,&
|
!$OMP SHARED(ao_num,HF_density_matrix_ao_alpha,HF_density_matrix_ao_beta,&
|
||||||
!$OMP ao_integrals_map,ao_integrals_threshold, ao_bielec_integral_schwartz, &
|
!$OMP ao_integrals_map,ao_integrals_threshold, ao_bielec_integral_schwartz, &
|
||||||
!$OMP ao_overlap_abs, ao_bi_elec_integral_alpha, ao_bi_elec_integral_beta)
|
!$OMP ao_overlap_abs, ao_bi_elec_integral_alpha, ao_bi_elec_integral_beta)
|
||||||
|
|
||||||
allocate(keys(1), values(1))
|
allocate(keys(1), values(1))
|
||||||
allocate(ao_bi_elec_integral_alpha_tmp(ao_num_align,ao_num), &
|
allocate(ao_bi_elec_integral_alpha_tmp(ao_num,ao_num), &
|
||||||
ao_bi_elec_integral_beta_tmp(ao_num_align,ao_num))
|
ao_bi_elec_integral_beta_tmp(ao_num,ao_num))
|
||||||
ao_bi_elec_integral_alpha_tmp = 0.d0
|
ao_bi_elec_integral_alpha_tmp = 0.d0
|
||||||
ao_bi_elec_integral_beta_tmp = 0.d0
|
ao_bi_elec_integral_beta_tmp = 0.d0
|
||||||
|
|
||||||
@ -212,13 +209,13 @@ END_PROVIDER
|
|||||||
!$OMP PARALLEL DEFAULT(NONE) &
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,n_elements_max, &
|
!$OMP PRIVATE(i,j,l,k1,k,integral,ii,jj,kk,ll,i8,keys,values,n_elements_max, &
|
||||||
!$OMP n_elements,ao_bi_elec_integral_alpha_tmp,ao_bi_elec_integral_beta_tmp)&
|
!$OMP n_elements,ao_bi_elec_integral_alpha_tmp,ao_bi_elec_integral_beta_tmp)&
|
||||||
!$OMP SHARED(ao_num,ao_num_align,HF_density_matrix_ao_alpha,HF_density_matrix_ao_beta,&
|
!$OMP SHARED(ao_num,HF_density_matrix_ao_alpha,HF_density_matrix_ao_beta,&
|
||||||
!$OMP ao_integrals_map, ao_bi_elec_integral_alpha, ao_bi_elec_integral_beta)
|
!$OMP ao_integrals_map, ao_bi_elec_integral_alpha, ao_bi_elec_integral_beta)
|
||||||
|
|
||||||
call get_cache_map_n_elements_max(ao_integrals_map,n_elements_max)
|
call get_cache_map_n_elements_max(ao_integrals_map,n_elements_max)
|
||||||
allocate(keys(n_elements_max), values(n_elements_max))
|
allocate(keys(n_elements_max), values(n_elements_max))
|
||||||
allocate(ao_bi_elec_integral_alpha_tmp(ao_num_align,ao_num), &
|
allocate(ao_bi_elec_integral_alpha_tmp(ao_num,ao_num), &
|
||||||
ao_bi_elec_integral_beta_tmp(ao_num_align,ao_num))
|
ao_bi_elec_integral_beta_tmp(ao_num,ao_num))
|
||||||
ao_bi_elec_integral_alpha_tmp = 0.d0
|
ao_bi_elec_integral_alpha_tmp = 0.d0
|
||||||
ao_bi_elec_integral_beta_tmp = 0.d0
|
ao_bi_elec_integral_beta_tmp = 0.d0
|
||||||
|
|
||||||
@ -261,42 +258,40 @@ END_PROVIDER
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, Fock_matrix_mo_alpha, (mo_tot_num_align,mo_tot_num) ]
|
BEGIN_PROVIDER [ double precision, Fock_matrix_mo_alpha, (mo_tot_num,mo_tot_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Fock matrix on the MO basis
|
! Fock matrix on the MO basis
|
||||||
END_DOC
|
END_DOC
|
||||||
double precision, allocatable :: T(:,:)
|
double precision, allocatable :: T(:,:)
|
||||||
allocate ( T(ao_num_align,mo_tot_num) )
|
allocate ( T(ao_num,mo_tot_num) )
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T
|
|
||||||
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
|
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
|
||||||
1.d0, Fock_matrix_ao_alpha,size(Fock_matrix_ao_alpha,1), &
|
1.d0, Fock_matrix_ao_alpha,size(Fock_matrix_ao_alpha,1), &
|
||||||
mo_coef, size(mo_coef,1), &
|
mo_coef, size(mo_coef,1), &
|
||||||
0.d0, T, ao_num_align)
|
0.d0, T, size(T,1))
|
||||||
call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, &
|
call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, &
|
||||||
1.d0, mo_coef,size(mo_coef,1), &
|
1.d0, mo_coef,size(mo_coef,1), &
|
||||||
T, size(T,1), &
|
T, size(T,1), &
|
||||||
0.d0, Fock_matrix_mo_alpha, mo_tot_num_align)
|
0.d0, Fock_matrix_mo_alpha, size(Fock_matrix_mo_alpha,1))
|
||||||
deallocate(T)
|
deallocate(T)
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, Fock_matrix_mo_beta, (mo_tot_num_align,mo_tot_num) ]
|
BEGIN_PROVIDER [ double precision, Fock_matrix_mo_beta, (mo_tot_num,mo_tot_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Fock matrix on the MO basis
|
! Fock matrix on the MO basis
|
||||||
END_DOC
|
END_DOC
|
||||||
double precision, allocatable :: T(:,:)
|
double precision, allocatable :: T(:,:)
|
||||||
allocate ( T(ao_num_align,mo_tot_num) )
|
allocate ( T(ao_num,mo_tot_num) )
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T
|
|
||||||
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
|
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
|
||||||
1.d0, Fock_matrix_ao_beta,size(Fock_matrix_ao_beta,1), &
|
1.d0, Fock_matrix_ao_beta,size(Fock_matrix_ao_beta,1), &
|
||||||
mo_coef, size(mo_coef,1), &
|
mo_coef, size(mo_coef,1), &
|
||||||
0.d0, T, ao_num_align)
|
0.d0, T, size(T,1))
|
||||||
call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, &
|
call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, &
|
||||||
1.d0, mo_coef,size(mo_coef,1), &
|
1.d0, mo_coef,size(mo_coef,1), &
|
||||||
T, size(T,1), &
|
T, size(T,1), &
|
||||||
0.d0, Fock_matrix_mo_beta, mo_tot_num_align)
|
0.d0, Fock_matrix_mo_beta, size(Fock_matrix_mo_beta,1))
|
||||||
deallocate(T)
|
deallocate(T)
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
@ -319,7 +314,7 @@ BEGIN_PROVIDER [ double precision, HF_energy ]
|
|||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, Fock_matrix_ao, (ao_num_align, ao_num) ]
|
BEGIN_PROVIDER [ double precision, Fock_matrix_ao, (ao_num, ao_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Fock matrix in AO basis set
|
! Fock matrix in AO basis set
|
||||||
@ -330,8 +325,7 @@ BEGIN_PROVIDER [ double precision, Fock_matrix_ao, (ao_num_align, ao_num) ]
|
|||||||
then
|
then
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
do j=1,ao_num
|
do j=1,ao_num
|
||||||
!DIR$ VECTOR ALIGNED
|
do i=1,ao_num
|
||||||
do i=1,ao_num_align
|
|
||||||
Fock_matrix_ao(i,j) = Fock_matrix_ao_alpha(i,j)
|
Fock_matrix_ao(i,j) = Fock_matrix_ao_alpha(i,j)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
@ -339,7 +333,7 @@ BEGIN_PROVIDER [ double precision, Fock_matrix_ao, (ao_num_align, ao_num) ]
|
|||||||
double precision, allocatable :: T(:,:), M(:,:)
|
double precision, allocatable :: T(:,:), M(:,:)
|
||||||
integer :: ierr
|
integer :: ierr
|
||||||
! F_ao = S C F_mo C^t S
|
! F_ao = S C F_mo C^t S
|
||||||
allocate (T(ao_num_align,ao_num),M(ao_num_align,ao_num),stat=ierr)
|
allocate (T(ao_num,ao_num),M(ao_num,ao_num),stat=ierr)
|
||||||
if (ierr /=0 ) then
|
if (ierr /=0 ) then
|
||||||
print *, irp_here, ' : allocation failed'
|
print *, irp_here, ' : allocation failed'
|
||||||
endif
|
endif
|
||||||
@ -391,7 +385,7 @@ subroutine Fock_mo_to_ao(FMO,LDFMO,FAO,LDFAO)
|
|||||||
double precision, allocatable :: T(:,:), M(:,:)
|
double precision, allocatable :: T(:,:), M(:,:)
|
||||||
integer :: ierr
|
integer :: ierr
|
||||||
! F_ao = S C F_mo C^t S
|
! F_ao = S C F_mo C^t S
|
||||||
allocate (T(ao_num_align,ao_num),M(ao_num_align,ao_num),stat=ierr)
|
allocate (T(ao_num,ao_num),M(ao_num,ao_num),stat=ierr)
|
||||||
if (ierr /=0 ) then
|
if (ierr /=0 ) then
|
||||||
print *, irp_here, ' : allocation failed'
|
print *, irp_here, ' : allocation failed'
|
||||||
endif
|
endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
BEGIN_PROVIDER [double precision, HF_density_matrix_ao_alpha, (ao_num_align,ao_num) ]
|
BEGIN_PROVIDER [double precision, HF_density_matrix_ao_alpha, (ao_num,ao_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! S^-1 x Alpha density matrix in the AO basis x S^-1
|
! S^-1 x Alpha density matrix in the AO basis x S^-1
|
||||||
@ -11,7 +11,7 @@ BEGIN_PROVIDER [double precision, HF_density_matrix_ao_alpha, (ao_num_align,ao_n
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_beta, (ao_num_align,ao_num) ]
|
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_beta, (ao_num,ao_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! S^-1 Beta density matrix in the AO basis x S^-1
|
! S^-1 Beta density matrix in the AO basis x S^-1
|
||||||
@ -24,7 +24,7 @@ BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_beta, (ao_num_align,ao_
|
|||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao, (ao_num_align,ao_num) ]
|
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao, (ao_num,ao_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! S^-1 Density matrix in the AO basis S^-1
|
! S^-1 Density matrix in the AO basis S^-1
|
||||||
|
@ -12,13 +12,13 @@ subroutine damping_SCF
|
|||||||
character :: save_char
|
character :: save_char
|
||||||
|
|
||||||
allocate( &
|
allocate( &
|
||||||
D_alpha( ao_num_align, ao_num ), &
|
D_alpha( ao_num, ao_num ), &
|
||||||
D_beta( ao_num_align, ao_num ), &
|
D_beta( ao_num, ao_num ), &
|
||||||
F_new( ao_num_align, ao_num ), &
|
F_new( ao_num, ao_num ), &
|
||||||
D_new_alpha( ao_num_align, ao_num ), &
|
D_new_alpha( ao_num, ao_num ), &
|
||||||
D_new_beta( ao_num_align, ao_num ), &
|
D_new_beta( ao_num, ao_num ), &
|
||||||
delta_alpha( ao_num_align, ao_num ), &
|
delta_alpha( ao_num, ao_num ), &
|
||||||
delta_beta( ao_num_align, ao_num ))
|
delta_beta( ao_num, ao_num ))
|
||||||
|
|
||||||
do j=1,ao_num
|
do j=1,ao_num
|
||||||
do i=1,ao_num
|
do i=1,ao_num
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
BEGIN_PROVIDER [ double precision, diagonal_Fock_matrix_mo, (ao_num) ]
|
BEGIN_PROVIDER [ double precision, diagonal_Fock_matrix_mo, (ao_num) ]
|
||||||
&BEGIN_PROVIDER [ double precision, eigenvectors_Fock_matrix_mo, (ao_num_align,mo_tot_num) ]
|
&BEGIN_PROVIDER [ double precision, eigenvectors_Fock_matrix_mo, (ao_num,mo_tot_num) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Diagonal Fock matrix in the MO basis
|
! Diagonal Fock matrix in the MO basis
|
||||||
|
@ -17,7 +17,6 @@ subroutine huckel_guess
|
|||||||
c = 0.5d0 * 1.75d0
|
c = 0.5d0 * 1.75d0
|
||||||
|
|
||||||
do j=1,ao_num
|
do j=1,ao_num
|
||||||
!DIR$ VECTOR ALIGNED
|
|
||||||
do i=1,ao_num
|
do i=1,ao_num
|
||||||
Fock_matrix_ao(i,j) = c*ao_overlap(i,j)*(ao_mono_elec_integral_diag(i) + &
|
Fock_matrix_ao(i,j) = c*ao_overlap(i,j)*(ao_mono_elec_integral_diag(i) + &
|
||||||
ao_mono_elec_integral_diag(j))
|
ao_mono_elec_integral_diag(j))
|
||||||
|
Loading…
Reference in New Issue
Block a user