9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-18 11:23:38 +01:00

restructured complex mo_one_e_ints

This commit is contained in:
Kevin Gasperich 2020-01-29 14:15:48 -06:00
parent 56cc1c6b40
commit 17ac52d2d5
9 changed files with 255 additions and 196 deletions

View File

@ -4,6 +4,12 @@ doc: Nucleus-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_e_n_real]
type: double precision
doc: Real part of the nucleus-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_e_n_imag]
type: double precision
doc: Imaginary part of the nucleus-electron integrals in |MO| basis set
@ -23,6 +29,12 @@ doc: Kinetic energy integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_kinetic_real]
type: double precision
doc: Real part of the kinetic energy integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_kinetic_imag]
type: double precision
doc: Imaginary part of the kinetic energy integrals in |MO| basis set
@ -43,6 +55,12 @@ doc: Pseudopotential integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_pseudo_real]
type: double precision
doc: Real part of the pseudopotential integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_integrals_pseudo_imag]
type: double precision
doc: Imaginary part of the pseudopotential integrals in |MO| basis set
@ -61,6 +79,12 @@ doc: One-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_one_e_integrals_real]
type: double precision
doc: Real part of the one-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio
[mo_one_e_integrals_imag]
type: double precision
doc: Imaginary part of the one-electron integrals in |MO| basis set

View File

@ -1,57 +1,23 @@
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)]
BEGIN_PROVIDER [double precision, mo_kinetic_integrals, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Kinetic energy integrals in the MO basis
END_DOC
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
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
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
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
END_PROVIDER

View File

@ -0,0 +1,45 @@
BEGIN_PROVIDER [double precision, mo_kinetic_integrals_real, (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
integer :: i,j
if (read_mo_integrals_kinetic) then
mo_kinetic_integrals_real = 0.d0
mo_kinetic_integrals_imag = 0.d0
call ezfio_get_mo_one_e_ints_mo_integrals_kinetic_real(mo_kinetic_integrals_real)
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_real(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) &
)
endif
if (write_mo_integrals_kinetic) then
!mo_kinetic_integrals_real = 0.d0
!mo_kinetic_integrals_imag = 0.d0
do i=1,mo_num
do j=1,mo_num
mo_kinetic_integrals_real(j,i)=dble(mo_kinetic_integrals_complex(j,i))
mo_kinetic_integrals_imag(j,i)=dimag(mo_kinetic_integrals_complex(j,i))
enddo
enddo
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic_real(mo_kinetic_integrals_real)
call ezfio_set_mo_one_e_ints_mo_integrals_kinetic_imag(mo_kinetic_integrals_imag)
print *, 'MO kinetic integrals written to disk'
endif
END_PROVIDER

View File

@ -24,46 +24,3 @@ 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

@ -0,0 +1,39 @@
BEGIN_PROVIDER [ double precision, mo_one_e_integrals_real,(mo_num,mo_num)]
&BEGIN_PROVIDER [ double precision, mo_one_e_integrals_imag,(mo_num,mo_num)]
&BEGIN_PROVIDER [ complex*16, mo_one_e_integrals_complex,(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_real(mo_one_e_integrals_real)
call ezfio_get_mo_one_e_ints_mo_one_e_integrals_imag(mo_one_e_integrals_imag)
ELSE
mo_one_e_integrals_real = mo_integrals_n_e_real + mo_kinetic_integrals_real
mo_one_e_integrals_imag = mo_integrals_n_e_imag + mo_kinetic_integrals_imag
IF (DO_PSEUDO) THEN
mo_one_e_integrals_real += mo_pseudo_integrals_real
mo_one_e_integrals_imag += mo_pseudo_integrals_imag
ENDIF
ENDIF
do i=1,mo_num
do j=1,mo_num
mo_one_e_integrals_complex(j,i)=dcmplx(mo_one_e_integrals_real(j,i), &
mo_one_e_integrals_imag(j,i))
enddo
enddo
IF (write_mo_one_e_integrals) THEN
call ezfio_set_mo_one_e_ints_mo_one_e_integrals_real(mo_one_e_integrals_real)
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

View File

@ -1,58 +1,23 @@
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)]
BEGIN_PROVIDER [double precision, mo_integrals_n_e, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Nucleus-electron interaction on the |MO| basis
END_DOC
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
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
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
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
END_PROVIDER

View File

@ -0,0 +1,46 @@
BEGIN_PROVIDER [double precision, mo_integrals_n_e_real, (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
! Kinetic energy integrals in the MO basis
END_DOC
integer :: i,j
if (read_mo_integrals_e_n) then
mo_integrals_n_e_real = 0.d0
mo_integrals_n_e_imag = 0.d0
call ezfio_get_mo_one_e_ints_mo_integrals_e_n_real(mo_integrals_n_e_real)
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_real(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) &
)
endif
if (write_mo_integrals_e_n) then
!mo_integrals_n_e_real = 0.d0
!mo_integrals_n_e_imag = 0.d0
do i=1,mo_num
do j=1,mo_num
mo_integrals_n_e_real(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
call ezfio_set_mo_one_e_ints_mo_integrals_e_n_real(mo_integrals_n_e_real)
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
END_PROVIDER

View File

@ -1,65 +1,26 @@
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)]
BEGIN_PROVIDER [double precision, mo_pseudo_integrals, (mo_num,mo_num)]
implicit none
BEGIN_DOC
! Pseudopotential integrals in |MO| basis
END_DOC
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
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
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 (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
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'
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'
endif
END_PROVIDER

View File

@ -0,0 +1,56 @@
BEGIN_PROVIDER [double precision, mo_pseudo_integrals_real, (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
integer :: i,j
if (read_mo_integrals_pseudo) then
mo_pseudo_integrals_real = 0.d0
mo_pseudo_integrals_imag = 0.d0
call ezfio_get_mo_one_e_ints_mo_integrals_pseudo_real(mo_pseudo_integrals_real)
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_real(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_real(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_real = 0.d0
mo_pseudo_integrals_imag = 0.d0
mo_pseudo_integrals_complex = (0.d0,0.d0)
endif
if (write_mo_integrals_pseudo) then
!mo_pseudo_integrals_real = 0.d0
!mo_pseudo_integrals_imag = 0.d0
do i=1,mo_num
do j=1,mo_num
mo_pseudo_integrals_real(j,i)=dble(mo_pseudo_integrals_complex(j,i))
mo_pseudo_integrals_imag(j,i)=dimag(mo_pseudo_integrals_complex(j,i))
enddo
enddo
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo_real(mo_pseudo_integrals_real)
call ezfio_set_mo_one_e_ints_mo_integrals_pseudo_imag(mo_pseudo_integrals_imag)
print *, 'MO pseudopotential integrals written to disk'
endif
END_PROVIDER