Пример #1
0
 def test_rks_b3lypg(self):
     mf = dft.RKS(h2o)
     mf.grids.prune = None
     mf.run(conv_tol=1e-14, xc='b3lypg')
     g = rks.Grad(mf)
     self.assertAlmostEqual(finger(g.grad()), 0.066541921001296467, 6)
     g.grid_response = True
     self.assertAlmostEqual(finger(g.grad()), 0.066543737224608879, 6)
Пример #2
0
 def test_rks_lda(self):
     mf = dft.RKS(h2o)
     mf.grids.prune = None
     mf.run(conv_tol=1e-14, xc='lda,vwn')
     g = rks.Grad(mf)
     self.assertAlmostEqual(finger(g.grad()), 0.098438461959390822, 6)
     g.grid_response = True
     self.assertAlmostEqual(finger(g.grad()), 0.098441823256625829, 6)
Пример #3
0
 def test_rks_bp86(self):
     mf = dft.RKS(h2o)
     mf.grids.prune = None
     mf.run(conv_tol=1e-14, xc='b88,p86')
     g = rks.Grad(mf)
     self.assertAlmostEqual(finger(g.grad()), 0.10362532283229957, 6)
     g.grid_response = True
     self.assertAlmostEqual(finger(g.grad()), 0.10357804241970789, 6)
Пример #4
0
 def test_rks_scanner(self):
     mol1 = mol.copy()
     mol1.set_geom_('''
     H   0.   0.   0.9
     F   0.   0.1  0.''')
     mf_scanner = rks.Grad(scf.RKS(mol).set(conv_tol=1e-14)).as_scanner()
     e, de = mf_scanner(mol)
     self.assertAlmostEqual(finger(de), 0.458572523892797, 6)
     e, de = mf_scanner(mol1)
     self.assertAlmostEqual(finger(de), 0.12763259021187467, 6)