當前位置: 首頁>>代碼示例>>Python>>正文


Python PyQuante2.SCF類代碼示例

本文整理匯總了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)        
開發者ID:certik,項目名稱:pyquante,代碼行數:7,代碼來源:UnitSweet.py

示例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
開發者ID:certik,項目名稱:pyquante,代碼行數:7,代碼來源:UnitSweet.py

示例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
開發者ID:gabrielelanaro,項目名稱:pyquante,代碼行數:8,代碼來源:DMP.py

示例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)
開發者ID:certik,項目名稱:pyquante,代碼行數:9,代碼來源:UnitSweet.py

示例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)
開發者ID:certik,項目名稱:pyquante,代碼行數:10,代碼來源:UnitSweet.py

示例6: testTCPSolver

 def testTCPSolver(self):
     solv = SCF(h2,method='HF',SolverConstructor=DmatSolver)
     solv.iterate()
     self.assertAlmostEqual(solv.energy,-1.131334,4)
開發者ID:certik,項目名稱:pyquante,代碼行數:4,代碼來源:UnitSweet.py

示例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)
開發者ID:certik,項目名稱:pyquante,代碼行數:6,代碼來源:UnitSweet.py

示例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)
開發者ID:certik,項目名稱:pyquante,代碼行數:6,代碼來源:UnitSweet.py

示例9: testVTZ

 def testVTZ(self):
     solv = SCF(h2, method="HF",basis='cc-pvtz')
     solv.iterate()
     self.assertAlmostEqual(solv.energy,-1.133009,4)
開發者ID:certik,項目名稱:pyquante,代碼行數:4,代碼來源:UnitSweet.py

示例10: testHeHF

 def testHeHF(self):
     he_hf = SCF(self.he, method="HF")
     he_hf.iterate()
     self.assertAlmostEqual(he_hf.energy, -2.855260, 3)
開發者ID:gabrielelanaro,項目名稱:pyquante,代碼行數:4,代碼來源:MiniSweet.py

示例11: testH2HF

 def testH2HF(self):
     h2_hf = SCF(self.h2, method="HF")
     h2_hf.iterate()
     self.assertAlmostEqual(h2_hf.energy, -1.130501, 4)
開發者ID:gabrielelanaro,項目名稱:pyquante,代碼行數:4,代碼來源:MiniSweet.py

示例12: testLiUHF

 def testLiUHF(self):
     li_uhf = SCF(self.li,method='UHF')
     li_uhf.iterate()
     self.assertAlmostEqual(li_uhf.energy,-7.431364,4)
開發者ID:berquist,項目名稱:PyQuante,代碼行數:4,代碼來源:DFTSweet.py

示例13: test631Gdp

 def test631Gdp(self):
     solv = SCF(h2, method="HF",basis='6-31G(d,p)')
     solv.iterate()
     self.assertAlmostEqual(solv.energy,-1.131344,4)
開發者ID:certik,項目名稱:pyquante,代碼行數:4,代碼來源:UnitSweet.py

示例14: testH2BLYP

 def testH2BLYP(self):
     h2_blyp = SCF(h2,method="DFT",functional='BLYP')
     h2_blyp.iterate()
     self.assertAlmostEqual(h2_blyp.energy,-1.167767,4)
開發者ID:certik,項目名稱:pyquante,代碼行數:4,代碼來源:UnitSweet.py

示例15: testOHMINDO

 def testOHMINDO(self):
     oh_mindo = SCF(oh,method="UMINDO3")
     oh_mindo.iterate()
     self.assertAlmostEqual(oh_mindo.energy,16.49043,2)
開發者ID:certik,項目名稱:pyquante,代碼行數:4,代碼來源:UnitSweet.py


注:本文中的PyQuante.PyQuante2.SCF類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。