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

Python geom.shift_atom函数代码示例

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

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



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

示例1: test_d5h

    def test_d5h(self):
        atoms = ringhat(5, u)
        atoms = atoms[5:]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'D5h')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'C2v')
        self.assertTrue(geom.check_given_symm('C2v', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0], [1, 4], [2, 3], [5, 6]])

        atoms = ringhat(5, u)
        atoms = atoms[5:]
        atoms[1][0] = 'C1'
        gpname, orig, axes = geom.detect_symm(atoms, {'C':'ccpvdz','C1':'sto3g','N':'631g'})
        self.assertEqual(gpname, 'C2v')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'C2v')
        self.assertTrue(geom.check_given_symm('C2v', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0,2],[1],[3,4],[5,6]])
开发者ID:berquist,项目名称:pyscf,代码行数:25,代码来源:test_geom.py


示例2: test_detect_symm_c2h

    def test_detect_symm_c2h(self):
        atoms = [['H' , (1., 0., 2.)],
                 ['He', (0., 1., 0.)],
                 ['H' , (1., 0., 0.)],
                 ['H' , (-1.,0., 0.)],
                 ['H' , (-1.,0.,-2.)],
                 ['He', (0.,-1., 0.)]]
        l, orig, axes = geom.detect_symm(atoms)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(l, 'C2h')
        self.assertEqual(geom.symm_identical_atoms(l,atoms), [[0,4],[1,5],[2,3]])
        self.assertTrue(geom.check_given_symm('C2h', atoms))

        atoms = [['H' , (1., 0., 1.)],
                 ['H' , (1., 0.,-1.)],
                 ['He', (0., 0., 2.)],
                 ['He', (2., 0.,-2.)],
                 ['Li', (1., 1., 0.)],
                 ['Li', (1.,-1., 0.)]]
        l, orig, axes = geom.detect_symm(atoms)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(l, 'C2h')
        self.assertEqual(geom.symm_identical_atoms(l,atoms),
                         [[0, 1], [2, 3], [4, 5]])
        self.assertTrue(geom.check_given_symm('C2h', atoms))
开发者ID:berquist,项目名称:pyscf,代码行数:25,代码来源:test_geom.py


示例3: test_t

    def test_t(self):
        atoms = [['C', ( 1.0   ,-1.0   , 1.0   )],
                 ['O', ( 1.0-.1,-1.0+.2, 1.0   )],
                 ['O', ( 1.0   ,-1.0+.1, 1.0-.2)],
                 ['O', ( 1.0-.2,-1.0   , 1.0-.1)],
                 ['C', (-1.0   , 1.0   , 1.0   )],
                 ['O', (-1.0+.1, 1.0-.2, 1.0   )],
                 ['O', (-1.0   , 1.0-.1, 1.0-.2)],
                 ['O', (-1.0+.2, 1.0   , 1.0-.1)],
                 ['C', ( 1.0   , 1.0   ,-1.0   )],
                 ['O', ( 1.0-.2, 1.0   ,-1.0+.1)],
                 ['O', ( 1.0   , 1.0-.1,-1.0+.2)],
                 ['O', ( 1.0-.1, 1.0-.2,-1.0   )],
                 ['C', (-1.0   ,-1.0   ,-1.0   )],
                 ['O', (-1.0   ,-1.0+.1,-1.0+.2)],
                 ['O', (-1.0+.2,-1.0   ,-1.0+.1)],
                 ['O', (-1.0+.1,-1.0+.2,-1.0   )]]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'T')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'D2')
        self.assertTrue(geom.check_given_symm('D2', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0, 4, 8, 12], [1, 5, 11, 15],
                          [2, 6, 10, 13], [3, 7, 9, 14]])
开发者ID:berquist,项目名称:pyscf,代码行数:27,代码来源:test_geom.py


示例4: test_oh2

    def test_oh2(self):
        coords1 = numpy.dot(make8(1.5), u)
        atoms = [['C', c] for c in coords1]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Oh')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'D2h')
        self.assertTrue(geom.check_given_symm('D2h', atoms))
开发者ID:berquist,项目名称:pyscf,代码行数:10,代码来源:test_geom.py


示例5: test_ih4

    def test_ih4(self):
        coords1 = make12(1.5)
        atoms = [['C', c] for c in coords1]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Ih')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'Ci')
        self.assertTrue(geom.check_given_symm('Ci', atoms))
开发者ID:berquist,项目名称:pyscf,代码行数:10,代码来源:test_geom.py


