Exemplo n.º 1
0
 def test_ea_radc2(self):
     e, v, conv, e_mp2 = run(self.mf, which='ea', nroots=5, tol=1e-12, do_mp2=True)
     self.assertTrue(all(conv))
     self.assertAlmostEqual(e_mp2, -0.20905685, 5)
     self.assertAlmostEqual(e[0],   0.15307444, 5) 
     self.assertAlmostEqual(e[1],   0.23140882, 5) 
     self.assertAlmostEqual(e[2],   0.67633060, 5) 
     self.assertAlmostEqual(e[3],   0.78837830, 5) 
     self.assertAlmostEqual(e[4],   0.84460837, 5)
Exemplo n.º 2
0
 def test_ea_radc2x(self):
     e, v, conv, e_mp2 = run(self.mf, method='2x', which='ea', nroots=5, tol=1e-12, do_mp2=True)
     self.assertTrue(all(conv))
     self.assertAlmostEqual(e_mp2, -0.20905685, 7)
     self.assertAlmostEqual(e[0],   0.14962281, 7) 
     self.assertAlmostEqual(e[1],   0.22781683, 7) 
     self.assertAlmostEqual(e[2],   0.41120578, 7) 
     self.assertAlmostEqual(e[3],   0.45801734, 7) 
     self.assertAlmostEqual(e[4],   0.56211438, 7)
Exemplo n.º 3
0
 def test_ip_radc2(self):
     e, v, convs, e_mp2 = run(self.mf, nroots=5, tol=1e-12, do_mp2=True)
     self.assertTrue(all(convs))
     self.assertAlmostEqual(e_mp2, -0.20905685, 7)
     self.assertAlmostEqual(e[0],   0.39840577, 7) 
     self.assertAlmostEqual(e[1],   0.51386759, 7) 
     self.assertAlmostEqual(e[2],   0.61060915, 7) 
     self.assertAlmostEqual(e[3],   1.15103064, 7) 
     self.assertAlmostEqual(e[4],   1.19289418, 7)
Exemplo n.º 4
0
 def test_ip_radc2x(self):
     e, v, conv, e_mp2 = run(self.mf, method='2x', nroots=5, tol=1e-12, do_mp2=True)
     self.assertTrue(all(conv))
     self.assertAlmostEqual(e_mp2, -0.20905685, 5)
     self.assertAlmostEqual(e[0],   0.40478204, 5) 
     self.assertAlmostEqual(e[1],   0.51862959, 5) 
     self.assertAlmostEqual(e[2],   0.61368598, 5) 
     self.assertAlmostEqual(e[3],   1.09082164, 5) 
     self.assertAlmostEqual(e[4],   1.14255326, 5)
Exemplo n.º 5
0
 def test_ea_df_radc3(self):
     e, v, conv, e_mp2 = run(self.mf,
                             method='3',
                             which='ea',
                             nroots=5,
                             tol=1e-12,
                             do_mp2=True)
     self.assertTrue(all(conv))
     self.assertAlmostEqual(e_mp2, -0.20905685, 5)
     self.assertAlmostEqual(e[0], 0.15472896, 5)
     self.assertAlmostEqual(e[1], 0.23249965, 5)
     self.assertAlmostEqual(e[2], 0.41121217, 5)
     self.assertAlmostEqual(e[3], 0.45801825, 5)
     self.assertAlmostEqual(e[4], 0.56210971, 5)
Exemplo n.º 6
0
 def test_ip_df_radc3(self):
     # [0.44743838 0.55574549 0.63750722 1.09105829 1.14208418]
     # [0.15472896 0.23249965 0.41121217 0.45801825 0.56210971]
     e, v, conv, e_mp2 = run(self.mf,
                             method='3',
                             nroots=5,
                             tol=1e-12,
                             do_mp2=True)
     self.assertTrue(all(conv))
     self.assertAlmostEqual(e_mp2, -0.20905685, 5)
     self.assertAlmostEqual(e[0], 0.44743838, 5)
     self.assertAlmostEqual(e[1], 0.55574549, 5)
     self.assertAlmostEqual(e[2], 0.63750722, 5)
     self.assertAlmostEqual(e[3], 1.09105829, 5)
     self.assertAlmostEqual(e[4], 1.14208418, 5)
Exemplo n.º 7
0
from pyscf import gto, scf
import adc
import time

mol = gto.M(atom='O 0 0 0; O 0 0 1', basis='cc-pvtz', verbose=0)
rhf = scf.RHF(mol).run(conv_tol=1e-12)

t0 = time.time()
e_ip = adc.run(rhf, method='2', which='ip')[0]
e_ea = adc.run(rhf, method='2', which='ea')[0]
t1 = time.time()
if adc.mpi_helper.rank == 0:
    print('Exact ERIs:')
    print('IP:', e_ip)
    print('EA:', e_ea)
    print('Time:', t1 - t0)

rhf = rhf.density_fit(auxbasis='aug-cc-pvqz-jkfit')
rhf.run(conv_tol=1e-12)

t0 = time.time()
e_ip = adc.run(rhf, method='2', which='ip')[0]
e_ea = adc.run(rhf, method='2', which='ea')[0]
t1 = time.time()
if adc.mpi_helper.rank == 0:
    print('Density fitting:')
    print('IP:', e_ip)
    print('EA:', e_ea)
    print('Time:', t1 - t0)