10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-13 17:43:50 +01:00

added complex mo_one_e_ints; maybe should be structured differently?

This commit is contained in:
Kevin Gasperich 2020-01-28 16:37:30 -06:00
parent 25d041379b
commit 648e157db9
7 changed files with 229 additions and 46 deletions

View File

@ -60,7 +60,8 @@ BEGIN_PROVIDER [ complex*16, ao_one_e_integrals_complex,(ao_num,ao_num)]
do i=1,ao_num
do j=1,ao_num
ao_one_e_integrals_complex(j,i)=ao_one_e_integrals(j,i)+(0.d0,1.d0)*ao_one_e_integrals_imag(j,i)
ao_one_e_integrals_complex(j,i)=dcmplx(ao_one_e_integrals(j,i), &
ao_one_e_integrals_imag(j,i))
enddo
enddo

View File

@ -171,3 +171,19 @@ BEGIN_PROVIDER [double precision, ao_kinetic_integrals_imag, (ao_num,ao_num)]
endif
END_PROVIDER
BEGIN_PROVIDER [complex*16, ao_kinetic_integrals_complex, (ao_num,ao_num)]
implicit none
BEGIN_DOC
! Kinetic energy integrals in the |AO| basis.
!
! $\langle \chi_i |\hat{T}| \chi_j \rangle$
!
END_DOC
integer :: i,j
do i=1,ao_num
do j=1,ao_num
ao_kinetic_integrals_complex(j,i) = dcmplx(ao_kinetic_integrals(j,i), &
ao_kinetic_integrals_imag(j,i))
enddo
enddo
END_PROVIDER

View File

@ -105,6 +105,21 @@ BEGIN_PROVIDER [ double precision, ao_integrals_n_e_imag, (ao_num,ao_num)]
endif
END_PROVIDER
BEGIN_PROVIDER [complex*16, ao_integrals_n_e_complex, (ao_num,ao_num)]
implicit none
BEGIN_DOC
! Nucleus-electron interaction, in the |AO| basis set.
!
! :math:`\langle \chi_i | -\sum_A \frac{1}{|r-R_A|} | \chi_j \rangle`
END_DOC
integer :: i,j
do i=1,ao_num
do j=1,ao_num
ao_integrals_n_e_complex(j,i) = dcmplx(ao_integrals_n_e(j,i), &
ao_integrals_n_e_imag(j,i))
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_integrals_n_e_per_atom, (ao_num,ao_num,nucl_num)]
BEGIN_DOC

View File

