Fixed the pt_charges bug:

+ added the pt_charges integrals to the usual v_ne
  + added only the nuclei_pt_charge interaction to the usual nuclear_repulsion (and not the pt_charge_pt_charge interaction)
This commit is contained in:
eginer 2023-06-12 13:36:01 +02:00
parent 2f6c7e4ba0
commit bb23d6a5b5
4 changed files with 15 additions and 3 deletions

View File

@ -104,6 +104,9 @@ BEGIN_PROVIDER [ double precision, ao_integrals_n_e, (ao_num,ao_num)]
IF(do_pseudo) THEN
ao_integrals_n_e += ao_pseudo_integrals
ENDIF
IF(point_charges) THEN
ao_integrals_n_e += ao_integrals_pt_chrg
ENDIF
endif

View File

@ -43,12 +43,11 @@ python write_pt_charges.py ${EZFIO}
qp set nuclei point_charges True
qp run scf | tee ${EZFIO}.pt_charges.out
energy="$(ezfio get hartree_fock energy)"
good=-92.76613324421798
good=-92.79920682236470
eq $energy $good $thresh
rm -rf $EZFIO
}
@test "H2_1" { # 1s
run h2_1.ezfio -1.005924963288527
}
@ -85,6 +84,8 @@ rm -rf $EZFIO
run hcn.ezfio -92.88717500035233
}
@test "B-B" { # 3s
run b2_stretched.ezfio -48.9950585434279
}

View File

@ -206,7 +206,12 @@ BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
enddo
nuclear_repulsion *= 0.5d0
if(point_charges)then
nuclear_repulsion += pt_chrg_nuclei_interaction + pt_chrg_interaction
print*,'bear nuclear repulsion = ',nuclear_repulsion
print*,'adding the interaction between the nuclein and the point charges'
print*,'to the usual nuclear repulsion '
nuclear_repulsion += pt_chrg_nuclei_interaction
print*,'new nuclear repulsion = ',nuclear_repulsion
print*,'WARNING: we do not add the interaction between the point charges themselves'
endif
end if

View File

@ -205,5 +205,8 @@ BEGIN_PROVIDER [ double precision, pt_chrg_nuclei_interaction]
enddo
print*,'Interaction between point charges and nuclei'
print*,'pt_chrg_nuclei_interaction = ',pt_chrg_nuclei_interaction
if(point_charges)then
provide pt_chrg_interaction
endif
END_PROVIDER