10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 20:34:58 +01:00

Merge branch 'dev-lcpq' of github.com:QuantumPackage/qp2 into dev-lcpq

This commit is contained in:
Anthony Scemama 2019-06-05 17:28:46 +02:00
commit 8cdcd08579
3 changed files with 54 additions and 57 deletions

View File

@ -81,9 +81,6 @@ end = struct
;; ;;
let write_n_det n = let write_n_det n =
let n_det_old =
Ezfio.get_determinants_n_det ()
in
Det_number.to_int n Det_number.to_int n
|> Ezfio.set_determinants_n_det |> Ezfio.set_determinants_n_det
;; ;;

View File

@ -0,0 +1,54 @@
subroutine print_energy_components()
implicit none
BEGIN_DOC
! Prints the different components of the energy.
END_DOC
integer, save :: ifirst = 0
double precision :: Vee, Ven, Vnn, Vecp, T, f
integer :: i,j,k
Vnn = nuclear_repulsion
print *, 'Energy components'
print *, '================='
print *, ''
do k=1,N_states
Ven = 0.d0
Vecp = 0.d0
T = 0.d0
do j=1,mo_num
do i=1,mo_num
f = one_e_dm_mo_alpha(i,j,k) + one_e_dm_mo_beta(i,j,k)
Ven = Ven + f * mo_integrals_n_e(i,j)
Vecp = Vecp + f * mo_pseudo_integrals(i,j)
T = T + f * mo_kinetic_integrals(i,j)
enddo
enddo
Vee = psi_energy(k) - Ven - Vecp - T
if (ifirst == 0) then
ifirst = 1
print *, 'Vnn : Nucleus-Nucleus potential energy'
print *, 'Ven : Electron-Nucleus potential energy'
print *, 'Vee : Electron-Electron potential energy'
print *, 'Vecp : Potential energy of the pseudo-potentials'
print *, 'T : Electronic kinetic energy'
print *, ''
endif
print *, 'State ', k
print *, '---------'
print *, ''
print *, 'Vnn = ', Vnn
print *, 'Ven = ', Ven
print *, 'Vee = ', Vee
print *, 'Vecp = ', Vecp
print *, 'T = ', T
print *, ''
enddo
print *, ''
end

View File

@ -43,57 +43,3 @@ BEGIN_PROVIDER [ double precision, S2_matrix_all_dets,(N_det,N_det) ]
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
END_PROVIDER END_PROVIDER
subroutine print_energy_components()
implicit none
BEGIN_DOC
! Prints the different components of the energy.
END_DOC
integer, save :: ifirst = 0
double precision :: Vee, Ven, Vnn, Vecp, T, f
integer :: i,j,k
Vnn = nuclear_repulsion
print *, 'Energy components'
print *, '================='
print *, ''
do k=1,N_states
Ven = 0.d0
Vecp = 0.d0
T = 0.d0
do j=1,mo_num
do i=1,mo_num
f = one_e_dm_mo_alpha(i,j,k) + one_e_dm_mo_beta(i,j,k)
Ven = Ven + f * mo_integrals_n_e(i,j)
Vecp = Vecp + f * mo_pseudo_integrals(i,j)
T = T + f * mo_kinetic_integrals(i,j)
enddo
enddo
Vee = psi_energy(k) - Ven - Vecp - T
if (ifirst == 0) then
ifirst = 1
print *, 'Vnn : Nucleus-Nucleus potential energy'
print *, 'Ven : Electron-Nucleus potential energy'
print *, 'Vee : Electron-Electron potential energy'
print *, 'Vecp : Potential energy of the pseudo-potentials'
print *, 'T : Electronic kinetic energy'
print *, ''
endif
print *, 'State ', k
print *, '---------'
print *, ''
print *, 'Vnn = ', Vnn
print *, 'Ven = ', Ven
print *, 'Vee = ', Vee
print *, 'Vecp = ', Vecp
print *, 'T = ', T
print *, ''
enddo
print *, ''
end