@ -1,23 +1,57 @@
BEGIN_PROVIDER [double precision, mo_kinetic_integrals, (mo_num,mo_num)]
BEGIN_PROVIDER [double precision, mo_kinetic_integrals, (mo_num,mo_num)]
&BEGIN_PROVIDER [double precision, mo_kinetic_integrals_imag, (mo_num,mo_num)]
&BEGIN_PROVIDER [complex*16, mo_kinetic_integrals_complex, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Kinetic energy integrals in the MO basis
END_DOC
if (read_mo_integrals_kinetic) then
call ezfio_get_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
print *, 'MO kinetic integrals read from disk'
if (is_periodic) then
integer :: i,j
if (read_mo_integrals_kinetic) then
call ezfio_get_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
call ezfio_get_mo_one_e_ints_mo_integrals_kinetic_imag(mo_kinetic_integrals_imag)
print *, 'MO kinetic integrals read from disk'
do i=1,mo_num
do j=1,mo_num
mo_kinetic_integrals_complex(j,i) = dcmplx(mo_kinetic_integrals(j,i), &
mo_kinetic_integrals_imag(j,i))
enddo
enddo
else
call ao_to_mo_complex( &
ao_kinetic_integrals_complex, &
size(ao_kinetic_integrals_complex,1), &
mo_kinetic_integrals_complex, &
size(mo_kinetic_integrals_complex,1) &
)
do i=1,mo_num
do j=1,mo_num
mo_kinetic_integrals(j,i)=dble(mo_kinetic_integrals_complex(j,i))
mo_kinetic_integrals_imag(j,i)=dimag(mo_kinetic_integrals_complex(j,i))
enddo
enddo
endif
if (write_mo_integrals_kinetic) then
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic_imag(mo_kinetic_integrals_imag)
print *, 'MO kinetic integrals written to disk'
endif
else
call ao_to_mo( &
ao_kinetic_integrals, &
size(ao_kinetic_integrals,1), &
mo_kinetic_integrals, &
size(mo_kinetic_integrals,1) &
)
endif
if (write_mo_integrals_kinetic) then
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
print *, 'MO kinetic integrals written to disk'
if (read_mo_integrals_kinetic) then
call ezfio_get_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
print *, 'MO kinetic integrals read from disk'
else
call ao_to_mo( &
ao_kinetic_integrals, &
size(ao_kinetic_integrals,1), &
mo_kinetic_integrals, &
size(mo_kinetic_integrals,1) &
)
endif
if (write_mo_integrals_kinetic) then
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic(mo_kinetic_integrals)
print *, 'MO kinetic integrals written to disk'
endif
endif
END_PROVIDER

View File

@ -24,3 +24,46 @@ BEGIN_PROVIDER [ double precision, mo_one_e_integrals,(mo_num,mo_num)]
ENDIF
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_one_e_integrals_imag,(mo_num,mo_num)]
implicit none
integer :: i,j,n,l
BEGIN_DOC
! array of the one-electron Hamiltonian on the |MO| basis :
! sum of the kinetic and nuclear electronic potentials (and pseudo potential if needed)
END_DOC
print*,'Providing the one-electron integrals'
IF (read_mo_one_e_integrals) THEN
call ezfio_get_mo_one_e_ints_mo_one_e_integrals_imag(mo_one_e_integrals_imag)
ELSE
mo_one_e_integrals_imag = mo_integrals_n_e_imag + mo_kinetic_integrals_imag
IF (DO_PSEUDO) THEN
mo_one_e_integrals_imag += mo_pseudo_integrals_imag
ENDIF
ENDIF
IF (write_mo_one_e_integrals) THEN
call ezfio_set_mo_one_e_ints_mo_one_e_integrals_imag(mo_one_e_integrals_imag)
print *, 'MO one-e integrals written to disk'
ENDIF
END_PROVIDER
BEGIN_PROVIDER [ complex*16, mo_one_e_integrals_complex,(mo_num,mo_num)]
implicit none
integer :: i,j,n,l
BEGIN_DOC
! One-electron Hamiltonian in the |AO| basis.
END_DOC
do i=1,mo_num
do j=1,mo_num
mo_one_e_integrals_complex(j,i)=dcmplx(mo_one_e_integrals(j,i), &
mo_one_e_integrals_imag(j,i))
enddo
enddo
END_PROVIDER

View File

