Conversation
rprospero
requested review from
RobBuchananCompPhys and
trisyoungs
and removed request for
trisyoungs
September 24, 2026 14:59
rprospero
force-pushed
the
dissolve2/bonding-with-cells
branch
from
October 5, 2026 09:23
939e394 to
4e2065a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses cells to split up the bonding calculation. Instead of parallelising across atoms, we run in parallel across neighbouring cell pairs, which isn't quite as efficient, but hopefully the cell splitting makes up for the loss. One place to pay extra special attention is in line 58 of
calculateBondingNode.cpp. I have been doing a dynamic calculation of the size of the box based on the inscribed radius, but this was somehow creating 1000 cells on linux and 2³² cells on Mac. I've now hard coded the cell size, but I would appreciate suggestions on a better way of handling this. At the time I'm writing this, the Mac build is failing due to a server failure for one of our dependencies, so I cannot check whether or not the hard coded size fixed the issue.To do this, I've added an extra method to cell array that gives all the pairs along with all of the self pairings, which was behind the bug I was dealing with in the standup this morning.
There's also a change switching cells to just store an AtomBase pointer and then adjusting the existing call sites for CellArray.
As future work, we could write a cell atom-pair iterator that would allow us to iterate through the atom pairs in same or neighbouring cells. This would both simplify the code (likely in multiple places) and prevent waiting on the thread with the most populated cell to finish.