1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-06-02 11:25:23 +02:00

Add nuclear repulsion

This commit is contained in:
Anthony Scemama 2020-12-23 02:38:34 +01:00
parent ac95c76665
commit aa7ac08615
2 changed files with 5 additions and 6 deletions

View File

@ -8,7 +8,7 @@ BEGIN_PROVIDER [ double precision, energy_det_i, (N_det) ]
do k=1,N_det
call bitstring_to_list(psi_det(1,1,k), list, n, N_int)
energy_det_i(k) = 0.d0
energy_det_i(k) = nuclear_repulsion
do i=1,n
energy_det_i(k) += fock_matrix_diag_mo(list(i))
enddo

View File

@ -18,17 +18,16 @@ program mpn
c_pert(:,:) = 0.d0
c_pert(1,0) = 1.d0
double precision :: hij
e_pert(1) = nuclear_repulsion
do k=1,mp_order
! H_ij C^(k-1)
call h_s2_u_0_nstates_zmq(c_pert(1,k),s2,c_pert(1,k-1),1,N_det)
e_pert(k) = c_pert(1,k)
print *, k, e_pert(k), sum(e_pert) + nuclear_repulsion
e_pert(k) += c_pert(1,k)
print *, k, e_pert(k), sum(e_pert)
c_pert(1,k) = 0.d0
c_pert(:,k) = -c_pert(:,k)
do l=1,k-1
do l=1,k
do i=2,N_det
c_pert(i,k) = c_pert(i,k) + e_pert(l) * c_pert(i,k-l)
enddo