Esempio n. 1
0
 def test_df_eomee_ccsd_matvec_singlet(self):
     numpy.random.seed(10)
     r1 = numpy.random.random((no, nv)) - .9
     r2 = numpy.random.random((no, no, nv, nv)) - .9
     r2 = r2 + r2.transpose(1, 0, 3, 2)
     myeom = eom_rccsd.EOMEESinglet(mycc1)
     vec = myeom.amplitudes_to_vector(r1, r2)
     imds = myeom.make_imds(eris1)
     vec1 = myeom.matvec(vec, imds)
     r1, r2 = myeom.vector_to_amplitudes(vec1)
     self.assertAlmostEqual(lib.finger(r1), -11001.96269563921, 8)
     self.assertAlmostEqual(lib.finger(r2), 10145.408880409095, 8)
Esempio n. 2
0
 def test_eomee_ccsd_matvec_singlet3(self):
     numpy.random.seed(10)
     r1 = numpy.random.random((no, nv)) - .9
     r2 = numpy.random.random((no, no, nv, nv)) - .9
     r2 = r2 + r2.transpose(1, 0, 3, 2)
     myeom = eom_rccsd.EOMEESinglet(mycc31)
     vec = myeom.amplitudes_to_vector(r1, r2)
     imds = myeom.make_imds(eris31)
     vec1 = myeom.matvec(vec, imds)
     r1, r2 = myeom.vector_to_amplitudes(vec1)
     self.assertAlmostEqual(lib.finger(r1), -112883.3791497977, 8)
     self.assertAlmostEqual(lib.finger(r2), -268199.3475813322, 8)
Esempio n. 3
0
ekrcc, t1, t2 = mycc.kernel()

# EOM-EE-KRCCSD
myeomee = eom_krccsd.EOMEESinglet(mycc)
eee, vee = myeomee.kernel(nroots=nroots_test)

# Supercell
scell = super_cell(cell, nmp)

# Gamma-point RHF based on supercell
mf = scf.RHF(scell, exxdiv=None).density_fit()
erhf = mf.kernel()

# Molecular RCCSD
mycc = RCCSD(mf)
ercc, t1, t2 = mycc.kernel()

# Molecular EOM-RCCSD
myeomee = mol_eom_rccsd.EOMEESinglet(mycc)
eee_mol, vee_mol = myeomee.kernel(nroots=nroots_test * np.prod(nmp))

eee = np.sort(np.hstack(eee[:]))
eee_mol = np.array(eee_mol)

print("PBC KRHF Energy:", ekrhf)
print("PBC RHF Energy :", erhf)
print("PBC KRCCSD Energy        :", ekrcc)
print("Mol RCCSD Energy per cell:", ercc / np.prod(nmp))
print("PBC EOM-EE-KRCCSD roots:", repr(eee))
print("Mol EOM-EE-RCCSD  roots:", repr(eee_mol))