本文整理汇总了Python中PyQuante.PyQuante2.SCF类的典型用法代码示例。如果您正苦于以下问题:Python SCF类的具体用法?Python SCF怎么用?Python SCF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SCF类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testMP2
def testMP2(self):
solv = SCF(h2,method="HF")
solv.iterate()
nclosed,nopen = h2.get_closedopen()
nbf = len(solv.basis_set.get())
emp2 = MP2(solv.ERI,solv.solver.orbs,solv.solver.orbe,nclosed,nbf-nclosed)
self.assertAlmostEqual(solv.energy+emp2,-1.157660,4)
示例2: testLiUHFFT
def testLiUHFFT(self):
li_uhf = SCF(li,method="UHF",etemp=1e4)
li_uhf.iterate()
# No test, since I don't really know what the energy should be:
# finite temperature HF is kind of a hack. But this at least
# tests that the program runs
return
示例3: test
def test():
from PyQuante.PyQuante2 import SCF,DmatSolver
print "Target energy: ",-1.130501
h2 = Molecule('H2',atomlist=[(1,(0.35,0,0)),(1,(-0.35,0,0))],
units='Angs')
h2_hf = SCF(h2,method='HF',SolverConstructor=DmatSolver)
h2_hf.iterate()
print "Energy: ",h2_hf.energy
示例4: testLiH_OEP_AN
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)
示例5: testCIS
def testCIS(self):
solv = SCF(h2,method="HF")
solv.iterate()
nclosed,nopen = h2.get_closedopen()
nbf = len(solv.basis_set.get())
nocc = nclosed+nopen
nvirt = nbf-nocc
Ecis = CIS(solv.ERI,solv.solver.orbs,solv.solver.orbe,nocc,
nvirt,solv.energy)
self.assertAlmostEqual(Ecis[0],-0.573134,3)
示例6: testTCPSolver
def testTCPSolver(self):
solv = SCF(h2,method='HF',SolverConstructor=DmatSolver)
solv.iterate()
self.assertAlmostEqual(solv.energy,-1.131334,4)
示例7: testJacobiSolver
def testJacobiSolver(self):
from PyQuante.Solvers import jacobi
solv = SCF(h2,method='HF',SolverConstructor=SubspaceSolver,
solver=jacobi)
solv.iterate()
self.assertAlmostEqual(solv.energy,-1.131334,4)
示例8: testDavidsonSolver
def testDavidsonSolver(self):
from PyQuante.Solvers import davidson
solv = SCF(h2,method='HF',SolverConstructor=SubspaceSolver,
solver=davidson,pass_nroots=True)
solv.iterate()
self.assertAlmostEqual(solv.energy,-1.131334,4)
示例9: testVTZ
def testVTZ(self):
solv = SCF(h2, method="HF",basis='cc-pvtz')
solv.iterate()
self.assertAlmostEqual(solv.energy,-1.133009,4)
示例10: testHeHF
def testHeHF(self):
he_hf = SCF(self.he, method="HF")
he_hf.iterate()
self.assertAlmostEqual(he_hf.energy, -2.855260, 3)
示例11: testH2HF
def testH2HF(self):
h2_hf = SCF(self.h2, method="HF")
h2_hf.iterate()
self.assertAlmostEqual(h2_hf.energy, -1.130501, 4)
示例12: testLiUHF
def testLiUHF(self):
li_uhf = SCF(self.li,method='UHF')
li_uhf.iterate()
self.assertAlmostEqual(li_uhf.energy,-7.431364,4)
示例13: test631Gdp
def test631Gdp(self):
solv = SCF(h2, method="HF",basis='6-31G(d,p)')
solv.iterate()
self.assertAlmostEqual(solv.energy,-1.131344,4)
示例14: testH2BLYP
def testH2BLYP(self):
h2_blyp = SCF(h2,method="DFT",functional='BLYP')
h2_blyp.iterate()
self.assertAlmostEqual(h2_blyp.energy,-1.167767,4)
示例15: testOHMINDO
def testOHMINDO(self):
oh_mindo = SCF(oh,method="UMINDO3")
oh_mindo.iterate()
self.assertAlmostEqual(oh_mindo.energy,16.49043,2)