本文整理汇总了Python中pyscf.symm.geom.check_given_symm函数的典型用法代码示例。如果您正苦于以下问题:Python check_given_symm函数的具体用法?Python check_given_symm怎么用?Python check_given_symm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_given_symm函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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]])
示例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))
示例3: test_Coov
def test_Coov(self):
atoms = [['H', (0,0,0)], ['H', (0,0,-1)], ['H1', (0,0,1)]]
basis = {'H':'sto3g', 'H1':'6-31g'}
gpname, orig, axes = geom.detect_symm(atoms, basis)
self.assertEqual(gpname, 'Coov')
self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
[[0], [1] ,[2]])
gpname, axes = geom.subgroup(gpname, axes)
atoms = geom.shift_atom(atoms, orig, axes)
self.assertEqual(gpname, 'Coov')
self.assertTrue(geom.check_given_symm('Coov', atoms, basis))
self.assertTrue(geom.check_given_symm('C2v', atoms, basis))
self.assertEqual(geom.symm_identical_atoms(gpname, atoms),
[[0], [1], [2]])
示例4: 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]])
示例5: 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]])
示例6: 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))
示例7: 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))
示例8: 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))
示例9: 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]])
示例10: 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))
示例11: 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]])
示例12: 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]])
示例13: 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]])
示例14: 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]])
示例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]])