示例6: test_detect_symm_d2h_b

 def test_detect_symm_d2h_b(self):
     atoms = [['H' , (1., 0., 2.)],
              ['He', (0., 1., 0.)],
              ['H' , (-1.,0.,-2.)],
              ['He', (0.,-1., 0.)]]
     l, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(l, 'D2h')
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertTrue(geom.check_given_symm('D2h', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms), [[0,2],[1,3]])
开发者ID:berquist,项目名称:pyscf,代码行数:10,代码来源:test_geom.py


示例7: test_d6h

 def test_d6h(self):
     atoms = ringhat(6, u)
     atoms = atoms[6:]
     gpname, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(gpname, 'D6h')
     gpname, axes = geom.subgroup(gpname, axes)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                      [[0,3],[1,2,4,5],[6,7]])
     self.assertTrue(geom.check_given_symm('D2h', atoms))
开发者ID:berquist,项目名称:pyscf,代码行数:10,代码来源:test_geom.py


示例8: test_td1

 def test_td1(self):
     coords1 = numpy.dot(make4(1.5), u)
     atoms = [['C', c] for c in coords1]
     gpname, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(gpname, 'Td')
     gpname, axes = geom.subgroup(gpname, axes)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(gpname, 'D2')
     self.assertTrue(geom.check_given_symm('D2', atoms))
     self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                      [[0, 1, 2, 3]])
开发者ID:berquist,项目名称:pyscf,代码行数:11,代码来源:test_geom.py


示例9: test_ih2

    def test_ih2(self):
        coords1 = numpy.dot(make60(1.5, 3), u)
        coords2 = numpy.dot(make12(1.1), u)
        atoms = [['C', c] for c in coords1] + [['C', c] for c in coords2]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Ih')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'Ci')
        self.assertTrue(geom.check_given_symm('Ci', atoms))
开发者ID:berquist,项目名称:pyscf,代码行数:11,代码来源:test_geom.py


示例10: test_detect_symm_c1

 def test_detect_symm_c1(self):
     atoms = [['H' , ( 1., 0., 0.)],
              ['He', ( 0., 1., 0.)],
              ['Li', ( 0., 0., 1.)],
              ['Be', ( .5, .5, .5)]]
     l, orig, axes = geom.detect_symm(atoms)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(l, 'C1')
     self.assertTrue(geom.check_given_symm('C1', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms),
                      [[0], [1], [2], [3]])
开发者ID:berquist,项目名称:pyscf,代码行数:11,代码来源:test_geom.py


示例11: test_c5v

    def test_c5v(self):
        atoms = ringhat(5, u)[5:-1]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'C5v')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'Cs')
        self.assertTrue(geom.check_given_symm('Cs', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0, 1], [2, 4], [3], [5]])
开发者ID:berquist,项目名称:pyscf,代码行数:11,代码来源:test_geom.py


示例12: test_c5h

    def test_c5h(self):
        atoms = ringhat(5, u)
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'C5h')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'Cs')
        self.assertTrue(geom.check_given_symm('Cs', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10,11]])
开发者ID:berquist,项目名称:pyscf,代码行数:11,代码来源:test_geom.py


示例13: test_td2

    def test_td2(self):
        coords1 = make4(1.5)
        coords2 = make4(1.9)
        atoms = [['C', c] for c in coords1] + [['C', c] for c in coords2]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Td')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'C2v')
        self.assertTrue(geom.check_given_symm('C2v', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0, 1], [2, 3], [4, 5], [6, 7]])
开发者ID:diradical,项目名称:pyscf,代码行数:13,代码来源:test_geom.py


示例14: test_c2v

 def test_c2v(self):
     atoms = ringhat(6, u)
     atoms = atoms[6:]
     atoms[1][0] = 'C1'
     atoms[2][0] = 'C1'
     basis = {'C': 'sto3g', 'N':'sto3g', 'C1':'ccpvdz'}
     gpname, orig, axes = geom.detect_symm(atoms, basis)
     self.assertEqual(gpname, 'C2v')
     gpname, axes = geom.subgroup(gpname, axes)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                      [[0, 3], [1, 2], [4, 5], [6, 7]])
     self.assertTrue(geom.check_given_symm('C2', atoms, basis))
开发者ID:berquist,项目名称:pyscf,代码行数:13,代码来源:test_geom.py


