diff --git a/devel/import_integrals/export_integrals_mo.irp.f b/devel/import_integrals/export_integrals_mo.irp.f index 5e47145..ba8a387 100644 --- a/devel/import_integrals/export_integrals_mo.irp.f +++ b/devel/import_integrals/export_integrals_mo.irp.f @@ -63,6 +63,7 @@ subroutine run call write_2d('T_mo.qp',mo_kinetic_integrals) call write_2d('P_mo.qp',mo_pseudo_integrals) call write_2d('V_mo.qp',mo_integrals_n_e) + call write_2d('H_mo.qp',mo_one_e_integrals) iunit = getunitandopen('W_mo.qp','w') do l=1,mo_num diff --git a/devel/import_integrals/import_integrals_mo.irp.f b/devel/import_integrals/import_integrals_mo.irp.f index 7784c87..8c97dda 100644 --- a/devel/import_integrals/import_integrals_mo.irp.f +++ b/devel/import_integrals/import_integrals_mo.irp.f @@ -19,31 +19,33 @@ subroutine run ! ! Tmo.qp : kinetic energy integrals ! -! Smo.qp : overlap matrix -! ! Pmo.qp : pseudopotential integrals ! ! Vmo.qp : electron-nucleus potential ! -! hmo.qp : core hamiltonian. If hmo exists, the other 1-e files are not read +! Hmo.qp : core hamiltonian. If hmo exists, the other 1-e files are not read ! ! Wmo.qp : electron repulsion integrals ! END_DOC - integer :: iunit - integer :: getunitandopen + integer :: iunit + integer :: getunitandopen - integer ::i,j,k,l - double precision :: integral - double precision, allocatable :: A(:,:) + integer :: i,j,k,l + double precision :: integral + double precision, allocatable :: A(:,:) - integer :: n_integrals - integer(key_kind), allocatable :: buffer_i(:) + integer :: n_integrals + logical :: exists + integer(key_kind), allocatable :: buffer_i(:) real(integral_kind), allocatable :: buffer_values(:) allocate(buffer_i(mo_num**3), buffer_values(mo_num**3)) allocate (A(mo_num,mo_num)) + PROVIDE mo_two_e_integrals_in_map + + ! Nuclear repulsion A(1,1) = huge(1.d0) iunit = getunitandopen('E.qp','r') @@ -55,31 +57,35 @@ subroutine run call ezfio_set_nuclei_io_nuclear_repulsion('Read') endif - logical :: exists - inquire(file='hmo.qp',exist=exists) + ! One-electron integrals + + exists = .False. + inquire(file='Hmo.qp',exist=exists) if (exists) then + A = 0.d0 i = 1 j = 1 - iunit = getunitandopen('hmo.qp','r') - do while(.true.) - read (iunit,*,end=23) i,j, integral + iunit = getunitandopen('Hmo.qp','r') + do + read (iunit,*,end=8) i,j, integral if (i<0 .or. i>mo_num) then print *, i - stop 'i out of bounds in hmo.qp' + stop 'i out of bounds in Hmo.qp' endif if (j<0 .or. j>mo_num) then print *, j - stop 'j out of bounds in hmo.qp' + stop 'j out of bounds in Hmo.qp' endif A(i,j) = integral enddo - 23 continue + 8 continue close(iunit) call ezfio_set_mo_one_e_ints_mo_one_e_integrals(A) call ezfio_set_mo_one_e_ints_io_mo_one_e_integrals('Read') else + A = 0.d0 i = 1 j = 1 @@ -143,7 +149,10 @@ subroutine run call ezfio_set_mo_one_e_ints_mo_integrals_n_e(A) call ezfio_set_mo_one_e_ints_io_mo_integrals_n_e('Read') - endif + end if + + + ! Two-electron integrals iunit = getunitandopen('Wmo.qp','r') n_integrals=0 diff --git a/devel/svdwf/Evar_TruncSVD.irp.f b/devel/svdwf/Evar_TruncSVD.irp.f index 4ae793d..3476d0d 100644 --- a/devel/svdwf/Evar_TruncSVD.irp.f +++ b/devel/svdwf/Evar_TruncSVD.irp.f @@ -158,10 +158,9 @@ subroutine run enddo TOUCH psi_bilinear_matrix call update_wf_of_psi_bilinear_matrix(.False.) - print*, r, PSI_energy(1) + nuclear_repulsion !CI_energy(1) + print*, r, PSI_energy(1) + nuclear_repulsion, s2_values(1) !CI_energy(1) + call save_wavefunction() enddo - !!$OMP END DO - !!$OMP END PARALLEL deallocate(U,D,V) ! !!! end