def testLiH_OEP_AN(self): do_oep_an = True lih_hf = SCF(lih,method="HF") lih_hf.iterate() ints = lih_hf.S,lih_hf.h,lih_hf.ERI E_exx,orbe_exx,orbs_exx = oep_hf_an(lih,lih_hf.solver.orbs, bfs=lih_hf.basis_set.get(), integrals=ints) self.assertAlmostEqual(E_exx,-7.981282,4)
def testLiH_OEP_AN(self): do_oep_an = True lih_hf = SCF(lih, method="HF") lih_hf.iterate() ints = lih_hf.S, lih_hf.h, lih_hf.ERI E_exx, orbe_exx, orbs_exx = oep_hf_an(lih, lih_hf.solver.orbs, bfs=lih_hf.basis_set.get(), integrals=ints) self.assertAlmostEqual(E_exx, -7.981282, 4)
def main(**opts): do_oep_an = opts.get('do_oep_an',True) mol = Molecule('LiH',[(1,(0,0,1.5)),(3,(0,0,-1.5))],units = 'Bohr') bfs = getbasis(mol) S,h,Ints = getints(bfs,mol) E_hf,orbe_hf,orbs_hf = rhf(mol,bfs=bfs,integrals=(S,h,Ints), DoAveraging=True) if do_oep_an: E_exx,orbe_exx,orbs_exx = oep_hf_an(mol,orbs_hf,bfs=bfs, integrals=(S,h,Ints)) else: E_exx,orbe_exx,orbs_exx = oep_hf(mol,orbs_hf,bfs=bfs, integrals=(S,h,Ints)) return E_exx
def main(**opts): do_oep_an = opts.get('do_oep_an', True) mol = Molecule('LiH', [(1, (0, 0, 1.5)), (3, (0, 0, -1.5))], units='Bohr') bfs = getbasis(mol) S, h, Ints = getints(bfs, mol) E_hf, orbe_hf, orbs_hf = rhf(mol, bfs=bfs, integrals=(S, h, Ints), DoAveraging=True) if do_oep_an: E_exx, orbe_exx, orbs_exx = oep_hf_an(mol, orbs_hf, bfs=bfs, integrals=(S, h, Ints)) else: E_exx, orbe_exx, orbs_exx = oep_hf(mol, orbs_hf, bfs=bfs, integrals=(S, h, Ints)) return E_exx