当前位置: 首页>>代码示例>>Python>>正文


Python pyquante2.basisset函数代码示例

本文整理汇总了Python中pyquante2.basisset函数的典型用法代码示例。如果您正苦于以下问题:Python basisset函数的具体用法?Python basisset怎么用?Python basisset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了basisset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_lih_averaging

 def test_lih_averaging(self):
     bfs = basisset(lih,'sto-3g')
     hamiltonian = rhf(bfs)
     iterator = AveragingIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -7.860746149768, 6)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例2: test_oh

 def test_oh(self):
     bfs = basisset(oh,'sto-3g')
     hamiltonian = rohf(bfs)
     iterator = ROSCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -74.359151530162, 5)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例3: plot_orbs

def plot_orbs():
    bfs = basisset(h2,'sto3g')
    orbs = np.array([[1.0,1.0],
                     [1.0,-1.0]],'d')
    
    vtk_orbital(h2,orbs,bfs)
    return
开发者ID:aikinogard,项目名称:pyquante2,代码行数:7,代码来源:plots.py

示例4: test_h2o_averaging

 def test_h2o_averaging(self):
     bfs = basisset(h2o,'sto-3g')
     hamiltonian = rhf(bfs)
     iterator = AveragingIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -74.959857776754, 5)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例5: plot_h2_lineplot

def plot_h2_lineplot():
    bfs = basisset(h2,'6-31G')
    solver = rhf(h2,bfs)
    solver.converge()
    points = [(0,0,z) for z in np.linspace(-5,5)]
    lineplot_orbs(points,solver.orbs[:,:2],bfs,True)
    return
开发者ID:aikinogard,项目名称:pyquante2,代码行数:7,代码来源:plots.py

示例6: test_he_triplet_xlda

 def test_he_triplet_xlda(self):
     from pyquante2.geo.samples import he
     he.multiplicity = 3
     bfs = basisset(he,'sto-3g')
     solver = dft(he,bfs,'xs')
     ens = solver.converge()
     self.assertAlmostEqual(solver.energy,-1.7819689849)
开发者ID:jvtrudel,项目名称:pyquante2,代码行数:7,代码来源:test_dft.py

示例7: pyq2_dft

def pyq2_dft(atomtuples=[(2,0,0,0)],basis = '6-31G**',maxit=10,xcname='svwn'):
    import pyquante2 as pyq2
    print ("pyq2 DFT run")
    geo = pyq2.molecule(atomtuples)
    bfs = pyq2.basisset(geo,name=basis)
    i1 = pyq2.onee_integrals(bfs,geo)
    i2 = pyq2.twoe_integrals(bfs)
    grid = pyq2.grid(geo)
    h = i1.T + i1.V
    orbe,orbs = pyq2.geigh(h,i1.S)
    eold = 0
    grid.setbfamps(bfs)
    E0 = geo.nuclear_repulsion()

    for i in range(maxit):
        D = pyq2.dmat(orbs,geo.nocc())
        E1 = 2*pyq2.trace2(h,D)

        J = i2.get_j(D)
        Ej = 2*pyq2.trace2(J,D)

        Exc,Vxc = pyq2.get_xc(grid,0.5*D,xcname=xcname)

        energy = E0+E1+Ej+Exc
        F = h+2*J+Vxc

        orbe,orbs = pyq2.geigh(F,i1.S)

        print (i,energy,E1,Ej,Exc,E0)
        if np.isclose(energy,eold):
            break
        eold = energy
    return energy
开发者ID:Konjkov,项目名称:pyquante2,代码行数:33,代码来源:pyq1_comparison.py

示例8: test_li

 def test_li(self):
     bfs = basisset(li,'sto-3g')
     hamiltonian = uhf(bfs)
     iterator = USCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -7.315525981280, 6)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例9: test_h2_631

 def test_h2_631(self):
     bfs = basisset(h2,'6-31gss')
     hamiltonian = rhf(bfs)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -1.131333590574, 7)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例10: test_h2

 def test_h2(self):
     bfs = basisset(h2,'sto-3g')
     hamiltonian = rhf(bfs)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -1.117099435262, 7)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:7,代码来源:test_scf.py

示例11: test_CH4

 def test_CH4(self):
     """CH4 symmetry Td"""
     bfs = basisset(ch4,'sto-3g')
     hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -39.726862723517, 6)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:8,代码来源:test_scf.py

示例12: plot_orb2

def plot_orb2():
    from pyquante2 import basisset,h2
    bfs = basisset(h2,'sto3g')
    orbs = np.array([[1.0,1.0],
                     [1.0,-1.0]],'d')
    
    vtk_orbs(h2,orbs,bfs)
    return
开发者ID:aikinogard,项目名称:pyquante2,代码行数:8,代码来源:vtkplot.py

示例13: test_CH4

 def test_CH4(self):
     """CH4 symmetry Td"""
     bfs = basisset(CH4, "sto-3g")
     solver = rhf(CH4, bfs, libint=True)
     ens = solver.converge()
     hp5("Ham.h5", solver.i1.V + solver.i1.T)
     hp5("TwoS.h5", solver.i2._2e_ints)
     self.assertPrecisionEqual(solver.energy, -39.72591203477140)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:8,代码来源:test_CheMPS2.py

示例14: test_h2

 def test_h2(self):
     bfs = basisset(h2,'6-31g**')
     solver=rhf(h2,bfs)
     solver.converge()
     nvirt = len(bfs)-h2.nocc()
     emp2 = mp2(solver.i2,solver.orbs,solver.orbe,h2.nocc(),len(bfs)-h2.nocc())
     self.assertAlmostEqual(emp2,-0.02632654197486595)
     return
开发者ID:aikinogard,项目名称:pyquante2,代码行数:8,代码来源:test_mp2.py

示例15: test_H2

 def test_H2(self):
     bfs = basisset(h2,'cc-pvdz')
     hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     nvirt = len(bfs)-h2.nocc()
     eccsd = ccsd(hamiltonian, iterator.orbs, iterator.orbe, h2.nocc(), nvirt)
     self.assertAlmostEqual(eccsd, -0.034544318453406, 8)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:9,代码来源:test_ccsd.py


注:本文中的pyquante2.basisset函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。