Skip to content

Add periodic numerical S_abs#255

Merged
mscho527 merged 3 commits intotroyvvgroup:mainfrom
mscho527:periodicGridSabs
Jan 9, 2026
Merged

Add periodic numerical S_abs#255
mscho527 merged 3 commits intotroyvvgroup:mainfrom
mscho527:periodicGridSabs

Conversation

@mscho527
Copy link
Copy Markdown
Member

@mscho527 mscho527 commented Jan 8, 2026

This PR modifies the grid_S_abs function so that it can take periodic cells. Just like the molecular sparse ERI implementation, the plan is to use this as a guide for the analytical approximate S_abs function.

Some sanity check outputs:

>>> from quemb.molbe.eri_sparse_DF import grid_S_abs
>>> import pyscf
>>> cell = pyscf.pbc.gto.Cell()
>>> cell.atom = "H 0 0 0; H 1 0 0"
>>> cell.basis = "sto-3g"
>>> cell.a = [[2,0,0],[0,20,0],[0,0,20]]
>>> cell.build()
<pyscf.pbc.gto.cell.Cell object at 0x15059183e240>
>>> grid_S_abs(cell)
[array([[1.24198132, 1.02971088],
       [1.02971088, 1.24198142]])]
>>> cell.a = [[20,0,0],[0,20,0],[0,0,20]]
>>> cell.build()
<pyscf.pbc.gto.cell.Cell object at 0x15059183e240>
>>> grid_S_abs(cell)
[array([[0.99999997, 0.49648467],
       [0.49648467, 0.99999997]])]
>>> mol = pyscf.gto.Mole()
>>> mol.atom = "H 0 0 0; H 1 0 0"
>>> mol.basis = "sto-3g"
>>> mol.build()
<pyscf.gto.mole.Mole object at 0x1504cf54a7e0>
>>> grid_S_abs(mol)
array([[0.99999997, 0.49648467],
       [0.49648467, 0.99999997]])

@mscho527 mscho527 requested a review from nwhel January 8, 2026 20:15
Copy link
Copy Markdown

@nwhel nwhel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mscho527 mscho527 merged commit f10035e into troyvvgroup:main Jan 9, 2026
7 checks passed
@mscho527 mscho527 deleted the periodicGridSabs branch January 9, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants