10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 12:55:37 +01:00

cleanup complex mo one e ints

This commit is contained in:
Kevin Gasperich 2020-02-20 15:38:02 -06:00
parent bcf824cc18
commit 702ba79af8
6 changed files with 27 additions and 132 deletions

View File

@ -4,16 +4,10 @@ doc: Nucleus-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[mo_integrals_e_n_real] [mo_integrals_e_n_complex]
type: double precision type: double precision
doc: Real part of the nucleus-electron integrals in |MO| basis set doc: Complex nucleus-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (2,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
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[io_mo_integrals_e_n] [io_mo_integrals_e_n]
@ -29,16 +23,10 @@ doc: Kinetic energy integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[mo_integrals_kinetic_real] [mo_integrals_kinetic_complex]
type: double precision type: double precision
doc: Real part of the kinetic energy integrals in |MO| basis set doc: Complex kinetic energy integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (2,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
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[io_mo_integrals_kinetic] [io_mo_integrals_kinetic]
@ -48,23 +36,16 @@ interface: ezfio,provider,ocaml
default: None default: None
[mo_integrals_pseudo] [mo_integrals_pseudo]
type: double precision type: double precision
doc: Pseudopotential integrals in |MO| basis set doc: Pseudopotential integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[mo_integrals_pseudo_real] [mo_integrals_pseudo_complex]
type: double precision type: double precision
doc: Real part of the pseudopotential integrals in |MO| basis set doc: Complex pseudopotential integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (2,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
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[io_mo_integrals_pseudo] [io_mo_integrals_pseudo]
@ -73,22 +54,17 @@ doc: Read/Write |MO| pseudopotential integrals from/to disk [ Write | Read | Non
interface: ezfio,provider,ocaml interface: ezfio,provider,ocaml
default: None default: None
[mo_one_e_integrals] [mo_one_e_integrals]
type: double precision type: double precision
doc: One-electron integrals in |MO| basis set doc: One-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[mo_one_e_integrals_real] [mo_one_e_integrals_complex]
type: double precision type: double precision
doc: Real part of the one-electron integrals in |MO| basis set doc: Complex one-electron integrals in |MO| basis set
size: (mo_basis.mo_num,mo_basis.mo_num) size: (2,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
size: (mo_basis.mo_num,mo_basis.mo_num)
interface: ezfio interface: ezfio
[io_mo_one_e_integrals] [io_mo_one_e_integrals]

View File

@ -1,6 +1,4 @@
BEGIN_PROVIDER [double precision, mo_kinetic_integrals_real, (mo_num,mo_num)] BEGIN_PROVIDER [complex*16, mo_kinetic_integrals_complex, (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 implicit none
BEGIN_DOC BEGIN_DOC
! Kinetic energy integrals in the MO basis ! Kinetic energy integrals in the MO basis
@ -8,17 +6,8 @@
integer :: i,j integer :: i,j
if (read_mo_integrals_kinetic) then if (read_mo_integrals_kinetic) then
mo_kinetic_integrals_real = 0.d0 call ezfio_get_mo_one_e_ints_mo_integrals_kinetic_complex(mo_kinetic_integrals_complex)
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' 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 else
call ao_to_mo_complex( & call ao_to_mo_complex( &
ao_kinetic_integrals_complex, & ao_kinetic_integrals_complex, &
@ -28,16 +17,7 @@
) )
endif endif
if (write_mo_integrals_kinetic) then if (write_mo_integrals_kinetic) then
!mo_kinetic_integrals_real = 0.d0 call ezfio_set_mo_one_e_ints_mo_integrals_kinetic_complex(mo_kinetic_integrals_complex)
!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' print *, 'MO kinetic integrals written to disk'
endif endif

View File

@ -1,6 +1,4 @@
BEGIN_PROVIDER [ double precision, mo_one_e_integrals_real,(mo_num,mo_num)] BEGIN_PROVIDER [ complex*16, mo_one_e_integrals_complex,(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 implicit none
integer :: i,j,n,l integer :: i,j,n,l
BEGIN_DOC BEGIN_DOC
@ -10,28 +8,18 @@
print*,'Providing the one-electron integrals' print*,'Providing the one-electron integrals'
IF (read_mo_one_e_integrals) THEN 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_complex(mo_one_e_integrals_complex)
call ezfio_get_mo_one_e_ints_mo_one_e_integrals_imag(mo_one_e_integrals_imag)
ELSE ELSE
mo_one_e_integrals_real = mo_integrals_n_e_real + mo_kinetic_integrals_real mo_one_e_integrals_complex = mo_integrals_n_e_complex + mo_kinetic_integrals_complex
mo_one_e_integrals_imag = mo_integrals_n_e_imag + mo_kinetic_integrals_imag
IF (DO_PSEUDO) THEN IF (DO_PSEUDO) THEN
mo_one_e_integrals_real += mo_pseudo_integrals_real mo_one_e_integrals_complex += mo_pseudo_integrals_complex
mo_one_e_integrals_imag += mo_pseudo_integrals_imag
ENDIF ENDIF
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 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_complex(mo_one_e_integrals_complex)
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' print *, 'MO one-e integrals written to disk'
ENDIF ENDIF

View File

@ -7,7 +7,6 @@ subroutine orthonormalize_mos
call ortho_lowdin_complex(mo_overlap_complex,p,mo_num,mo_coef_complex,m,ao_num) call ortho_lowdin_complex(mo_overlap_complex,p,mo_num,mo_coef_complex,m,ao_num)
mo_label = 'Orthonormalized' mo_label = 'Orthonormalized'
SOFT_TOUCH mo_coef_complex mo_label SOFT_TOUCH mo_coef_complex mo_label
!TODO: should we do anything with the separate real/imag parts of mo_coef_complex?
else else
m = size(mo_coef,1) m = size(mo_coef,1)
p = size(mo_overlap,1) p = size(mo_overlap,1)

View File

@ -1,6 +1,4 @@
BEGIN_PROVIDER [double precision, mo_integrals_n_e_real, (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_imag, (mo_num,mo_num)]
&BEGIN_PROVIDER [complex*16, mo_integrals_n_e_complex, (mo_num,mo_num)]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Kinetic energy integrals in the MO basis ! Kinetic energy integrals in the MO basis
@ -8,17 +6,8 @@
integer :: i,j integer :: i,j
if (read_mo_integrals_e_n) then if (read_mo_integrals_e_n) then
mo_integrals_n_e_real = 0.d0 call ezfio_get_mo_one_e_ints_mo_integrals_e_n_complex(mo_integrals_n_e_complex)
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' 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 else
call ao_to_mo_complex( & call ao_to_mo_complex( &
ao_integrals_n_e_complex, & ao_integrals_n_e_complex, &
@ -28,16 +17,7 @@
) )
endif endif
if (write_mo_integrals_e_n) then if (write_mo_integrals_e_n) then
!mo_integrals_n_e_real = 0.d0 call ezfio_set_mo_one_e_ints_mo_integrals_e_n_complex(mo_integrals_n_e_complex)
!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' print *, 'MO N-e integrals written to disk'
endif endif

View File

@ -1,6 +1,4 @@
BEGIN_PROVIDER [double precision, mo_pseudo_integrals_real, (mo_num,mo_num)] BEGIN_PROVIDER [complex*16, mo_pseudo_integrals_complex, (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 implicit none
BEGIN_DOC BEGIN_DOC
! Pseudopotential integrals in |MO| basis ! Pseudopotential integrals in |MO| basis
@ -8,17 +6,8 @@
integer :: i,j integer :: i,j
if (read_mo_integrals_pseudo) then if (read_mo_integrals_pseudo) then
mo_pseudo_integrals_real = 0.d0 call ezfio_get_mo_one_e_ints_mo_integrals_pseudo_complex(mo_pseudo_integrals_complex)
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' 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 else if (do_pseudo) then
call ao_to_mo_complex( & call ao_to_mo_complex( &
ao_pseudo_integrals_complex, & ao_pseudo_integrals_complex, &
@ -26,28 +15,11 @@
mo_pseudo_integrals_complex, & mo_pseudo_integrals_complex, &
size(mo_pseudo_integrals_complex,1) & 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 else
mo_pseudo_integrals_real = 0.d0
mo_pseudo_integrals_imag = 0.d0
mo_pseudo_integrals_complex = (0.d0,0.d0) mo_pseudo_integrals_complex = (0.d0,0.d0)
endif endif
if (write_mo_integrals_pseudo) then if (write_mo_integrals_pseudo) then
!mo_pseudo_integrals_real = 0.d0 call ezfio_set_mo_one_e_ints_mo_integrals_pseudo_complex(mo_pseudo_integrals_complex)
!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' print *, 'MO pseudopotential integrals written to disk'
endif endif