-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hello,
I noticed massive differences between the use of Gaussian DF and Mixed DF with EWF. I ran the BN example (input below) and got these energies:
E(HF GDF)= -79.05369913 Ha
E(HF MDF)= -79.05264902 Ha
E(CCSD GDF)= -79.15337163 Ha
E(CCSD MDF)= -79.15252937 Ha
E(Emb. CCSD @hf GDF)= -79.15039359 Ha
E(Emb. CCSD @hf MDF)= -79.05270913 Ha (!!!!)
Of course mHa differences due to integrations are expected, but here only with GDF, EWF approaches the full system reference as expected, while with MDF, EWF basically does not retrieve any correlation...
Note that the full system CCSD does converge to the same result (within 1mHa) with both GDF and MDF, so it is not a problem with the solver
Any reason why this should happen?
import numpy as np
import pyscf
import pyscf.pbc
import pyscf.pbc.scf
import pyscf.pbc.cc
import vayesta
import vayesta.ewf
cell = pyscf.pbc.gto.Cell()
a = 3.615
cell.atom = "B 0 0 0 ; N %f %f %f" % (a / 4, a / 4, a / 4)
cell.a = np.asarray([[a / 2, a / 2, 0], [0, a / 2, a / 2], [a / 2, 0, a / 2]])
cell.basis = "sto-6g"
cell.output = "pyscf.out"
cell.verbose = 4
cell.build()
# Hartree-Fock with k-points
kmesh = [2, 2, 2]
kpts = cell.make_kpts(kmesh)
# HF GDF
hf_gdf = pyscf.pbc.scf.KRHF(cell,kpts).density_fit()
hf_gdf.kernel()
# EMB CCSD GDF
emb_gdf = vayesta.ewf.EWF(hf_gdf, bath_options=dict(threshold=1e-6))
emb_gdf.kernel()
# Reference full system CCSD GDF
cc_gdf = pyscf.pbc.cc.KCCSD(hf_gdf)
cc_gdf.kernel()
# HF MDF
hf_mdf = pyscf.pbc.scf.KRHF(cell,kpts).mix_density_fit()
hf_mdf.kernel()
# EMB CCSD MDF
emb_mdf = vayesta.ewf.EWF(hf_mdf, bath_options=dict(threshold=1e-6))
emb_mdf.kernel()
# Reference full system CCSD MDF
cc_mdf = pyscf.pbc.cc.KCCSD(hf_mdf)
cc_mdf.kernel()
print("E(HF GDF)= %+16.8f Ha" % hf_gdf.e_tot)
print("E(HF MDF)= %+16.8f Ha" % hf_mdf.e_tot)
print("E(CCSD GDF)= %+16.8f Ha" % cc_gdf.e_tot)
print("E(CCSD MDF)= %+16.8f Ha" % cc_mdf.e_tot)
print("E(Emb. CCSD @HF GDF)= %+16.8f Ha" % emb_gdf.e_tot)
print("E(Emb. CCSD @HF MDF)= %+16.8f Ha" % emb_mdf.e_tot)