Skip to content

Reuse stored projectors in AtomicNonlocal forces#1101

Closed
abussy wants to merge 5 commits into
JuliaMolSim:masterfrom
abussy:nonlocal
Closed

Reuse stored projectors in AtomicNonlocal forces#1101
abussy wants to merge 5 commits into
JuliaMolSim:masterfrom
abussy:nonlocal

Conversation

@abussy

@abussy abussy commented May 22, 2025

Copy link
Copy Markdown
Collaborator

During the calculation of the AtomicNonlocal forces, the projectors are recomputed for each element and k-point. There is no good reason to do that since they are already stored in the TermAtomicNonlocal.

This mostly impacts GPU performance, as relatively slow CPU loops over G + k vectors are avoided. This PR might collide with #1088.

@mfherbst

Copy link
Copy Markdown
Member

Yes, sure, makes sense to re-use what we already computed.

@Technici4n Any problems with merging this before #1088 ?

@Technici4n

Copy link
Copy Markdown
Collaborator

It will be a bit of work to update #1088 after this, but conceptually this change makes sense, and I don't know when I will be done with #1088. So go for it!

@antoine-levitt

Copy link
Copy Markdown
Member

Yes sure sounds good!

@abussy

abussy commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator Author

I'll close this PR for now, I will implement these changes in a new contribution where I optimize the AtomicNonlocal term more widely.

@abussy abussy closed this Feb 23, 2026
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.

4 participants