@ -1,23 +1,58 @@
BEGIN_PROVIDER [double precision, mo_integrals_n_e, (mo_num,mo_num)]
BEGIN_PROVIDER [double precision, mo_integrals_n_e, (mo_num,mo_num)]
&BEGIN_PROVIDER [double precision, mo_integrals_n_e_imag, (mo_num,mo_num)]
&BEGIN_PROVIDER [complex*16, mo_integrals_n_e_complex, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Nucleus-electron interaction on the |MO| basis
END_DOC
if (read_mo_integrals_e_n) then
call ezfio_get_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
print *, 'MO N-e integrals read from disk'
if (is_periodic) then
integer :: i,j
if (read_mo_integrals_e_n) then
call ezfio_get_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
call ezfio_get_mo_one_e_ints_mo_integrals_e_n_imag(mo_integrals_n_e_imag)
print *, 'MO N-e integrals read from disk'
do i=1,mo_num
do j=1,mo_num
mo_integrals_n_e_complex(j,i) = dcmplx(mo_integrals_n_e(j,i), &
mo_integrals_n_e_imag(j,i))
enddo
enddo
else
call ao_to_mo_complex( &
ao_integrals_n_e_complex, &
size(ao_integrals_n_e_complex,1), &
mo_integrals_n_e_complex, &
size(mo_integrals_n_e_complex,1) &
)
do i=1,mo_num
do j=1,mo_num
mo_integrals_n_e(j,i)=dble(mo_integrals_n_e_complex(j,i))
mo_integrals_n_e_imag(j,i)=dimag(mo_integrals_n_e_complex(j,i))
enddo
enddo
endif
if (write_mo_integrals_e_n) then
call ezfio_set_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
call ezfio_set_mo_one_e_ints_mo_integrals_e_n_imag(mo_integrals_n_e_imag)
print *, 'MO N-e integrals written to disk'
endif
else
call ao_to_mo( &
ao_integrals_n_e, &
size(ao_integrals_n_e,1), &
mo_integrals_n_e, &
size(mo_integrals_n_e,1) &
)
endif
if (write_mo_integrals_e_n) then
call ezfio_set_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
print *, 'MO N-e integrals written to disk'
if (read_mo_integrals_e_n) then
call ezfio_get_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
print *, 'MO N-e integrals read from disk'
else
call ao_to_mo( &
ao_integrals_n_e, &
size(ao_integrals_n_e,1), &
mo_integrals_n_e, &
size(mo_integrals_n_e,1) &
)
endif
if (write_mo_integrals_e_n) then
call ezfio_set_mo_one_e_ints_mo_integrals_e_n(mo_integrals_n_e)
print *, 'MO N-e integrals written to disk'
endif
endif
END_PROVIDER

View File

@ -1,26 +1,65 @@
BEGIN_PROVIDER [double precision, mo_pseudo_integrals, (mo_num,mo_num)]
BEGIN_PROVIDER [double precision, mo_pseudo_integrals, (mo_num,mo_num)]
&BEGIN_PROVIDER [double precision, mo_pseudo_integrals_imag, (mo_num,mo_num)]
&BEGIN_PROVIDER [complex*16, mo_pseudo_integrals_complex, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Pseudopotential integrals in |MO| basis
END_DOC
if (read_mo_integrals_pseudo) then
call ezfio_get_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
print *, 'MO pseudopotential integrals read from disk'
else if (do_pseudo) then
call ao_to_mo( &
ao_pseudo_integrals, &
size(ao_pseudo_integrals,1), &
mo_pseudo_integrals, &
size(mo_pseudo_integrals,1) &
)
else
if (is_periodic) then
integer :: i,j
if (read_mo_integrals_pseudo) then
call ezfio_get_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
call ezfio_get_mo_one_e_ints_mo_integrals_pseudo_imag(mo_pseudo_integrals_imag)
print *, 'MO pseudopotential integrals read from disk'
do i=1,mo_num
do j=1,mo_num
mo_pseudo_integrals_complex(j,i) = dcmplx(mo_pseudo_integrals(j,i), &
mo_pseudo_integrals_imag(j,i))
enddo
enddo
else if (do_pseudo) then
call ao_to_mo_complex( &
ao_pseudo_integrals_complex, &
size(ao_pseudo_integrals_complex,1), &
mo_pseudo_integrals_complex, &
size(mo_pseudo_integrals_complex,1) &
)
do i=1,mo_num
do j=1,mo_num
mo_pseudo_integrals(j,i)=dble(mo_pseudo_integrals_complex(j,i))
mo_pseudo_integrals_imag(j,i)=dimag(mo_pseudo_integrals_complex(j,i))
enddo
enddo
else
mo_pseudo_integrals = 0.d0
endif
mo_pseudo_integrals_imag = 0.d0
mo_pseudo_integrals_complex = (0.d0,0.d0)
endif
if (write_mo_integrals_pseudo) then
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo_imag(mo_pseudo_integrals_imag)
print *, 'MO pseudopotential integrals written to disk'
endif
else
if (read_mo_integrals_pseudo) then
call ezfio_get_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
print *, 'MO pseudopotential integrals read from disk'
else if (do_pseudo) then
call ao_to_mo( &
ao_pseudo_integrals, &
size(ao_pseudo_integrals,1), &
mo_pseudo_integrals, &
size(mo_pseudo_integrals,1) &
)
else
mo_pseudo_integrals = 0.d0
endif
if (write_mo_integrals_pseudo) then
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
print *, 'MO pseudopotential integrals written to disk'
if (write_mo_integrals_pseudo) then
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo(mo_pseudo_integrals)
print *, 'MO pseudopotential integrals written to disk'
endif
endif
END_PROVIDER