示例15: test_detect_symm_d2_a

 def test_detect_symm_d2_a(self):
     atoms = [['H' , (1., 0., 1.)],
              ['H' , (1., 0.,-1.)],
              ['He', (0., 0., 2.)],
              ['He', (2., 0., 2.)],
              ['He', (1., 1.,-2.)],
              ['He', (1.,-1.,-2.)]]
     l, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(l, 'D2')
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertTrue(geom.check_given_symm('D2', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms),
                      [[0, 1], [2, 3, 4, 5]])
开发者ID:berquist,项目名称:pyscf,代码行数:13,代码来源:test_geom.py


示例16: test_detect_symm_d2_b

 def test_detect_symm_d2_b(self):
     s2 = numpy.sqrt(.5)
     atoms = [['C', (0., 0., 1.)],
              ['C', (0., 0.,-1.)],
              ['H', ( 1, 0., 2.)],
              ['H', (-1, 0., 2.)],
              ['H', ( s2, s2,-2.)],
              ['H', (-s2,-s2,-2.)]]
     l, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(l, 'D2')
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertTrue(geom.check_given_symm('D2', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms),
                      [[0, 1], [2, 3, 4, 5]])
开发者ID:berquist,项目名称:pyscf,代码行数:14,代码来源:test_geom.py


示例17: test_c3v

    def test_c3v(self):
        coords1 = numpy.dot(make4(1.5), u)
        coords2 = numpy.dot(make4(1.9), u)
        atoms = [['C', c] for c in coords1] + [['C', c] for c in coords2]
        atoms[2][0] = 'C1'
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'C3v')

        gpname, axes = geom.subgroup(gpname, axes)
        atoms = geom.shift_atom(atoms, orig, axes)
        self.assertEqual(gpname, 'Cs')
        self.assertTrue(geom.check_given_symm('Cs', atoms))
        self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
                         [[0, 3], [1], [2], [4, 7], [5], [6]])
开发者ID:berquist,项目名称:pyscf,代码行数:14,代码来源:test_geom.py


示例18: test_detect_symm_cs3

 def test_detect_symm_cs3(self):
     atoms = [['H' , ( 2.,1., 0.)],
              ['He', ( 0.,1., 0.)],
              ['Li', (-1.,2., 0.)],
              ['Be', ( 1.,0., 0.)],
              ['S' , ( .5,1., -3)],
              ['S' , ( .5,1.,  3)]]
     coord = numpy.dot([a[1] for a in atoms], u)
     atoms = [[atoms[i][0], c] for i,c in enumerate(coord)]
     l, orig, axes = geom.detect_symm(atoms)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(l, 'Cs')
     self.assertTrue(geom.check_given_symm('Cs', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms),
                      [[0], [1], [2], [3], [4, 5]])
开发者ID:berquist,项目名称:pyscf,代码行数:15,代码来源:test_geom.py


示例19: test_detect_symm_ci

 def test_detect_symm_ci(self):
     atoms = [['H' , ( 1., 0., 0.)],
              ['He', ( 0., 1., 0.)],
              ['Li', ( 0., 0., 1.)],
              ['Be', ( .5, .5, .5)],
              ['H' , (-1., 0., 0.)],
              ['He', ( 0.,-1., 0.)],
              ['Li', ( 0., 0.,-1.)],
              ['Be', (-.5,-.5,-.5)]]
     l, orig, axes = geom.detect_symm(atoms)
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertEqual(l, 'Ci')
     self.assertTrue(geom.check_given_symm('Ci', atoms))
     self.assertEqual(geom.symm_identical_atoms(l,atoms),
                      [[0, 4], [1, 5], [2, 6], [3, 7]])
开发者ID:berquist,项目名称:pyscf,代码行数:15,代码来源:test_geom.py


示例20: test_detect_symm_s4

 def test_detect_symm_s4(self):
     atoms = [['H', (-1,-1.,-2.)],
              ['H', ( 1, 1.,-2.)],
              ['C', (-.9,-1.,-2.)],
              ['C', (.9, 1.,-2.)],
              ['H', ( 1,-1., 2.)],
              ['H', (-1, 1., 2.)],
              ['C', ( 1,-.9, 2.)],
              ['C', (-1, .9, 2.)],]
     l, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(l, 'S4')
     atoms = geom.shift_atom(atoms, orig, axes)
     self.assertTrue(geom.check_given_symm('C2', atoms))
     self.assertEqual(geom.symm_identical_atoms('C2',atoms),
                      [[0, 1], [2, 3], [4, 5], [6, 7]])
开发者ID:berquist,项目名称:pyscf,代码行数:15,代码来源:test_geom.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python geom.subgroup函数代码示例发布时间:2022-05-27
下一篇:
Python geom.detect_symm函数代码示例发布时间: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