Inconsistent results between RHF and FCI for periodic 1D hydrogen chain #2914
-
|
I am trying to compute the FCI energy of a 1D periodic hydrogen chain using the code below. I've checked my RHF energy results against the literature (Fig 2.b) and confirmed they are consistent. However, the FCI energy output by PySCF is not even of the same order of magnitude as the RHF energy. The way I calculate the FCI energy follows the method in issue #2038. Could anyone help me figure out how to correctly set up the FCI calculation and get the correct import numpy
from pyscf import scf
from pyscf import fci
from pyscf import gto
from pyscf.pbc import scf as pbcscf
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import tools
N = atoms_per_supercell = 8
r = 2.0
atom_per_unitcell = N
Nk = N // atom_per_unitcell
cell = pbcgto.M(
unit='B',
a = [[atom_per_unitcell*r, 0.0, 0.0], [0, 1, 0], [0, 0, 1]],
atom = ';'.join([f'H {r*i} 0 0' for i in range(atom_per_unitcell)]),
dimension=1,
low_dim_ft_type='inf_vacuum',
basis = 'sto-3g',
verbose=0,
)
print('\ngamma point calculation (supercell)')
supercell = tools.super_cell(cell, [Nk,1,1])
#supercell = cell
mf = pbcscf.RHF(supercell, exxdiv='ewald').density_fit()
e = mf.kernel()
print(f'HF Energy (gamma point): {e/N}')
# HF Energy (gamma point): -0.5068134304221097
e, fcivec = fci.FCI(mf).kernel()
print(f'FCI Energy: {e/N}')
# FCI Energy: -1.3991071501019476
e, fcivec = fci.FCI(cell).kernel(h1e=mf.mo_coeff.T@(mf.get_hcore()@mf.mo_coeff), eri=mf.with_df.ao2mo(mf.mo_coeff), norb=mf.mo_coeff.shape[1], nelec=supercell.nelectron, ecore=mf.energy_nuc())
print(f'FCI Energy: {e/N}')
# FCI Energy: -1.3991071501019494 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
The issue has to do with how the exchange divergence correction (using the probe-charge Ewald Madelung constant correction) is handled in periodic HF, and whether one views this as a modification of the integrals or as an additive correction to the total energy. Separately, note that you don't need to think about a "cell" and a "supercell" separately here, since you're always doing a Gamma point calculation. Here's a cleaned up version, which will print You can see that adding the Madelung constant correction to the HF energy with |
Beta Was this translation helpful? Give feedback.
The issue has to do with how the exchange divergence correction (using the probe-charge Ewald Madelung constant correction) is handled in periodic HF, and whether one views this as a modification of the integrals or as an additive correction to the total energy. Separately, note that you don't need to think about a "cell" and a "supercell" separately here, since you're always doing a Gamma point calculation. Here's a cleaned up version,