• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python pyquante2.basisset函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: test_HBr

 def test_HBr(self):
     """HBr"""
     HBr = read_xyz('./molfiles/HBr.xyz')
     bfs = basisset(HBr,'sto-3g')
     hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -2545.887434128302, 4)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:9,代码来源:test_scf.py


示例17: test_C2H2Cl2

 def test_C2H2Cl2(self):
     """C2H2Cl2 symmetry C2H"""
     C2H2Cl2 = read_xyz('./molfiles/C2H2Cl2.xyz')
     bfs = basisset(C2H2Cl2,'sto-3g')
     hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -967.533150337277, 4)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:9,代码来源:test_scf.py


示例18: plot_h2_vtk

def plot_h2_vtk():
    bfs = basisset(h2,'sto3g')
    solver = rhf(h2,bfs)
    ens = solver.converge()

    # Note: these orbitals are not coming out symmetric. Why not??
    print(solver)
    print(solver.orbs)
    vtk_orbs(h2,solver.orbs,bfs,npts=10)
开发者ID:aikinogard,项目名称:pyquante2,代码行数:9,代码来源:plots.py


示例19: test_CF3

 def test_CF3(self):
     """CF3 radical"""
     CF3 = read_xyz('./molfiles/CF3.xyz')
     bfs = basisset(CF3,'sto-3g')
     hamiltonian = cuhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = USCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -331.480688906400, 5)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:9,代码来源:test_scf.py


示例20: test_H2O_4

 def test_H2O_4(self):
     """H2O tethramer symmetry S4"""
     H2O4 = read_xyz('./molfiles/H2O_4.xyz')
     bfs = basisset(H2O4,'sto-3g')
     hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals)
     iterator = SCFIterator(hamiltonian)
     iterator.converge()
     self.assertTrue(iterator.converged)
     self.assertAlmostEqual(iterator.energy, -299.909789863537, 5)
开发者ID:Konjkov,项目名称:pyquante2,代码行数:9,代码来源:test_scf.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python pyquery.pq函数代码示例发布时间:2022-05-27
下一篇:
Python python2_3.asUnicode函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap