Skip to content

Commit

Permalink
Support "mol.symmetry = 'SO3'" in Mole.build (Fix pyscf#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Feb 16, 2025
1 parent ccedc56 commit 5e6bb8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyscf/gto/test/test_mole.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,13 @@ def test_input_symmetry1(self):
mol1.build()
self.assertAlmostEqual(abs(mol1._symm_axes - numpy.eye(3)[[1,2,0]]).max(), 0, 9)

mol1 = gto.M(
atom='He 0 0 0',
basis='aug-cc-pvdz',
symmetry='SO3'
)
self.assertEqual(mol.groupname, 'SO3')

def test_symm_orb(self):
rs = numpy.array([[.1, -.3, -.2],
[.3, .1, .8]])
Expand Down
3 changes: 3 additions & 0 deletions pyscf/symm/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ def check_symm(gpname, atoms, basis=None):
elif gpname == 'Coov':
coords = numpy.array([a[1] for a in atoms], dtype=float)
return numpy.allclose(coords[:,:2], 0, atol=TOLERANCE)
elif gpname == 'SO3':
coords = numpy.array([a[1] for a in atoms], dtype=float)
return abs(coords).max() < TOLERANCE

opdic = symm_ops(gpname)
ops = [opdic[op] for op in OPERATOR_TABLE[gpname]]
Expand Down

0 comments on commit 5e6bb8f

Please sign in to comment.