Closed abhishekkhedkar09 closed 11 months ago
Should be fixed on https://github.com/obackhouse/gdf/commit/3d57f60bb99f92c3aa8aa40ed19ed09232aa0839 -- can you test correctness? it's hitting the KPoints.__array__
interface and not sure if that's covered by tests, would be nice to know if everything is still good.
I checked with a similar input... I get different energies from pyscf ones..
print(mf.e_tot, mf_.e_tot, mf.converged, mf_.converged)
-7.565857404732421 -7.907788012100459 True True
here's my input
import numpy as np
import pyscf, pyscf.pbc, vayesta, vayesta.ewf
from pyscf.pbc.gto import Cell
from pyscf.pbc import scf as pbcscf
from vayesta.misc import solids
mortyscratch = "/scratch/grp/morty/k2262473"
basis, pseudo = "gth-dzvp-molopt-sr", "gth-pade"
kmesh = [2, 2, 2]
cell = Cell()
cell.a, cell.atom = solids.diamond(atoms=["Si", "Si"], a=5.31)
cell.basis = basis
cell.verbose = 5
if pseudo is not None:
cell.pseudo = pseudo
cell.exp_to_discard = 0.1
cell.build()
kpts = cell.make_kpts(kmesh)
mf = pbcscf.KUHF(cell, kpts)
mf = mf.rs_density_fit(auxbasis="weigend")
mf.max_cycle = 200
mf.kernel()
mf_ = pbcscf.KUHF(cell, kpts)
from gdf import RSGDF
df = RSGDF(cell, kpts, auxbasis="weigend")
df.build()
mf_.with_df = df
mf_.max_cycle = 200
mf_.kernel()
if not mf_.converged:
mf_ = mf_.newton()
mf_.kernel(mf_.make_rdm1())
print(mf.e_tot, mf_.e_tot, mf.converged, mf_.converged)
with open("pyscf_RSGDF", "w") as f:
f.write(f"With_df_dict={mf.with_df.__dict__}\n")
f.write(f"mfdict={mf.__dict__}\n")
with open("gdf_RSGDF", "w") as f:
f.write(f"With_df_dict={mf_.with_df.__dict__}\n")
f.write(f"mfdict={mf_.__dict__}\n")
Ok, that's a much bigger issue. Will look into it, thanks
Closing this as the original issue is now fixed, opened a new issue for your comment in #2
Here's my input:
With the above output, I get the following error, am I missing something? getting the same error for RSGDF, CCGDF, for KUHF as well as KRHF: