9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 06:53:38 +01:00

put Madelung shift back into Enuc

This commit is contained in:
Kevin Gasperich 2024-03-12 18:37:31 -05:00
parent 8590b1d47a
commit a707cfec27
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ type:double precision
interface: ezfio
[madelung_constant]
doc: Madelung constant
doc: Madelung constant (also already included in nuclear_repulsion)
type: double precision
interface: ezfio,provider,ocaml
default: 0

View File

@ -852,7 +852,7 @@ def pyscf2QP2(cell,mf, kpts, kmesh=None, cas_idx=None, int_threshold = 1E-8,
#Total energy shift due to Ewald probe charge = -1/2 * Nelec*madelung/cell.vol =
madelung = tools.pbc.madelung(cell, kpts)
shift = madelung*cell.nelectron * -.5
e_nuc = (cell.energy_nuc())*Nk
e_nuc = (cell.energy_nuc() + shift)*Nk
print('nucl_repul', e_nuc)