Skip to content

Optimize neighbor list and k-point eigensolver - #6

Merged
knc6 merged 5 commits into
atomgptlab:developfrom
crhysc:main
Apr 24, 2026
Merged

knc6 merged 5 commits into
atomgptlab:developfrom
crhysc:main

Conversation

@crhysc

@crhysc crhysc commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

N = number of atoms being considered
z = average number of neighbors for each atom being considered
K = number of k-points

Replace O(N_cells·N²) dense distance allocation with matscipy cell-list neighbor detection (O(N·z)), then rebuild only the relevant cells differentiably from positions so autograd is preserved for forces/stress.

Batch all k-points into a single eighb call instead of a Python for-loop, removing serial overhead and letting cuBLAS/LAPACK parallelize across k-points. Still O(K*N^3), but now it can run in parallel on GPU

Used Claude for this, may be a work in progress

knc6 and others added 5 commits April 2, 2026 22:50
Replace O(N_cells·N²) dense distance allocation with matscipy cell-list
neighbor detection (O(N·z̄)), then rebuild only the relevant cells
differentiably from positions so autograd is preserved for forces/stress.

Batch all k-points into a single eighb call instead of a Python for-loop,
removing serial overhead and letting cuBLAS/LAPACK parallelize across k-points.
@knc6
knc6 changed the base branch from main to develop April 24, 2026 22:14
@knc6
knc6 merged commit 7dd37e4 into atomgptlab:develop Apr 24, 2026
1 check passed
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